RFR: JDK-8223536 jdk/javadoc/doclet/MetaTag/MetaTag.java still fails when run across midnight
Roger.Riggs at oracle.com
Wed Jan 15 14:38:12 UTC 2020
A bold suggestion is to switch to using java.time and move on from the
On 1/14/20 7:23 PM, Jonathan Gibbons wrote:
> Please review a fix for a problem that occurs when a test is run
> across midnight.
> Although it is difficult to confirm the root cause, and equally
> difficult to test, the root cause is believed to be a static final
> instance of java.util.Calendar that is used to obtain the date written
> into the generated files, and which is subsequently verified by tests.
> When javadoc is run multiple times in the same JVM, as will occur when
> running the MetaTag.java test, the static final Calendar may be
> initialized to a time that is outside the range checked by the test.
> The fix is to replace the static instance by a non-static instance
> created in HtmlConfiguration.
> The fix is noreg-hard, because it can only be fully tested by running
> within milliseconds of midnight. It's remarkable that this has
> actually occurred multiple times in productio build/test runs.
> -- Jon
> JBS: https://bugs.openjdk.java.net/browse/JDK-8223536
> Webrev: http://cr.openjdk.java.net/~jjg/8223536/webrev/
More information about the javadoc-dev