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

Jan Lahoda jlahoda at openjdk.java.net
Mon May 24 11:51:31 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 incrementally with one additional commit since the last revision:

  Ensuring the test input is UTF-8, to allow tests pass regardless of configuration.

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4128/files
  - new: https://git.openjdk.java.net/jdk/pull/4128/files/89a120fb..7ec1b9af

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4128&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4128&range=00-01

  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 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