RFR: 8195129: System.load() fails to load from unicode paths [v3]
Maxim Kartashev
github.com+28651297+mkartashev at openjdk.java.net
Thu Jun 3 07:01:45 UTC 2021
On Tue, 1 Jun 2021 18:42:34 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> Maxim Kartashev has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Coding style-related corrections.
>> - Corrected the test to use Platform.sharedLibraryExt()
>
> test/hotspot/jtreg/runtime/jni/loadLibraryUnicode/LoadLibraryUnicodeTest.java line 42:
>
>> 40: String nativePathSetting = "-Dtest.nativepath=" + getSystemProperty("test.nativepath");
>> 41: ProcessBuilder pb = ProcessTools.createTestJvm(nativePathSetting, LoadLibraryUnicode.class.getName());
>> 42: pb.environment().put("LC_ALL", "en_US.UTF-8");
>
> Some environments/user configs may not have `UTF-8` codeset on the platform. May need to gracefully exit in such a case.
I added `java.nio.charset.Charset.isSupported("UTF-8")` check to the test. Hope that's enough for the environments without `UTF-8`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4169
More information about the core-libs-dev
mailing list