Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
In HBASE-25983 we tried to build javadoc with JDK11 and finally we end with a NPE.
[ERROR] java.lang.NullPointerException [ERROR] at org.apache.yetus.audience.tools.DocletEnvironmentProcessor$DocEnvImpl.excluded(DocletEnvironmentProcessor.java:60) [ERROR] at org.apache.yetus.audience.tools.DocletEnvironmentProcessor$DocEnvImpl.isIncluded(DocletEnvironmentProcessor.java:50) [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.isIncluded(Utils.java:2685) [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter.getModuleLink(HtmlDocletWriter.java:629) [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.ClassWriterImpl.getHeader(ClassWriterImpl.java:104) [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ClassBuilder.buildClassDoc(ClassBuilder.java:138) [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ClassBuilder.build(ClassBuilder.java:120) [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:263) [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:273) [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:207) [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.run(AbstractDoclet.java:114) [ERROR] at jdk.javadoc/jdk.javadoc.doclet.StandardDoclet.run(StandardDoclet.java:72) [ERROR] at org.apache.yetus.audience.tools.ExcludePrivateAnnotationsStandardDoclet.run(ExcludePrivateAnnotationsStandardDoclet.java:58) [ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:588) [ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:432) [ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:345) [ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63) [ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
It is this line
private boolean excluded(final Element e) { // Exclude private and limited private types if (e.getAnnotation(InterfaceAudience.Private.class) != null) { // <==== this line return true; } ... }
Seems the Element is null. I checked the code in OpenJDK
It does check whether the Element passed in is null, so I think we should also add null check here.
Attachments
Issue Links
- breaks
-
HBASE-25983 javadoc generation fails on openjdk-11.0.11+9
- Resolved
- links to