GNOME Bugzilla – Bug 594391
Fully-qualified Java annotations break parser
Last modified: 2009-12-30 13:38:55 UTC
The usage of fully qualified Java annotations causes Doxygen not to recognize class and method definitions. In this example, a class is annotated with a fully qualified FindBugs @SuppressWarnings annotation: /** * This is the Foo class. */ @edu.umd.cs.findbugs.annotations.SuppressWarnings ("HE_EQUALS_USE_HASHCODE") public class Foo { // ... } This is not recognized by Doxygen as a class. If the annotation is removed or commented out, then it is correctly recognized as a class. In this example, a method is annotated with a fully qualified FindBugs @SuppressWarnings annotation: /** * This is the bar method. */ @edu.umd.cs.findbugs.annotations.SuppressWarnings ("DLS_DEAD_LOCAL_STORE") public void bar() { // ... } This is misinterpreted by Doxygen as a method named 'SuppressWarnings' with an argument list consisting of '"DLS_DEAD_LOCAL_STORE"' and a return type of '.umd.cs.findbugs.annotations.'. If the annotation is removed or commented out, then it is correctly recognized as a method named 'bar' with an empty argument list and a return type of 'void'. Using just the annotation name without fully qualifying it is not an option for a workaround, since this would cause the FindBugs @SuppressWarnings annotation [edu.umd.cs.findbugs.annotations.SuppressWarnings] to conflict with the JDK @SuppressWarnings annotation [java.lang.SuppressWarnings].
Confirmed. If you want to fix it already look for <FindMembers>"@"{ID}{BN}*"(" { in scanner.l and replace it by <FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.6.2. Please verify if this is indeed the case and reopen the bug if you think it is not fixed (include any additional information that you think can be relevant).