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

Brian Burkhalter bpb at openjdk.org
Tue Jun 24 18:55:41 UTC 2025


On Tue, 24 Jun 2025 08:08:58 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8358533: Init StringBuilder to size zero; use StringBuilder.isEmpty()
>
> test/micro/org/openjdk/bench/java/io/ReaderReadAllLines.java line 61:
> 
>> 59:     public List<String> readAllLines() throws IOException {
>> 60:         List<String> lines;
>> 61:         try (Reader reader = new CharArrayReader(chars);) {
> 
> Suggestion:
> 
>         try (Reader reader = new CharArrayReader(chars)) {

So changed in 8ccfd54.

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

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


More information about the core-libs-dev mailing list