RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v4]

Alan Bateman alanb at openjdk.org
Wed Jan 25 19:01:44 UTC 2023


On Wed, 25 Jan 2023 18:45:41 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> `Charset.defaultCharset()` now uses `standardProvider.charsetForName(<file.encoding>)` charset.

I think this is the right thing to do. It can also be changed to use StaticProperty.fileEncoding() and maybe the field can be changed to be a `@Stable` field. 

It might be that we will need to create a CSR and Release Note for this change.  The scenario is PR 12132 is unfortunate but does not show that some deployments may have been relying on the this from JDK 9 to JDK 17. With the change here, we are doubling now on ensuring that the default charset is loaded from java.base.

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

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


More information about the core-libs-dev mailing list