On Fri, 6 May 2022 14:29:06 GMT, Ichiroh Takiguchi <itakigu...@openjdk.org> 
wrote:

>> 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.

I was suggesting `try (ByteArrayOutputStream baos = ...) {` so that no need to 
clean them up, but I see you removed them. But I prefer not to use 
`shouldNotContain("ERROR: ")` but to check the return value as before.

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

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

Reply via email to