RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]
Brian Burkhalter
bpb at openjdk.org
Thu May 15 20:36:59 UTC 2025
On Thu, 15 May 2025 05:53:44 GMT, Markus KARG <duke at openjdk.org> wrote:
>> @mkarg Please don't invoke my name to try to buttress your arguments. The calls the Reader.of() instance makes on its backing CharSequence is a different kind of issue from what promises or guarantees the concrete methods of the Reader class makes to its subclasses.
>
> @stuart-marks Sorry, didn't want to pull you in here, that's why I said, I am just *paraphrasing*.
>
> That is correct, it is a different case, but the *final effect* for the caller is the same: If he needs to now whether a copy is made *or not*, he needs to have JavaDocs telling him *how* the new method works inside (whether it calls `subSequence` or whether it calls `getChars`). Otherwise he might make false assumptions about the result.
This API is concerned with the "what" and not so much the "how."
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24728#discussion_r2091919761
More information about the core-libs-dev
mailing list