On Fri, 10 Feb 2023 20:35:58 GMT, Naoto Sato <na...@openjdk.org> wrote:

> Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since 
> this is not a compatible upgrade to the existing mapping, a new system 
> property `jdk.charset.GB18030` is introduced. If it is set to "2000", the 
> mapping falls back to the existing mapping based on the 2000 standard, 
> otherwise, it defaults to 2022 mapping. Refer to the corresponding CSR for 
> more detail.

src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template line 217:

> 215:             if (VM.initLevel() < 1) {
> 216:                 // Cannot get the system property yet. Assumes non-2000
> 217:                 GB18030_2000 = "";

curious - what scenario triggers this call at initLevel < 1 ? would it be 
better to simply return "false" at that time and leave the GB18030_2000 
variable to be set once we're at initLevel >=1  ?  -- or perhaps that would 
invalidate the workflow of the original caller (which called in at initLevel <1)

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

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

Reply via email to