Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27544

Underscores in Floats

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • cobertura-plugin
    • None
    • Jenkins ver. 1.570

      If in a java source file a float literal is written with underscores like "12_000.0f", the jenkins build fails because Corbertura throws an exception:

      net.sourceforge.cobertura.javancss.parser.ParseException: Encountered " <FLOATING_POINT_LITERAL> ".0f "" at line 90, column 111.
      Was expecting one of:
      "instanceof" ...
      ")" ...
      "," ...
      "=" ...
      ">" ...
      "<" ...
      "?" ...
      "==" ...
      "<=" ...
      ">=" ...
      "!=" ...
      "||" ...
      "&&" ...
      "++" ...
      "--" ...
      "+" ...
      "-" ...
      "*" ...
      "/" ...
      "&" ...
      "|" ...
      "^" ...
      "%" ...
      "+=" ...
      "-=" ...
      "*=" ...
      "/=" ...
      "&=" ...
      "|=" ...
      "^=" ...
      "%=" ...
      "<<=" ...
      ">>=" ...
      ">>>=" ...
      ">" ...

      at net.sourceforge.cobertura.javancss.parser.JavaParser.generateParseException(JavaParser.java:11869)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.jj_consume_token(JavaParser.java:11730)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.Arguments(JavaParser.java:3539)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.PrimarySuffix(JavaParser.java:3434)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.PrimaryExpression(JavaParser.java:3307)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.PostfixExpression(JavaParser.java:3254)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.UnaryExpressionNotPlusMinus(JavaParser.java:3162)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.UnaryExpression(JavaParser.java:3096)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.MultiplicativeExpression(JavaParser.java:3016)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.AdditiveExpression(JavaParser.java:2988)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.ShiftExpression(JavaParser.java:2955)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.RelationalExpression(JavaParser.java:2919)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.InstanceOfExpression(JavaParser.java:2906)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.AssigmentExpression(JavaParser.java:2889)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.EqualityExpression(JavaParser.java:2817)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.AndExpression(JavaParser.java:2792)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.ExclusiveOrExpression(JavaParser.java:2776)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.InclusiveOrExpression(JavaParser.java:2760)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.ConditionalAndExpression(JavaParser.java:2743)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.ConditionalOrExpression(JavaParser.java:2726)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.ConditionalExpression(JavaParser.java:2710)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.Expression(JavaParser.java:2654)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.VariableInitializer(JavaParser.java:1697)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.VariableDeclarator(JavaParser.java:1626)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.LocalVariableDeclaration(JavaParser.java:3941)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.BlockStatement(JavaParser.java:3862)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.Block(JavaParser.java:3855)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.Statement(JavaParser.java:3684)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.ForStatement(JavaParser.java:4370)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.Statement(JavaParser.java:3735)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.BlockStatement(JavaParser.java:3906)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.Block(JavaParser.java:3855)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.Statement(JavaParser.java:3684)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.ForStatement(JavaParser.java:4370)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.Statement(JavaParser.java:3735)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.BlockStatement(JavaParser.java:3906)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.Block(JavaParser.java:3855)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.MethodDeclaration(JavaParser.java:1933)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.ClassBodyDeclaration(JavaParser.java:1012)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.ClassBody(JavaParser.java:874)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.UnmodifiedClassDeclaration(JavaParser.java:801)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.ClassDeclaration(JavaParser.java:706)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.TypeDeclaration(JavaParser.java:555)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.CompilationUnit(JavaParser.java:303)
      at net.sourceforge.cobertura.javancss.parser.JavaParser.parse(JavaParser.java:100)
      at net.sourceforge.cobertura.javancss.Javancss._measureSource(Javancss.java:192)
      at net.sourceforge.cobertura.javancss.Javancss._measureRoot(Javancss.java:268)
      at net.sourceforge.cobertura.javancss.Javancss.<init>(Javancss.java:346)
      at net.sourceforge.cobertura.reporting.ComplexityCalculator.getAccumlatedCCNForSource(ComplexityCalculator.java:105)
      at net.sourceforge.cobertura.reporting.ComplexityCalculator.getAccumlatedCCNForSingleFile(ComplexityCalculator.java:143)
      at net.sourceforge.cobertura.reporting.ComplexityCalculator.getCCNForSourceFileNameInternal(ComplexityCalculator.java:234)
      at net.sourceforge.cobertura.reporting.ComplexityCalculator.getCCNForPackageInternal(ComplexityCalculator.java:201)
      at net.sourceforge.cobertura.reporting.ComplexityCalculator.getCCNForProject(ComplexityCalculator.java:167)
      at net.sourceforge.cobertura.reporting.html.HTMLReport.generateTableRowForTotal(HTMLReport.java:603)
      at net.sourceforge.cobertura.reporting.html.HTMLReport.generateOverview(HTMLReport.java:287)
      at net.sourceforge.cobertura.reporting.html.HTMLReport.generateOverviews(HTMLReport.java:228)
      at net.sourceforge.cobertura.reporting.html.HTMLReport.<init>(HTMLReport.java:71)
      at net.sourceforge.cobertura.reporting.Main.parseArguments(Main.java:103)
      at net.sourceforge.cobertura.reporting.Main.main(Main.java:169)

            Unassigned Unassigned
            n4n0basti Basti Funck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: