com.atlassian.clover.api.CloverException: c:\Work\clover-hg\clover-core\src\test\resources\javasyntax1.8\LambdaAndMethodReferences.java:78:28:unexpected token: ArrayList

Atlassian JIRA | Marek Parfianowicz [Atlassian] | 3 years ago
  1. 0

    This works fine: {code:java} myLambda = ArrayList::new; // javac error since JDK8 b114 myLambda = ArrayList::<String>new; {code} But the following: {code:java} myLambda = ArrayList<String>::new; myLambda = ArrayList<String>::<String>new; {code} fails with a parser error: {noformat} ERROR: Instrumentation errorInstrumentation error : c:\Work\clover-hg\clover-core\src\test\resources\javasyntax1.8\LambdaAndMethodReferences.java:78:28:unexpected token: ArrayList com.atlassian.clover.api.CloverException: c:\Work\clover-hg\clover-core\src\test\resources\javasyntax1.8\LambdaAndMethodReferences.java:78:28:unexpected token: ArrayList at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:158) at com.atlassian.clover.CloverInstr.execute(CloverInstr.java:73) at com.atlassian.clover.CloverInstr.mainImpl(CloverInstr.java:49) at com.atlassian.clover.JavaSyntaxCompilationTestBase.instrumentSourceFile(JavaSyntaxCompilationTestBase.java:145) at com.atlassian.clover.JavaSyntaxCompilationTestBase.instrumentAndCompileSourceFile(JavaSyntaxCompilationTestBase.java:111) at com.atlassian.clover.JavaSyntax18CompilationTest.testLambdaAndMethodReferences(JavaSyntax18CompilationTest.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: line 78:28: unexpected token: ArrayList at com.atlassian.clover.instr.java.JavaRecognizer.conditionalExpression(JavaRecognizer.java:4407) at com.atlassian.clover.instr.java.JavaRecognizer.assignmentExpression(JavaRecognizer.java:4274) at com.atlassian.clover.instr.java.JavaRecognizer.assignmentExpression(JavaRecognizer.java:4319) at com.atlassian.clover.instr.java.JavaRecognizer.expression(JavaRecognizer.java:3366) at com.atlassian.clover.instr.java.JavaRecognizer.statement(JavaRecognizer.java:2909) at com.atlassian.clover.instr.java.JavaRecognizer.outerCompoundStmt(JavaRecognizer.java:2696) at com.atlassian.clover.instr.java.JavaRecognizer.field(JavaRecognizer.java:2265) at com.atlassian.clover.instr.java.JavaRecognizer.classBlock(JavaRecognizer.java:1728) at com.atlassian.clover.instr.java.JavaRecognizer.classDefinition(JavaRecognizer.java:736) at com.atlassian.clover.instr.java.JavaRecognizer.typeDefinition2(JavaRecognizer.java:666) at com.atlassian.clover.instr.java.JavaRecognizer.typeDefinition(JavaRecognizer.java:524) at com.atlassian.clover.instr.java.JavaRecognizer.compilationUnit(JavaRecognizer.java:445) at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:212) at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:121) ... 27 more {noformat}

    Atlassian JIRA | 3 years ago | Marek Parfianowicz [Atlassian]
    com.atlassian.clover.api.CloverException: c:\Work\clover-hg\clover-core\src\test\resources\javasyntax1.8\LambdaAndMethodReferences.java:78:28:unexpected token: ArrayList
  2. 0

    This works fine: {code:java} myLambda = ArrayList::new; // javac error since JDK8 b114 myLambda = ArrayList::<String>new; {code} But the following: {code:java} myLambda = ArrayList<String>::new; myLambda = ArrayList<String>::<String>new; {code} fails with a parser error: {noformat} ERROR: Instrumentation errorInstrumentation error : c:\Work\clover-hg\clover-core\src\test\resources\javasyntax1.8\LambdaAndMethodReferences.java:78:28:unexpected token: ArrayList com.atlassian.clover.api.CloverException: c:\Work\clover-hg\clover-core\src\test\resources\javasyntax1.8\LambdaAndMethodReferences.java:78:28:unexpected token: ArrayList at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:158) at com.atlassian.clover.CloverInstr.execute(CloverInstr.java:73) at com.atlassian.clover.CloverInstr.mainImpl(CloverInstr.java:49) at com.atlassian.clover.JavaSyntaxCompilationTestBase.instrumentSourceFile(JavaSyntaxCompilationTestBase.java:145) at com.atlassian.clover.JavaSyntaxCompilationTestBase.instrumentAndCompileSourceFile(JavaSyntaxCompilationTestBase.java:111) at com.atlassian.clover.JavaSyntax18CompilationTest.testLambdaAndMethodReferences(JavaSyntax18CompilationTest.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: line 78:28: unexpected token: ArrayList at com.atlassian.clover.instr.java.JavaRecognizer.conditionalExpression(JavaRecognizer.java:4407) at com.atlassian.clover.instr.java.JavaRecognizer.assignmentExpression(JavaRecognizer.java:4274) at com.atlassian.clover.instr.java.JavaRecognizer.assignmentExpression(JavaRecognizer.java:4319) at com.atlassian.clover.instr.java.JavaRecognizer.expression(JavaRecognizer.java:3366) at com.atlassian.clover.instr.java.JavaRecognizer.statement(JavaRecognizer.java:2909) at com.atlassian.clover.instr.java.JavaRecognizer.outerCompoundStmt(JavaRecognizer.java:2696) at com.atlassian.clover.instr.java.JavaRecognizer.field(JavaRecognizer.java:2265) at com.atlassian.clover.instr.java.JavaRecognizer.classBlock(JavaRecognizer.java:1728) at com.atlassian.clover.instr.java.JavaRecognizer.classDefinition(JavaRecognizer.java:736) at com.atlassian.clover.instr.java.JavaRecognizer.typeDefinition2(JavaRecognizer.java:666) at com.atlassian.clover.instr.java.JavaRecognizer.typeDefinition(JavaRecognizer.java:524) at com.atlassian.clover.instr.java.JavaRecognizer.compilationUnit(JavaRecognizer.java:445) at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:212) at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:121) ... 27 more {noformat}

    Atlassian JIRA | 3 years ago | Marek Parfianowicz [Atlassian]
    com.atlassian.clover.api.CloverException: c:\Work\clover-hg\clover-core\src\test\resources\javasyntax1.8\LambdaAndMethodReferences.java:78:28:unexpected token: ArrayList
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.atlassian.clover.api.CloverException

      c:\Work\clover-hg\clover-core\src\test\resources\javasyntax1.8\LambdaAndMethodReferences.java:78:28:unexpected token: ArrayList

      at com.atlassian.clover.instr.java.Instrumenter.instrument()
    2. com.atlassian.clover
      JavaSyntax18CompilationTest.testLambdaAndMethodReferences
      1. com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:158)
      2. com.atlassian.clover.CloverInstr.execute(CloverInstr.java:73)
      3. com.atlassian.clover.CloverInstr.mainImpl(CloverInstr.java:49)
      4. com.atlassian.clover.JavaSyntaxCompilationTestBase.instrumentSourceFile(JavaSyntaxCompilationTestBase.java:145)
      5. com.atlassian.clover.JavaSyntaxCompilationTestBase.instrumentAndCompileSourceFile(JavaSyntaxCompilationTestBase.java:111)
      6. com.atlassian.clover.JavaSyntax18CompilationTest.testLambdaAndMethodReferences(JavaSyntax18CompilationTest.java:84)
      6 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:483)
      4 frames
    4. JUnit
      JUnitCore.run
      1. junit.framework.TestCase.runTest(TestCase.java:168)
      2. junit.framework.TestCase.runBare(TestCase.java:134)
      3. junit.framework.TestResult$1.protect(TestResult.java:110)
      4. junit.framework.TestResult.runProtected(TestResult.java:128)
      5. junit.framework.TestResult.run(TestResult.java:113)
      6. junit.framework.TestCase.run(TestCase.java:124)
      7. junit.framework.TestSuite.runTest(TestSuite.java:243)
      8. junit.framework.TestSuite.run(TestSuite.java:238)
      9. org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
      10. org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      10 frames
    5. IntelliJ junit4 module
      JUnit4IdeaTestRunner.startRunnerWithArgs
      1. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
      1 frame
    6. IDEA
      JUnitStarter.main
      1. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
      2. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
      2 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:483)
      4 frames
    8. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      1 frame