Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.9
-
Labels:None
-
Number of attachments :
Description
The fix revision 554202 was aimed to remove an NPE bug on the returned value of "getJavadocDirectory()" in the method "getSourcePaths " of the file "/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java" , but it is incomplete.
Since the returned value "getJavadocDirectory()" could be null during the runtime execution, its value should also be null-checked before being dereferenced in other methods.
The buggy code locations the same fix needs to be applied at are as bellows:
Line 2401 of the method "copyJavadocResources";
Line 1505 of the method "getSourcePaths".
This is true p.i.t.a. Out of 3 projects on javadoc:fix (v2.8.1)
java.lang.NullPointerException at org.apache.maven.plugin.javadoc.AbstractFixJavadocMojo.writeParamTag(AbstractFixJavadocMojo.java:1994)java.lang.ArrayIndexOutOfBoundsException: 500 at com.thoughtworks.qdox.parser.impl.Parser.val_push(Parser.java:142) at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1303) at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999) at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353) at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381) at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377) at org.apache.maven.plugin.javadoc.AbstractFixJavadocMojo.getQdoxClasses(AbstractFixJavadocMojo.java:855)