RFR: 8296454: System.console() shouldn't return null in jshell [v2]
Andrey Turbanov
aturbanov at openjdk.org
Tue Mar 21 08:58:54 UTC 2023
On Thu, 16 Mar 2023 07:28:21 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
>> 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
>
> Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision:
>
> - Merge remote-tracking branch 'origin/JDK-8296454b' into JDK-8296454b
> - Merge branch 'master' into JDK-8296454b
> - Speeding up writes to the Console's Writer by not waiting for the response.
> - 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.
> - ... and 2 more: https://git.openjdk.org/jdk/compare/1140c946...d58e53f1
src/jdk.jshell/share/classes/jdk/jshell/execution/impl/ConsoleImpl.java line 196:
> 194: */
> 195: @Override
> 196: public JdkConsole format(String fmt, Object ...args) {
Suggestion:
public JdkConsole format(String fmt, Object ... args) {
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/11695#discussion_r1143053355
More information about the kulla-dev
mailing list