#11 @Override annotation causes exception

open
nobody
None
5
2005-10-12
2005-10-12
Bo Skjoett
No

I have a Java class with this method:

@Override
public String toString()
{
return name;
}

The JDK 1.5 annotation @Override causes this
checkstyle error:

IdString.java[74]: Got an exception - unexpected
char: '@'

I thought the latest nbCheckstyle 4.0 supports JDK 1.5
annotations, but apparently there is still some
problems. Is this @Override exception a known bug?

Best regards
Bo

Discussion

  • Logged In: NO

    it doesn't because checkstyle-all3.5.jar is included instead
    of *-4.0. if you replace the 3.5 with the renamed 4.0 it works