RFR: 8301119: Support for GB18030-2022 [v3]

Naoto Sato naoto at openjdk.org
Thu Feb 23 19:36:10 UTC 2023


On Thu, 23 Feb 2023 10:07:22 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> would use of jdk.internal.util.SystemProps be an option here (if having to retrieve that value when we're at VM init level <1 ?
>
>> would use of jdk.internal.util.SystemProps be an option here (if having to retrieve that value when we're at VM init level <1 ?
> 
> The early startup scenario is early in the system property initialization, specifically SystemProps.Raw.<clinit> which will cause the encoding to be initialized. This has to avoid make use of system properties, otherwise you get a circular initialization issue.

> what this code is really reaching for is `static final` field semantics.

Exactly. Introducing the holder pattern in `StandardCharset` would solve the issue, but instead I moved the flag init into `GB18030` so that we can literally make it `static final`.

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

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


More information about the core-libs-dev mailing list