If only a leftover `char` remains in the stream, do not add `-1` to the return 
value in `lockedRead()`.

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

Commit messages:
 - 8287003: InputStreamReader::read() can return zero despite writing a char in 
the buffer

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

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

Reply via email to