RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v18]
Alan Bateman
alanb at openjdk.org
Tue May 13 11:10:59 UTC 2025
On Mon, 12 May 2025 23:51:19 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Implement the requested methods and add a test thereof.
>
> Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 21 additional commits since the last revision:
>
> - 8354724: Attempt to further improve verbiage
> - Merge
> - Update src/java.base/share/classes/java/io/Reader.java
>
> 8354724: Apply suggested changes for readAllLines.
>
> Co-authored-by: Roger Riggs <Roger.Riggs at Oracle.com>
> - Update src/java.base/share/classes/java/io/Reader.java
>
> 8354724: Apply suggested changes for readAllAsString.
>
> Co-authored-by: Roger Riggs <Roger.Riggs at Oracle.com>
> - 8354724: Revert BufferedReader; simplify Reader changes removing overridable self-call; update test
> - 8354724: Fix potential NPE in test
> - 8354724: Fix readAllChars gaffe in Reader returned by Readed.of and account for it in test
> - 8354724: Improve test per reviewer comments
> - 8354724: Add missing toList(), tweak verbiage; update test
> - 8354724: Add Reader.readAllLines; test not yet updated
> - ... and 11 more: https://git.openjdk.org/jdk/compare/fea75845...1d811589
A lot of iterations and changes in direction but I think the API proposal in 1d811589 is okay.
The method names and API docs looks fine. One thing that is missing is specifying how the 2 methods behaves when the reader is closed. Sadly, we can't do this because the base methods doesn't specify this so it becomes Reader specific.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24728#issuecomment-2876052846
More information about the core-libs-dev
mailing list