RFR: 8267459: Pasting Unicode characters into JShell does not work. [v3]

Jan Lahoda jlahoda at openjdk.java.net
Tue Jun 1 15:42:32 UTC 2021


> The NonBlockingInputStreamReader.readBuffered method will read some bytes from the InputStream, and then try to convert them to characters. But, the input array may end in the middle of a sequence - e.g. it may end with a part of UTF-8 sequence, which will be only finished when the input is read next time.
> 
> The proposed fix is to store the trailing unused bytes into the `bytes` field, which is already used for a similar purpose by the other read method in this class, and use them on the next iteration.

Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:

 - Merging master into JDK-8267459
 - Ensuring the test input is UTF-8, to allow tests pass regardless of configuration.
 - 8267459: Pasting Unicode characters into JShell does not work.

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

Changes: https://git.openjdk.java.net/jdk/pull/4128/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4128&range=02
  Stats: 36 lines in 3 files changed: 32 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4128.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4128/head:pull/4128

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


More information about the kulla-dev mailing list