RFR: 8296454: System.console() shouldn't return null in jshell

Jan Lahoda jlahoda at openjdk.org
Fri Jan 6 09:21:00 UTC 2023


Implements `System.console()` for JShell, based on JDK-8295803. It is only supported for (supported) remote agents.

When a snippet calls a Console method in the remote agent, a request to perform the task is sent to the main process, performed, and the outcomes are sent back to the remote agent, and returned from the Console method.

Please also review the CSR for the newly added API:
https://bugs.openjdk.org/browse/JDK-8299680

-------------

Commit messages:
 - Cleanup.
 - Cleanup.
 - Fixing test.
 - Adding support for Charset.
 - Test when there's no JShellConsole.
 - Buffering output.
 - Improving synchronizations and fixing sending of many requests from the agent into the main process.
 - Merge branch 'master' into JDK-8296454b
 - 8296454: System.console() shouldn't return null in jshell

Changes: https://git.openjdk.org/jdk/pull/11695/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11695&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8296454
  Stats: 1001 lines in 15 files changed: 954 ins; 0 del; 47 mod
  Patch: https://git.openjdk.org/jdk/pull/11695.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11695/head:pull/11695

PR: https://git.openjdk.org/jdk/pull/11695


More information about the kulla-dev mailing list