RFR: 8354724: BufferedReader readAllLines and readString methods [v14]
Markus KARG
duke at openjdk.org
Tue May 6 17:28:21 UTC 2025
On Sun, 4 May 2025 05:08:46 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Oh, and we should set `next` afterwards, so the `Reader` knows that the end of the sequence is reached:
>>
>>
>> public String readAllChars() throws IOException {
>> ensureOpen();
>> var len = cs.length();
>> var remainder = cs.subSequence(next, len);
>> next = len;
>> return remainder.toString();
>> }
>>
>>
>> (Edited my proposal to be a bit more concurrency-friendly and correct.)
>
> Probably best to ignore the implementation details as the discussions on what methods to expose, and where, is still going on. It was probably a bit premature to create the PR without getting agreement on the API first.
So at least it's not just me... 😅 😉
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24728#discussion_r2075948845
More information about the core-libs-dev
mailing list