Details
Description
The problem looks like the parser doesn't like dealing with multiple anonymous classes from the same interface.
The release 2.2 of the maven-plugin-plugin transitively depends on qdox 1.6.1 which isn't capable anymore of parsing a class that qdox 1.5 used to be able to parse.
Look at the Mojo webstart-maven-plugin. In JnlpMojo I have 2 inner classes implementing the java.io.FileFilter class.
private FileFilter modifiedFileFilter = new FileFilter()
{
};
private FileFilter jarFileFilter = new FileFilter()
{
}
The parser fails in the second:
com.thoughtworks.qdox.parser.ParseException: syntax error @[336,55] in file:/home/jerome/Projects/OSS/m2/mojo-https/trunk/mojo/webstart-maven-plugin/plugin/src/main/java/org/codehaus/mojo/webstart/JnlpMojo.java
at com.thoughtworks.qdox.parser.impl.Parser.yyerror(Parser.java:638)
at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:747)
at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:619)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:300)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:316)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:312)
at com.thoughtworks.qdox.JavaDocBuilder$1.visitFile(JavaDocBuilder.java:369)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:43)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
If I remplace the first anonymous class with an inner class, the problem disappears.
PS: please release qdox 1.6 and 1.6.1 in Jira so that this issue can be edited to the appropriate "affects Version/s" ids.
Issue Links
- is depended upon by
-
MPLUGIN-26 Parsing issue due to qdox regression
-
MDOCCK-12 @Override let QDOX fail for this plugin
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue is depended upon by |
Affects Version/s | 1.6.1 [ 14090 ] |
Resolution | Fixed [ 1 ] | |
Fix Version/s | 1.6.2 [ 14091 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
I tried the JnlpMojo file with qdox 1.6.1 and it fails. Switching to 1.6.2, it successfully parses the file.