Skip to content

wrong lineNumber in DetailAST for class with annotation #54

Closed
romani opened this Issue Nov 12, 2013 · 2 comments

2 participants

@romani
Checkstyle member
romani commented Nov 12, 2013

Code:
Created: 2009-07-14
Creator: superbonbon
SF issue: 581

package src;

@SomeTestAnnotations({ @SomeTestAnnotation(key = "foo"),
        @SomeTestAnnotation(key = "bar") })
/* {@inheritDoc} */
public class MyGenericClassBad {
}

Picture of DetailAST:
screenshotast

detected: lineNumber=3.
expected: lineNumber for class have to be real - 6,

@isopov
isopov commented Nov 12, 2013

Why on screenshot the line is correct 6?

@romani
Checkstyle member
romani commented Nov 12, 2013

Hmm, you are right, class IDENT in line 6, Looks like annotation is treated as part of Class definition - that is true.
So other have to keep this in mind.

Issue is closed, not a bug.

@romani romani closed this Nov 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.