RFR (XS): 8129394: [TESTBUG] runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java failed with double option

David Holmes david.holmes at oracle.com
Wed Jun 24 21:43:28 UTC 2015

Hi Dmitry,

On 24/06/2015 10:07 PM, Dmitry Dmitriev wrote:
> 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.

Looks good. As this is a trivial test fix a single Review suffices. I 
will push this with your other change.


> Thanks,
> Dmitry

More information about the hotspot-dev mailing list