Integrated: 8300916: Re-examine the initialization of JNU Charset in StaticProperty

Naoto Sato naoto at openjdk.org
Mon Jan 30 17:09:28 UTC 2023


On Tue, 24 Jan 2023 21:13:30 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> This issue was found during the review of this PR: https://github.com/openjdk/jdk/pull/12132 where `Charset` class was loaded/initialized at the phase 1 of the startup process. Since `Charset` depends on `StaticProperty`, loading of `Charset` class should be delayed. I basically moved cache for `jnuCharset` into the actual calling locations `ProcessImpl` and `ProcessEnvironment` for unix platforms so that initPhase1() won't initialize `Charset` class.
> Unrelated, but I replaced `Locale.ENGLISH` with `Locale.ROOT` in the argument of `toLowerCase()`.

This pull request has now been integrated.

Changeset: 32381398
Author:    Naoto Sato <naoto at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/323813985b71c63c915cdfce5221fc65a2ad043d
Stats:     41 lines in 4 files changed: 7 ins; 18 del; 16 mod

8300916: Re-examine the initialization of JNU Charset in StaticProperty

Reviewed-by: mchung, alanb

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

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


More information about the core-libs-dev mailing list