JavaNCSS
  1. JavaNCSS
  2. JAVANCSS-51

net.sourceforge.cobertura.javancss.parser.ParseException thrown when parsing class

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 33.54
    • Number of attachments :
      1

      Description

      We're using cobertura-maven-plugin version 2.5.1. and get the following error when processing a java file generated by querydsl (see attached):

      [ERROR] net.sourceforge.cobertura.javancss.parser.ParseException: Encountered " ">" "> "" at line 30, column 93.
      Was expecting one of:
          "[" ...
          ";" ...
          "," ...
          "=" ...
          
      	at net.sourceforge.cobertura.javancss.parser.JavaParser.generateParseException(JavaParser.java:10296)
      	at net.sourceforge.cobertura.javancss.parser.JavaParser.jj_consume_token(JavaParser.java:10172)
      	at net.sourceforge.cobertura.javancss.parser.JavaParser.FieldDeclaration(JavaParser.java:1719)
      	at net.sourceforge.cobertura.javancss.parser.JavaParser.ClassBodyDeclaration(JavaParser.java:1114)
      	at net.sourceforge.cobertura.javancss.parser.JavaParser.ClassBody(JavaParser.java:941)
      	at net.sourceforge.cobertura.javancss.parser.JavaParser.UnmodifiedClassDeclaration(JavaParser.java:854)
      	at net.sourceforge.cobertura.javancss.parser.JavaParser.ClassDeclaration(JavaParser.java:761)
      	at net.sourceforge.cobertura.javancss.parser.JavaParser.TypeDeclaration(JavaParser.java:608)
      	at net.sourceforge.cobertura.javancss.parser.JavaParser.CompilationUnit(JavaParser.java:353)
      	at net.sourceforge.cobertura.javancss.parser.JavaParser.parse(JavaParser.java:137)
      	at net.sourceforge.cobertura.javancss.Javancss._measureSource(Javancss.java:256)
      	at net.sourceforge.cobertura.javancss.Javancss._measureRoot(Javancss.java:339)
      	at net.sourceforge.cobertura.javancss.Javancss.<init>(Javancss.java:419)
      	at net.sourceforge.cobertura.reporting.ComplexityCalculator.getAccumlatedCCNForSource(ComplexityCalculator.java:102)
      	at net.sourceforge.cobertura.reporting.ComplexityCalculator.getAccumlatedCCNForSingleFile(ComplexityCalculator.java:139)
      	at net.sourceforge.cobertura.reporting.ComplexityCalculator.getCCNForSourceFileNameInternal(ComplexityCalculator.java:224)
      	at net.sourceforge.cobertura.reporting.ComplexityCalculator.getCCNForPackageInternal(ComplexityCalculator.java:194)
      	at net.sourceforge.cobertura.reporting.ComplexityCalculator.getCCNForProject(ComplexityCalculator.java:164)
      	at net.sourceforge.cobertura.reporting.html.HTMLReport.generateTableRowForTotal(HTMLReport.java:704)
      	at net.sourceforge.cobertura.reporting.html.HTMLReport.generateOverview(HTMLReport.java:336)
      	at net.sourceforge.cobertura.reporting.html.HTMLReport.generateOverviews(HTMLReport.java:271)
      	at net.sourceforge.cobertura.reporting.html.HTMLReport.<init>(HTMLReport.java:96)
      	at net.sourceforge.cobertura.reporting.Main.parseArguments(Main.java:105)
      	at net.sourceforge.cobertura.reporting.Main.main(Main.java:174)

      line 30 corresponds to

          public final SetPath<AccessRight, QAccessRight> rights = this.<AccessRight, QAccessRight>createSet("rights", AccessRight.class, QAccessRight.class);
      1. QUserRole.java
        1 kB
        Lefteris Laskaridis

        Issue Links

          Activity

          Hide
          jieryn added a comment -

          JAVANCSS-53 is a duplicate of this bug

          Show
          jieryn added a comment - JAVANCSS-53 is a duplicate of this bug
          Hide
          Zdenek Zikan added a comment -

          Ping. Any progress here? Java 7 has been here for a while.

          Show
          Zdenek Zikan added a comment - Ping. Any progress here? Java 7 has been here for a while.
          Hide
          Herve Boutemy added a comment -

          fixed in r233

          Show
          Herve Boutemy added a comment - fixed in r233

            People

            • Assignee:
              Peter Kofler
              Reporter:
              Lefteris Laskaridis
            • Votes:
              7 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: