com.atlassian.clover.api.CloverException: Double instrumentation detected: f:\Work\release\release-maven-clover2-plugin-hg\src\it\setTestFailureIgnore\target\clover\src-instrumented\com\atlassian\maven\plugin\clover\samples\setTestFailureIgnore\Simple.java appears to have already been instrumented by Clover.

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. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 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

    Root Cause Analysis

    1. com.atlassian.clover.api.CloverException

      Double instrumentation detected: f:\Work\release\release-maven-clover2-plugin-hg\src\it\setTestFailureIgnore\target\clover\src-instrumented\com\atlassian\maven\plugin\clover\samples\setTestFailureIgnore\Simple.java appears to have already been instrumented by Clover.

      at com.atlassian.clover.instr.java.CloverTokenStreamFilter.guardAgainstDoubleInstrumentation()
    2. com.atlassian.clover
      CloverTokenStreamFilter.guardAgainstDoubleInstrumentation
      1. com.atlassian.clover.instr.java.CloverTokenStreamFilter.guardAgainstDoubleInstrumentation(CloverTokenStreamFilter.java:66)
      1 frame