RFR: 8354724: BufferedReader readAllLines and readString methods [v12]
Johannes Döbler
duke at openjdk.org
Wed Apr 23 15:27:59 UTC 2025
On Tue, 22 Apr 2025 17:12:52 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Implement the requested methods and add a test thereof.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8354724: Add missing toList(), tweak verbiage; update test
test/jdk/java/io/BufferedReader/ReadAll.java line 83:
> 81: int toIndex = rnd.nextInt(fromIndex, plen);
> 82: String str = PHRASE.substring(fromIndex, toIndex);
> 83: byte[] strBytes = str.getBytes();
The test will fail if the default Charset is not UTF-8:
`String.getBytes()` and` FileReader(File)` use the default Charset, `Files.readAllLines(Path)` and `Files.readString(Path)` use UTF-8.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24728#discussion_r2056258447
More information about the core-libs-dev
mailing list