RFR: 8362116: System.in.read() etc. don't accept input once immediate Ctrl+D pressed in JShell
Christian Stein
cstein at openjdk.org
Mon Jul 14 13:17:39 UTC 2025
On Mon, 14 Jul 2025 12:48:27 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> When in JShell, doing:
>
> jshell> IO.readln();
> //Ctrl-D
> $1 ==> null
>
> jshell> IO.readln()
> $2 ==> null //no input allowed
>
>
> Where relying input from the main process to the remote/agent process, need to propagate `-1` as `-1` without close, which is what this PR is attempting to do.
`\u0004` can now be declared as a constant in `UITesting.java`, right next to:
https://github.com/openjdk/jdk/blob/bcd86d575fe0682a234228c18b0c2e817d3816da/test/langtools/jdk/jshell/UITesting.java#L48
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26292#issuecomment-3069580222
More information about the compiler-dev
mailing list