Issue Type: Bug Bug
Affects Versions: 2.0
Assignee: Unassigned
Components: Parser
Created: 17/Oct/12 9:40 PM
Description:

QDox parser cannot will throw following exception when encounter annotation element value in double literal:

com.thoughtworks.qdox.parser.ParseException: syntax error @[971,96]
	at com.thoughtworks.qdox.parser.impl.Parser.yyerror(Parser.java:1594) ~[classes/:na]
	at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1716) ~[classes/:na]
	at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:1575) ~[classes/:na]
	at com.thoughtworks.qdox.library.SourceLibrary.parse(SourceLibrary.java:205) ~[classes/:na]
	at com.thoughtworks.qdox.library.SourceLibrary.parse(SourceLibrary.java:162) ~[classes/:na]
	at com.thoughtworks.qdox.library.SourceLibrary.addSource(SourceLibrary.java:91) ~[classes/:na]
	at com.thoughtworks.qdox.library.SourceLibrary.addSource(SourceLibrary.java:86) ~[classes/:na]
	at com.thoughtworks.qdox.library.SortedClassLibraryBuilder.addSource(SortedClassLibraryBuilder.java:161) ~[classes/:na]
	at com.thoughtworks.qdox.JavaProjectBuilder.addSource(JavaProjectBuilder.java:173) ~[classes/:na]
	at gov.fia.tools.releaser.core.item.internal.QDoxUtils.loadJavaClass(QDoxUtils.java:66) ~[classes/:na]
	at gov.fia.tools.releaser.core.item.JavaItem.readMetadata(JavaItem.java:51) ~[classes/:na]
	... 16 common frames omitted


Following is our code clip, the delta = 0.005 crashes QDox, while delta = 0.5 or delta = 0 will be ok:

@Field(id = "04")
    @Rule.List({
        @Rule(code = "★171A021", asserts = "#07 != 0", matches = "#05 * #06 / #07", delta = 0.005,
                precondition = "@stkhAreAddMk == '1' && #07 != 0"),
        @Rule(code = "★171A022", asserts = "#09 != 0", matches = "#08 / #09", delta = 0.005,
                precondition = "@stkhAreAddMk == '2' && #09 != 0"),
        @Rule(code = "★171A023", asserts = "#09 != 0 && #11 != 0", matches = "(#08 / #09) + (#10 / #11)",delta = 0.005,
                precondition = "@stkhAreAddMk == '3' && #09 != 0 && #11 != 0") })
    @Digits(fraction = 0, integer = 14)
    public BigDecimal getStkhAreAdd() {
        return prct049.getStkhAreAdd();
    }
Project: QDox
Priority: Major Major
Reporter: Pei-Tang Huang
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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

Reply via email to