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 ![]()
Bug still present in release 1.6.2
Also tried snapshot 1.7-20070515.134713-1 with no luck.