Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.3, 1.4
-
Fix Version/s: 1.9
-
Component/s: Maven Plugin, Squid
-
Labels:None
-
Number of attachments :
Description
Thanks to Wojciech Durczynski who detected this issue. The following code can not be parsed by javancss 29.50 :
package xxx; public interface InterfaceWithAnnotation { @Deprecated public static final String MY_PARAM = "param"; }
The error is
Embedded error: An error has occurred in JavaNCSS Report report generation. Encountered "public static final String MY_PARAM =" at line 6, column 3. Was expecting one of: "boolean" ... "byte" ... "char" ... "double" ... "float" ... "int" ... "long" ... "short" ... "@" ... "." ... "(" ... "public" "public" ... "public" "static" "public" ... "public" "static" "static" ... "public" "static" "protected" ... "public" "static" "private" ... "public" "static" "final" "public" ... "public" "static" "final" "static" ... "public" "static" "final" "protected" ... "public" "static" "final" "private" ... "public" "static" "final" "final" ... "public" "static" "final" "abstract" ... "public" "static" "final" "synchronized" ... "public" "static" "final" "native" ... "public" "static" "final" "transient" ... "public" "static" "final" "volatile" ... "public" "static" "final" "strictfp" ... "public" "static" "final" "@" ... "public" "static" "final" "enum" ... "public" "protected" ... "public" "private" ... "public" "static" "abstract" ... "public" "static" "final" "<" ... "public" "static" "final" "void" ... "public" "static" "final" "boolean" ... "public" "static" "final" "char" ... "public" "static" "final" "byte" ... "public" "static" "final" "short" ... "public" "static" "final" "int" ... "public" "static" "final" "long" ... "public" "static" "final" "float" ... "public" "static" "final" "double" ... "public" "static" "final" <IDENTIFIER> "<" ... "public" "static" "final" <IDENTIFIER> "." ... "public" "static" "final" <IDENTIFIER> "[" ... "public" "static" "final" <IDENTIFIER> <IDENTIFIER> "(" ... <IDENTIFIER> ...
Issue Links
- depends upon
-
JAVANCSS-4
Can not parse interfaces which contain annotations
-
-
SONAR-765
Integrate the new Sonar-Squid core engine (JavaNCSS)
-
- is duplicated by
-
SONAR-352
Cannot execute the command org.codehaus.mojo:javancss-maven-plugin:2.0-beta-2:report
-
Is there a workaround for this?