RFR: 8264208: Console charset API [v6]

Alan Bateman alanb at openjdk.java.net
Wed Apr 14 15:06:47 UTC 2021


On Tue, 13 Apr 2021 19:59:30 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> Please review the changes for the subject issue.  This has been suggested in a recent discussion thread for the JEP 400 [[1](https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-March/075214.html)]. A CSR has also been drafted, and comments are welcome [[2](https://bugs.openjdk.java.net/browse/JDK-8264209)].
>
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Added comment to System.out/err init.

src/java.base/share/classes/java/lang/System.java line 166:

> 164:      * exists, {@link Charset#defaultCharset()} otherwise.
> 165:      */
> 166:     public static final PrintStream err = null;

I still think we need something in System.in to link to Console::charset. If someone creates an InputStreamReader(System.in) then it will use the default charset, they should be using Console::reader for these cases.

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

PR: https://git.openjdk.java.net/jdk/pull/3419



More information about the security-dev mailing list