JavaNCSS
  1. JavaNCSS
  2. JAVANCSS-4

Can not parse interfaces which contain annotations

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 31.52
    • Labels:
      None
    • Environment:
      javancss 29.50
    • Number of attachments :
      1

      Description

      The following code

      public interface InterfaceWithAnnotation {
        @Deprecated
        public static final String MY_PARAM = "param";
      }
      

      causes the error :

      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

          Activity

          Jean-Laurent de Morlhon made changes -
          Field Original Value New Value
          Link This issue is depended upon by MJNCSS-16 [ MJNCSS-16 ]
          Simon Brandhof made changes -
          Link This issue is depended upon by SONAR-312 [ SONAR-312 ]
          Andrew McDowell made changes -
          Attachment JAVANCSS-4.patch [ 41203 ]
          Clemens Lee made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 31.52 [ 14978 ]
          Assignee Clemens Lee [ clemens.lee ]
          Resolution Fixed [ 1 ]
          Herve Boutemy made changes -
          Link This issue is depended upon by MJNCSS-34 [ MJNCSS-34 ]
          Herve Boutemy made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Clemens Lee
              Reporter:
              Simon Brandhof
            • Votes:
              15 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: