RFR (XS): 8129394: [TESTBUG] runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java failed with double option
Dmitry Dmitriev
dmitry.dmitriev at oracle.com
Wed Jun 24 12:07:24 UTC 2015
Hello,
Please review this small fix(2 lines changed) for recently added Command
Line Option Validation tests.
The problem was found in test framework code for double options.
String.format("%f") was used to format double value and it depends on
current locale. Thus, on some locales the resulting string with double
value looks like: 0,999 (with comma) and JVM reports an error when
trying to parse double command line option with such value. In this fix
I explicitly add Locale.US to the String.format:
String.format(Locale.US, "%f", value);
Webrev: http://cr.openjdk.java.net/~ddmitriev/8129394/webrev.00/
<http://cr.openjdk.java.net/%7Eddmitriev/8129394/webrev.00/>
JBS: https://bugs.openjdk.java.net/browse/JDK-8129394
Tested: locally ran with different locale - pass with the fix and fail
without fix, JPRT.
Thanks,
Dmitry
More information about the hotspot-dev
mailing list