Details
Description
Nested annotations like tho following example do not work in QDOX:
@MojoParameters( { @MojoParameter( goals = "goal4a", defaultValue = "Something" ),
@MojoParameter( goals =
, defaultValue = "Else" ) } )
(now what are we trying to do with these annotations
This has to reasons:
1. ModelBuilder.buildAnnotation does not convert the annotation values correctly. A single AnnoDef is converted to Annotation, but Lists of AnnoDefs are not.
The attached patch fixes this by converting AnnoDef in Lists, too
2. The parser keeps the values is has parsed in a property ("annoValues"). However, the grammar allows recursive invocation of annoElementValue (annoElementValue -> annotationWork -> annoParens -> annoParenContents -> annoElementValue). Thus the values are not collected correctly and the resulting parse tree is broken.
The attached patch fixes this by collecting values in a new field tempValues in the current AnnoDef, thus allowing recursive invocation.
Issue Links
- is superceded by
-
QDOX-126 Improved annotation support including types, fields and expressions
Activity
Field | Original Value | New Value |
---|---|---|
Attachment | qdox-QDOX-122.patch.txt [ 28076 ] |
Status | Open [ 1 ] | Closed [ 6 ] |
Fix Version/s | 1.7 [ 11160 ] | |
Resolution | Duplicate [ 3 ] |
The
QDOX-126patch makes this one obsolete