RFR: 8264208: Console charset API [v6]

Naoto Sato naoto at openjdk.java.net
Wed Apr 14 16:55:05 UTC 2021


On Wed, 14 Apr 2021 15:03:19 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> 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.

Added some explanation to it.

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

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



More information about the security-dev mailing list