RFR: 8358533: Improve performance of java.io.Reader.readAllLines [v7]

Roger Riggs rriggs at openjdk.org
Fri Jun 27 19:23:39 UTC 2025


On Fri, 27 Jun 2025 18:54:20 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Yes, `term == limit`. The "no line terminator" means none was encountered before the buffer's end was reached.
>
> Maybe it should be something like:
> 
> // no line terminator before end of buffer

More directly, use limit instead of term in the computation of length.
Suggestion:

                    int len = limit - pos;

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

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


More information about the core-libs-dev mailing list