java annotations (within a method) cannot be parsed correctly
-------------------------------------------------------------

                 Key: MJNCSS-16
                 URL: http://jira.codehaus.org/browse/MJNCSS-16
             Project: Maven 2.x JavaNCSS Plugin
          Issue Type: Bug
    Affects Versions: 2.0-beta-2
            Reporter: Roman Cerny
            Assignee: Jean-Laurent de Morlhon
             Fix For: 2.0-beta-3


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" ...
    "@"  "("  ")"   ";" ...
    "@"  "("  ")"   "=" ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to