RFR: 8354724: BufferedReader readAllLines and readString methods [v14]
Stuart Marks
smarks at openjdk.org
Thu May 1 17:46:52 UTC 2025
On Wed, 23 Apr 2025 22:04:25 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: Fix readAllChars gaffe in Reader returned by Readed.of and account for it in test
src/java.base/share/classes/java/io/Reader.java line 405:
> 403: * a carriage return followed immediately by a line feed, or by reaching the
> 404: * end-of-file (EOF).
> 405: *
I think the definition here should be copied from String.lines(), or it should refer to it. The main difference is that spec is explicit about a line being zero-or-more chars followed by a line terminator or one-or-more chars followed by EOF. This implies there is no blank line between a trailing line terminator and EOF.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24728#discussion_r2070573057
More information about the core-libs-dev
mailing list