Hi Ralf,

Changes look good. One minor suggestion:

  49 launcher.addVMArg("-Dfile.encoding=UTF-8");

Can you change to:

  49 launcher.addVMArg("-Dfile.encoding=" + StandardCharsets.UTF_8);

So it is consistent with:

  55         OutputAnalyzer output = ProcessTools.executeProcess(processBuilder, null, StandardCharsets.UTF_8);

Maybe even add a static final for the Charset so StandardCharsets.UTF_8 is only referenced in one place.

Also a shorter marker as has been discussed would be nice.

thanks,

Chris

On 7/25/19 6:09 AM, Schmelter, Ralf wrote:
The tests included to check the correct UTF-8 conversion of jstack/jinfo/jcmd 
will fail, if the platform encoding cannot represent the Unicode characters we 
used in the code. These characters will be correctly converted by the tools, 
but when printed out on System.out, the PrintSteam has to convert the chars to 
bytes. And if a Unicode character is not supported by the platform encoding, a 
question mark is used instead.

This is what happened on some machines the test was run. To fix this, we now 
set the encoding used to UTF-8 explicitly. I had to adapt some test library 
code to add the option of using a specific charset for the conversion from 
bytes to chars.

webrev: http://cr.openjdk.java.net/~rschmelter/webrevs/8228589/webrev.0/
bugreport: https://bugs.openjdk.java.net/browse/JDK-8228589

Best regards,
Ralf



Reply via email to