[jdk20] Integrated: 8298425: System.console().readLine() hangs in jshell
Jan Lahoda
jlahoda at openjdk.org
Wed Dec 14 11:39:51 UTC 2022
On Fri, 9 Dec 2022 13:14:59 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> After https://bugs.openjdk.org/browse/JDK-8295803, JShell snippets like:
>
> jshell> System.console().readLine()
>
>
> hang, as the JLine console is used, and it cannot correctly read from the console while in the remote agent (due to input/output redirection setup for the agent). Until [JDK-8296454](https://bugs.openjdk.org/browse/JDK-8296454) is resolved, the JLine console should be disabled inside the remote agent.
>
> As the default console requires an attached terminal, and there is no attached terminal inside the agent, `System.console()` should then return `null` inside the JShell's agent, which was the behavior before JDK-8295803.
This pull request has now been integrated.
Changeset: 9bcdfc42
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk20/commit/9bcdfc428597e1465c8a014d816ef671420d22df
Stats: 49 lines in 2 files changed: 48 ins; 0 del; 1 mod
8298425: System.console().readLine() hangs in jshell
Reviewed-by: naoto, alanb
-------------
PR: https://git.openjdk.org/jdk20/pull/11
More information about the kulla-dev
mailing list