Locale dependency of JMH, div by 0 in ListStatistics
Aleksey Shipilev
aleksey.shipilev at oracle.com
Mon Dec 22 15:09:22 UTC 2014
On 12/22/2014 05:20 PM, Aleksey Shipilev wrote:
>>> 1. Running JMH in a different locale prevents it from reporting its
>>> version number.
>>> I'm using the maven version (1.4) which apparently was built with C
>>> locale. But SimpleDateFormat defaults to using the system locale, and
>>> thus fails to parse the locale-depedant timestamp format that was
>>> used.
>>>
>>> IMHO the cleanest way is to use a non-locale timestamp, such as RFC 3339.
>>
>> https://bugs.openjdk.java.net/browse/CODETOOLS-7901226
Um. I am trying to understand this bug. Our build emits the timestamp in
a preset format:
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>EEE MMM dd HH:mm:ss zzz
yyyy</maven.build.timestamp.format>
...and Java code picks up the timestamp in the same format:
Date parse = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz
yyyy").parse(time);
Does this mean Erich's Maven ignores maven.build.timestamp.format?
Erich, can you show the run log?
Thanks,
-Aleksey.
More information about the jmh-dev
mailing list