RFR: JDK-8242919: Paste locks up jshell
Jan Lahoda
jan.lahoda at oracle.com
Wed May 6 15:45:37 UTC 2020
Hi,
I apologize, there is a small issue in the patch, which is breaking one
of the tests. When processing fixes (Shift-Tab <letter>), we are using
Terminal.input(), but that is not available while testing in the patch.
Using Terminal.reader() instead, which seems like a more correct thing
to do anyway.
Delta patch:
http://cr.openjdk.java.net/~jlahoda/8242919/webrev.delta.00-01/
Full patch:
http://cr.openjdk.java.net/~jlahoda/8242919/webrev.01/
Does it still look reasonable.
I apologize for not catching this before sending the original request.
Thanks,
Jan
On 05. 05. 20 20:00, Robert Field wrote:
> 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