RFR: 8358533: Improve performance of java.io.Reader.readAllLines

Brian Burkhalter bpb at openjdk.org
Wed Jun 18 16:48:29 UTC 2025


On Wed, 18 Jun 2025 02:33:40 GMT, Xueming Shen <sherman at openjdk.org> wrote:

> I think we should treat "\r\n" as a single line terminator?

You are correct: that needs to be fixed:

jshell> Reader r = new StringReader("hello\r\nworld")
r ==> java.io.StringReader at 480bdb19

jshell> r.readAllLines()
$3 ==> [hello, , world]

Thanks for the catch!

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25863#discussion_r2155076355


More information about the core-libs-dev mailing list