[
http://jira.codehaus.org/browse/QDOX-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Scholte closed QDOX-118.
-------------------------------
Assignee: Robert Scholte
Resolution: Fixed
Fix Version/s: 1.10
Bug fixed. Also added a test to EnumsModelTest based on the provided case
> Annotation parsing fails on enum constant when javadoc present
> --------------------------------------------------------------
>
> Key: QDOX-118
> URL: http://jira.codehaus.org/browse/QDOX-118
> Project: QDox
> Issue Type: Bug
> Components: Parser
> Affects Versions: 1.6
> Environment: Java 1.5.0_07 on Windows XP
> Reporter: Rune Flobakk
> Assignee: Robert Scholte
> Fix For: 1.10
>
> Attachments: qdox-anno-bug.zip
>
>
> 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:
> {code:title=TestEnum.java|borderStyle=solid}
> public enum TestEnum
> {
> /**
> * Blah blah
> */
> @MyAnno
> TEST;
> }
> {code}
> and the stacktrace (got from running from a standalone test program):
> {noformat}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){noformat}
> 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 :)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email