Integrated: 8267459: Pasting Unicode characters into JShell does not work.

Jan Lahoda jlahoda at openjdk.java.net
Wed Jun 2 09:58:40 UTC 2021


On Thu, 20 May 2021 13:14:47 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: de6472c4
Author:    Jan Lahoda <jlahoda at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/de6472c44166e57cd440b7bffcfc876585aca7dd
Stats:     36 lines in 3 files changed: 32 ins; 0 del; 4 mod

8267459: Pasting Unicode characters into JShell does not work.

Reviewed-by: vromero

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

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


More information about the kulla-dev mailing list