RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v3]
Naoto Sato
naoto at openjdk.java.net
Sun Nov 14 00:23:35 UTC 2021
On Sat, 13 Nov 2021 19:24:07 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Force the jnu encoding to UTF-8 if the original one is not supported
>
> src/java.base/share/classes/java/lang/System.java line 2127:
>
>> 2125: props.setProperty("sun.jnu.encoding", "UTF-8");
>> 2126: }
>> 2127:
>
> You could replace the two fields with something like "notSupportedJnuEncoding" that is only set when not supported. That keeps the additional code in initPhase1 to a minimum.
Replaced as suggested.
> src/java.base/share/classes/java/lang/System.java line 2267:
>
>> 2265: "WARNING: The encoding of the underlying platform's" +
>> 2266: " file system is not supported by the JVM: %s%n",
>> 2267: jnuEncoding);
>
> I think you can drop "by the JVM" from the warning.
>
> Also just to point out that this is running in initPhase3. I'm pretty sure the use of formatters here will execute code that checks VM.isBooted. It might be better to just use string concatenation and avoid loading formatters here.
Done.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6282
More information about the core-libs-dev
mailing list