He-Pin opened a new pull request, #3193:
URL: https://github.com/apache/pekko/pull/3193
## Summary
- `String.isBlank()` replacing `trim().isEmpty()`
- `Collection.toArray(IntFunction)` replacing `toArray(new X[0])`
- `Map.forEach` replacing entrySet iteration loops
- Text blocks `"""..."""` replacing multi-line string concatenation
- Records replacing simple data holder classes
## Changes
### String.isBlank() (Java 11+)
- `ShardingEventSourcedEntityWithEnforcedRepliesCompileOnlyTest.java`
### Collection.toArray(IntFunction) (Java 11+)
- `GraphDslTest.java` — `toArray(new String[] {})` → `toArray(String[]::new)`
- `BidiFlowDocTest.java` — `toArray(new Message[0])` →
`toArray(Message[]::new)`
### Map.forEach (Java 8+)
- `ReplicatedShoppingCartExample.java` — entrySet loop → `cart.forEach((k,
v) -> ...)`
- `DeviceGroupQuery.java` — entrySet loop → `deviceIdToActor.forEach((k, v)
-> ...)`
### Text blocks (Java 15+)
- `SubstreamDocTest.java` — 3-line string concat → text block
- `TestConfigExample.java` — config string concatenations → text blocks
### Records (Java 16+)
- `ImmutableMessage.java` → `record ImmutableMessage(int sequenceNumber,
List<String> values)`
- `Messages.java` inner class → record
- `Message.Person` → `record Person(String first, String last)`
- `Bid.java` → `record Bid(UUID bidder, Instant bidTime, int bidPrice, int
maximumBid)`
- Updated callers in `AuctionEntity.java` and `AuctionState.java` (getter
names adjusted)
## Notes
- All changes in test/doc/example code only, no production API modifications
- `javafmtAll` verified — no formatting changes needed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]