Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-beta-2
-
Fix Version/s: 2.0
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
the following code segment cannot be parsed correctly:
public int myMethod()
{
int i = 1;
@SuppressWarnings("unused")
int notUsedVariable = 2;
return i;
}
leads to following error:
Encountered "@ SuppressWarnings ( \"unused\" ) int notUsedVariable =" at line xxx, column yyy.
Was expecting one of:
"assert" ...
"boolean" ...
"byte" ...
"char" ...
"double" ...
"enum" ...
"final" ...
"float" ...
"int" ...
"long" ...
"short" ...
...
"public" ...
"static" ...
"protected" ...
"private" ...
"abstract" ...
"synchronized" ...
"native" ...
"transient" ...
"volatile" ...
"strictfp" ...
"@" "enum" ...
"@" "." ...
"@" "(" ...
"@" "(" ")" ...
"@" "(" "@" ...
"@" "(" "{" ...
"@" "(" "+" ...
"@" "(" "-" ...
"@" "(" "++" ...
"@" "(" "--" ...
"@" "(" "~" ...
"@" "(" "!" ...
"@" "(" "(" ...
"@" "(" ...
"@" "(" ...
"@" "(" ...
"@" "(" "." ...
"@" "(" "[" ...
"@" "(" "(" ...
"@" "(" "++" ...
"@" "(" "--" ...
"@" "(" "*" ...
"@" "(" "/" ...
"@" "(" "%" ...
"@" "(" "+" ...
"@" "(" "-" ...
"@" "(" "<<" ...
"@" "(" ">>" ...
"@" "(" ">>>" ...
"@" "(" "<" ...
"@" "(" ">" ...
"@" "(" "<=" ...
"@" "(" ">=" ...
"@" "(" "instanceof" ...
"@" "(" "==" ...
"@" "(" "!=" ...
"@" "(" "&" ...
"@" "(" "^" ...
"@" "(" "|" ...
"@" "(" "&&" ...
"@" "(" "||" ...
"@" "(" "?" ...
"@" "(" ")" "public" ...
"@" "(" ")" "static" ...
"@" "(" ")" "protected" ...
"@" "(" ")" "private" ...
"@" "(" ")" "final" ...
"@" "(" ")" "abstract" ...
"@" "(" ")" "synchronized" ...
"@" "(" ")" "native" ...
"@" "(" ")" "transient" ...
"@" "(" ")" "volatile" ...
"@" "(" ")" "strictfp" ...
"@" "(" ")" "@" ...
"@" "(" ")" "boolean" ...
"@" "(" ")" "char" ...
"@" "(" ")" "byte" ...
"@" "(" ")" "short" ...
"@" "(" ")" "int" ...
"@" "(" ")" "long" ...
"@" "(" ")" "float" ...
"@" "(" ")" "double" ...
"@" "(" ")" "enum" ...
"@" "(" ")" "." ...
"@" "(" ")" "<" ...
"@" "(" ")" "[" ...
"@" "(" ")" "enum" ...
"@" "(" ")" ";" ...
"@" "(" ")" "=" ...
Attachments
Issue Links
| This issue is related to: | ||||
| MJNCSS-28 | Integrate JavaNCSS Version 29.50 |
|
|
|
| This issue depends upon: | ||||
| JAVANCSS-4 | Can not parse interfaces which contain annotations |
|
|
|
Thanks for the report.
Unfortunatly, as of today, we can't do much since the problem lies within javancss core library, beside sending a bug report to the original author of javancss : http://www.kclee.de/clemens/java/javancss/
Btw we are using the latest available version of it (28.49).