Details
Description
I got a ParseException from qdox when building a maven plugin project. After some searching and fiddling, I believe to have isolated a bug in qdox v1.6.1. It seems to having trouble with parsing annotations for enum constants that are also documented using javadoc syntax.
This code generates the ParserException:
TestEnum.java
public enum TestEnum { /** * Blah blah */ @MyAnno TEST; }
and the stacktrace (got from running from a standalone test program):
Exception in thread "main" com.thoughtworks.qdox.parser.ParseException: syntax error @[6,5] in UNKNOWN SOURCE 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:290) at Tester.main(Tester.java:13)
The syntax error is a the start of the annotation.
I have attached a JUnit testcase that reproduces the error. Make sure to include qdox v1.6.1 on classpath. Hope I got all covered now
Activity
Robert Scholte
made changes -
Field | Original Value | New Value |
---|---|---|
Assignee | Robert Scholte [ rfscholte ] | |
Resolution | Fixed [ 1 ] | |
Fix Version/s | 1.10 [ 15020 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Paul Hammant
made changes -
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Reopened [ 4 ] |
Paul Hammant
made changes -
Fix Version/s | 1.9.1 [ 15252 ] | |
Fix Version/s | 1.10 [ 15020 ] | |
Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Closed [ 6 ] |
Bug still present in release 1.6.2
Also tried snapshot 1.7-20070515.134713-1 with no luck.