On Thu, 23 Feb 2023 10:07:22 GMT, Alan Bateman <al...@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