JDK 10 RFR of JDK-8181395: Refactor several java/nio locale related shell tests to java

Amy Lu amy.lu at oracle.com
Fri Jun 9 03:10:14 UTC 2017


Thank you Hamlin.

I actually think -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 is 
enough. I added Locale.setDefault(Locale.US) and restore "just for safe".
The encoding check (and warnings/usage) is mainly for helping one who 
tries to run it from command line.

Thanks,
Amy

On 6/9/17 10:14 AM, Hamlin Li wrote:
> Hi Amy,
>
> For refactoring MacPathTest, I wonder if it's sufficient to just 
> change below line?
>
>
> - * @run shell MacPathTest.sh
> + * @run main/othervm -Duser.language=en -Duser.country=US 
> -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 MacPathTest
>   */
>
> Thank you
>
> -Hamlin
>
>
> On 2017/6/7 14:14, Amy Lu wrote:
>> java/nio/charset/Charset/default.sh
>> java/nio/charset/coders/CheckSJISMappingProp.sh
>> java/nio/file/Path/MacPathTest.java which runs shell test:
>>      * @run shell MacPathTest.sh
>>
>> Please review this patch to refactor these shell tests to java.
>>
>> Note that in MacPathTest.sh, it requires the test to be run with 
>> LC_ALL=en_US.UTF-8 env. But unlike the other two tests, LC_ALL 
>> settings here is just to setup an env in order for the test to work 
>> correctly, it’s not the locale it intends to test.
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8181395
>> webrev: http://cr.openjdk.java.net/~amlu/8181395/webrev.00/
>>
>> Thanks,
>> Amy
>



More information about the core-libs-dev mailing list