RFR (XS): 8129394: [TESTBUG] runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java failed with double option
dmitry.dmitriev at oracle.com
Wed Jun 24 12:07:24 UTC 2015
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);
Tested: locally ran with different locale - pass with the fix and fail
without fix, JPRT.
More information about the hotspot-dev