Issue Details (XML | Word | Printable)

Key: QDOX-135
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Louis R. Marascio
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QDox

Annotation with value in method signature does not parse

Created: 23/Feb/08 09:51 AM   Updated: 14/Jan/09 12:15 PM   Resolved: 06/Jan/09 04:28 PM
Component/s: Parser
Affects Version/s: 1.7
Fix Version/s: 1.8

Time Tracking:
Not Specified

File Attachments: 1. Text File Qdox-135.patch (1.0 kB)
2. Java Source File testcase.java (0.4 kB)


Testcase included: yes


 Description  « Hide

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.



Paul Hammant added a comment - 06/Jul/08 01:37 PM

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


Robert Scholte added a comment - 06/Jan/09 03:33 PM

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


Mauro Talevi added a comment - 06/Jan/09 04:28 PM

Applied patch from Robert Scholte.


Robert Scholte added a comment - 14/Jan/09 12:15 PM

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.