[jdk20] RFR: 8298425: System.console().readLine() hangs in jshell [v2]
Jan Lahoda
jlahoda at openjdk.org
Mon Dec 12 09:57:32 UTC 2022
> 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.
Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
Set the jdk.console property on command line.
-------------
Changes:
- all: https://git.openjdk.org/jdk20/pull/11/files
- new: https://git.openjdk.org/jdk20/pull/11/files/2404e4e2..e4f32a5a
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk20&pr=11&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk20&pr=11&range=00-01
Stats: 9 lines in 2 files changed: 6 ins; 2 del; 1 mod
Patch: https://git.openjdk.org/jdk20/pull/11.diff
Fetch: git fetch https://git.openjdk.org/jdk20 pull/11/head:pull/11
PR: https://git.openjdk.org/jdk20/pull/11
More information about the kulla-dev
mailing list