RFR: 8264208: Console charset API [v4]

Joe Wang joehw at openjdk.java.net
Tue Apr 13 02:37:59 UTC 2021

On Mon, 12 Apr 2021 23:01:24 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:
>   Reverted PrintStream changes

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

> 2018:         setIn0(new BufferedInputStream(fdIn));
> 2019:         setOut0(newPrintStream(fdOut, cs));
> 2020:         setErr0(newPrintStream(fdErr, cs));

It was getting from sun.stdout.encoding or sun.stderr.encoding. After the change, when there is no console, it would be set with Charset.defaultCharset(). Would that be an incompatible change?


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

More information about the core-libs-dev mailing list