QDox
  1. QDox
  2. QDOX-135

Annotation with value in method signature does not parse

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8
    • Component/s: Parser
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      2

      Description

      If an annotation is present in a method signature a parse error occurs:

      class X {
      void Y(@SomeAnno("hi") int a) { }
      }

      test case is attached.

      1. Qdox-135.patch
        1.0 kB
        Robert Scholte
      2. testcase.java
        0.4 kB
        Louis R. Marascio

        Activity

        Hide
        Paul Hammant added a comment -

        I've added the test as failing to AnnotationsModelTest. I think the @X() annotation before the method does not affect the test

        Show
        Paul Hammant added a comment - I've added the test as failing to AnnotationsModelTest. I think the @X() annotation before the method does not affect the test
        Paul Hammant made changes -
        Field Original Value New Value
        Fix Version/s 1.7 [ 11160 ]
        Fix Version/s 1.8 [ 14826 ]
        Hide
        Robert Scholte added a comment -

        the lexer was comparing nestingDepth and classDepth, but that does'n't work in this case. So I introduced annotationDepth to hold its state

        Show
        Robert Scholte added a comment - the lexer was comparing nestingDepth and classDepth, but that does'n't work in this case. So I introduced annotationDepth to hold its state
        Robert Scholte made changes -
        Attachment Qdox-135.patch [ 39200 ]
        Hide
        Mauro Talevi added a comment -

        Applied patch from Robert Scholte.

        Show
        Mauro Talevi added a comment - Applied patch from Robert Scholte.
        Mauro Talevi made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hide
        Robert Scholte added a comment -

        AnnotationsModelTest contains corresponding test, which hasn't been activated yet. Final assertEquals should be removed since the test doesn't contain the X-annotation anymore.

        Show
        Robert Scholte added a comment - AnnotationsModelTest contains corresponding test, which hasn't been activated yet. Final assertEquals should be removed since the test doesn't contain the X-annotation anymore.

          People

          • Assignee:
            Unassigned
            Reporter:
            Louis R. Marascio
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: