RFR: 8295803: Console should be usable in jshell and other environments [v13]

Alan Bateman alanb at openjdk.org
Wed Dec 7 20:32:17 UTC 2022


On Wed, 7 Dec 2022 19:19:25 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> This is to allow Console to be used even when it is not attached to the platform provided terminal, such as the case when the standard input is redirected. `System.console()` now returns a Console implementation based on `jdk.internal.le` terminal by default, or jshell implementation if available. A corresponding CSR has been drafted.
>
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Refined comments, no-op in WrappingReader/Writer::close()

Marked as reviewed by alanb (Reviewer).

Thanks for the updates, I don't have any more comments. I think should create a follow-up issue to "hollow out" Console and have two separate implementations/subclasses. I think that would make it much cleaner rather than one implementation extending the other as we have now.

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

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


More information about the core-libs-dev mailing list