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.

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

Commit messages:
 - 8266078: Reader.read(CharBuffer) advances Reader position for read-only 
Charbuffers

Changes: https://git.openjdk.java.net/jdk/pull/3725/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3725&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8266078
  Stats: 70 lines in 2 files changed: 70 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3725.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3725/head:pull/3725

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

Reply via email to