RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v5]
Naoto Sato
naoto at openjdk.org
Wed Jan 25 19:35:18 UTC 2023
> 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()`.
Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
Use StaticProperty.fileEncoding() & make the field @Stable
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/12171/files
- new: https://git.openjdk.org/jdk/pull/12171/files/5c37f5bc..b2268eb2
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=12171&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=12171&range=03-04
Stats: 7 lines in 1 file changed: 3 ins; 3 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/12171.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12171/head:pull/12171
PR: https://git.openjdk.org/jdk/pull/12171
More information about the core-libs-dev
mailing list