RFR (S): 7155168: java/util/TimeZone/Bug6912560.java: expected Asia/Tokyo
David Holmes
david.holmes at oracle.com
Tue Nov 27 10:45:26 UTC 2012
Hi Staffan,
On 27/11/2012 8:22 PM, Staffan Larsen wrote:
> Please review this fix for the java/util/TimeZone/Bug6912560.java test.
>
> The problem with the test is that it fails when running with Java Flight Recorder enabled. This is because JFR will call TimeZone.getDefault() when it starts up, before the main() method is called. This will cause TimeZone to cache the value so that when the test calls TimeZone.getDefault() it will get the old value. The solution here is to reset the value in the beginning of the test.
>
> Webrev: http://cr.openjdk.java.net/~sla/7155168/webrev.00/test/java/util/TimeZone/Bug6912560.java.sdiff.html
The change to the test seems reasonable.
But I can't help but think that this behaviour of JFR will cause
problems for real applications that expect to be first to access the
timezone. Perhaps JFR should reset the timezone after it grabs a copy?
David
-----
> Thanks,
> /Staffan
More information about the core-libs-dev
mailing list