You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2026/06/26 03:10:33 UTC
[PR] refactor: use Files.writeString (Java 11+) [pekko-connectors]
He-Pin opened a new pull request, #1722:
URL: https://github.com/apache/pekko-connectors/pull/1722
### Motivation
`Files.writeString` was introduced in Java 11 and provides a cleaner API for writing a `String` to a file, replacing the `Files.write(path, str.getBytes(charset))` pattern.
### Modification
Replace `Files.write(path, str.getBytes(charset))` with `Files.writeString(path, str, charset)` in:
- `file/src/test/java/docs/javadsl/FileTailSourceTest.java` (6 occurrences)
- `file/src/test/java/docs/javadsl/DirectoryChangesSourceTest.java` (1 occurrence)
### Result
More idiomatic Java 11+ code with identical behavior.
### Tests
- [ ] Existing tests pass (behavior-preserving refactoring)
- [ ] `sbt javafmtAll` passes with JDK 17
### References
None - Java 11+ API migration
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] refactor: use Files.writeString (Java 11+) [pekko-connectors]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #1722:
URL: https://github.com/apache/pekko-connectors/pull/1722
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org