RFR: 8264208: Console charset API [v2]

Naoto Sato naoto at openjdk.java.net
Mon Apr 12 23:01:25 UTC 2021


On Mon, 12 Apr 2021 21:12:08 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> src/java.base/share/classes/java/io/Console.java line 397:
>> 
>>> 395:     /**
>>> 396:      * Returns the {@link java.nio.charset.Charset Charset} object used in
>>> 397:      * this {@code Console}.
>> 
>> The Console is a singleton and the existing methods use "the console" so I think we should do the same here.
>> 
>> We'll need to add to the description of the System.{in,out,err} fields, I don't mind if we do it as part of this PR or another issue.
>
> Javadoc updated. Instead of modifying System.out/err (System.in is not affected, as it does not convert b2c), I modified PrintStream javadoc.

Reverted the changes to PrintStream, as it defaults to Charset.defaultCharset(). Added descriptions to System.out/err instead (and modified the impl).

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

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


More information about the security-dev mailing list