On Thu, 5 May 2022 01:34:48 GMT, Naoto Sato <na...@openjdk.org> wrote:

>> Ichiroh Takiguchi has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   8285517: System.getenv() returns unexpected value if environment variable 
>> has non ASCII character
>
> test/jdk/java/lang/System/i18nEnvArg.java line 70:
> 
>> 68:             Map<String, String> environ = pb.environment();
>> 69:             environ.clear();
>> 70:             environ.put("LANG", "ja_JP.eucjp");
> 
> There are many duplicate pieces of code here and in the `else` block below. 
> Can you simplify this `if` statement more?

Modified.
But I'm not sure, it's expected one.

> test/jdk/java/lang/System/i18nEnvArg.java line 110:
> 
>> 108:             String s = System.getenv(EUC_JP_TEXT);
>> 109:             ByteArrayOutputStream baos = new ByteArrayOutputStream();
>> 110:             PrintStream ps = new PrintStream(baos);
> 
> Can utilize try-with-resources pattern.

Use `shouldNotContain()` to find the error message.

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

PR: https://git.openjdk.java.net/jdk/pull/8378

Reply via email to