RFR: JDK-8242919: Paste locks up jshell
Robert Field
robert.field at oracle.com
Tue May 5 18:00:46 UTC 2020
Thumbs up.
-Robert
On 2020-04-16 06:40, Jan Lahoda wrote:
> Hi,
>
> Pasting inside JShell causes JShell to lock up. The reason is that
> JLine detects the paste, and reads until an "end-of-paste" marker.
> This reading is done in blocks. But, as the streams are set-up in
> JShell, it will wait until the (last) block[1] is filled up before
> returning, but the user is not providing any input, expecting the
> paste to finish. The proposed solution is to make sure the
> InputStreams in JShell are set-up so that it does not wait until the
> block is filled.
>
> Webrev: http://cr.openjdk.java.net/~jlahoda/8242919/webrev.00/
> JBS: https://bugs.openjdk.java.net/browse/JDK-8242919
>
> How does this look?
>
> Thanks,
> Jan
>
> [1]
> https://github.com/openjdk/jdk/blob/3cc1fdf2b60b388abdf53e8e053b9fab8f2f959c/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingInputStream.java#L81
More information about the kulla-dev
mailing list