RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

Jaikiran Pai jpai at openjdk.org
Wed May 28 14:21:58 UTC 2025


On Tue, 20 May 2025 17:32:03 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> I see this has been changed to  "then some characters, but not all" but it doesn't flow very well. The original sentence, which was copied/modified from InputStream.readAllBytes, is much cleaner and I think I would prefer to go back to that.  Maybe Jai's issue could be address by dropping the first comma from the sentence?
>
> In 0880af2 reverted previous commit then removed first comma from the modified sentence.

Hello Brian, the updated text looks OK to me. It still takes me a second read to understand what it says and I think it due to the sentence reading like an instruction to implementations that they aren't allowed to throw I/O errors before any characters have been read from the stream:

> If an I/O error occurs reading from the stream then it may do so after some ...

But there's a precedence for this text (in the API docs of `java.nio.file.Files`) and others favour the current proposed/updated form, so it's OK with me to go ahead with this text.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24728#discussion_r2112043612


More information about the core-libs-dev mailing list