javadoc crash on JDK 11 caused by @SuppressWarnings annotations
Rick Hillegas
rick.hillegas at gmail.com
Wed Jun 16 16:45:37 UTC 2021
I work on Apache Derby. Derby is one of the applications which receive
advance notice of new Open JDK distributions. We then build our
application with the new JDK's javac and javadoc tools and we run our
full test suite against the new JVM. As a canary in the mineshaft, we
noticed the following significant disruption.
When I tried to build Derby with the Rampdown Phase One build of open
JDK 17 (17-ea+26-2439), I saw many warnings related to the deprecation
of Security Manager classes and methods, undoubtedly the consequence of
JEP 411 (https://openjdk.java.net/jeps/411). In a
security-dev at openjdk.java.net email thread titled "blizzard of
deprecation warnings related to JEP 411", Alan Bateman recommended that
we decorate the warned usages with @SuppressWarnings("removal")
annotations, as the Open JDK's own code does. That does silence the
warnings. I can then cleanly build the Derby javadoc using 17-ea+26-2439.
However, when I run javadoc on the annotated code using OpenJDK Runtime
Environment 18.9 (build 11+28), the JDK 11 javadoc tool dies with the
following stack trace:
[javadoc] javadoc: error - An internal exception has occurred.
[javadoc] (java.lang.OutOfMemoryError: Java heap space)
[javadoc] Please file a bug against the javadoc tool via the Java bug
reporting page
[javadoc] (http://bugreport.java.com) after checking the Bug Database
(http://bugs.java.com)
[javadoc] for duplicates. Include error messages and the following
diagnostic in your report. Thank you.
[javadoc] java.lang.OutOfMemoryError: Java heap space
[javadoc] at java.base/java.util.Arrays.copyOf(Arrays.java:3745)
[javadoc] at
java.base/java.lang.StringCoding.encodeUTF8(StringCoding.java:888)
[javadoc] at
java.base/java.lang.StringCoding.encode(StringCoding.java:489)
[javadoc] at java.base/java.lang.String.getBytes(String.java:981)
[javadoc] at
jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.AbstractIndexWriter.createSearchIndexFile(AbstractIndexWriter.java:501)
[javadoc] at
jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.AbstractIndexWriter.createSearchIndexFiles(AbstractIndexWriter.java:456)
[javadoc] at
jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.SingleIndexWriter.generateIndexFile(SingleIndexWriter.java:133)
[javadoc] at
jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.SingleIndexWriter.generate(SingleIndexWriter.java:85)
[javadoc] at
jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:147)
[javadoc] at
jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:213)
[javadoc] at
jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.run(AbstractDoclet.java:114)
[javadoc] at
jdk.javadoc/jdk.javadoc.doclet.StandardDoclet.run(StandardDoclet.java:72)
[javadoc] at
jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:582)
[javadoc] at
jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:431)
[javadoc] at
jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:344)
[javadoc] at
jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
[javadoc] at
jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
Is this a known problem with a known mitigation or should I file a
javadoc bug for this?
Thanks,
-Rick
More information about the javadoc-dev
mailing list