QDox

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
    06/Jan/09 3:33 PM
    1.0 kB
    Robert Scholte
  2. testcase.java
    23/Feb/08 9:51 AM
    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
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
Hide
Mauro Talevi added a comment -

Applied patch from Robert Scholte.

Show
Mauro Talevi added a comment - Applied patch from Robert Scholte.
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

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: