RFR: 8266078: Reader.read(CharBuffer) advances Reader position for read-only Charbuffers [v2]

Roger Riggs rriggs at openjdk.java.net
Tue Apr 27 21:19:13 UTC 2021


On Tue, 27 Apr 2021 20:25:32 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Please consider this request to modify `Reader.read(CharBuffer)` to check whether the buffer is read-only before reading any characters from the character stream. This can happen now if the buffer is read-only. Character are first read thereby advancing the stream before an attempt is made to put them in the `CharBuffer` thus incorrectly advancing the stream position.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8266078: Make read-only check global; add message in test

Marked as reviewed by rriggs (Reviewer).

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

PR: https://git.openjdk.java.net/jdk/pull/3725


More information about the core-libs-dev mailing list