QDox
  1. QDox
  2. QDOX-122

Nested annotations do not work

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7
    • Component/s: Parser
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      Nested annotations like tho following example do not work in QDOX:

      @MojoParameters( { @MojoParameter( goals = "goal4a", defaultValue = "Something" ),
      @MojoParameter( goals =

      { "goal4b", "goal4c" }

      , 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

          Activity

          Jochen Kuhnle made changes -
          Field Original Value New Value
          Attachment qdox-QDOX-122.patch.txt [ 28076 ]
          Hide
          Jochen Kuhnle added a comment -

          The QDOX-126 patch makes this one obsolete

          Show
          Jochen Kuhnle added a comment - The QDOX-126 patch makes this one obsolete
          Dennis Lundberg made changes -
          Link This issue is superceded by QDOX-126 [ QDOX-126 ]
          Dennis Lundberg made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 1.7 [ 11160 ]
          Resolution Duplicate [ 3 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Jochen Kuhnle
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: