Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1776

Instrumentation error on certain projects since 4.0.5 build of Clover.

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Highest Highest
    • 4.0.6
    • 4.0.5
    • Instrumentation
    • None

      Instrumentation error on certain projects since 4.0.5 build of Clover.

      Making it a blocker as we can't run Clover on certain projects any longer.

      build	27-Jul-2015 13:46:14	[INFO] Processing files at 1.8 source level.
      build	27-Jul-2015 13:46:17	[INFO] Instrumentation error
      build	27-Jul-2015 13:46:17	java.util.NoSuchElementException
      build	27-Jul-2015 13:46:17		at java.util.ArrayDeque.getFirst(ArrayDeque.java:324)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.headIdentifiersStack(JavaRecognizer.java:113)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.pushIdentifierToHeadStack(JavaRecognizer.java:109)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.primaryExpressionPart(JavaRecognizer.java:3368)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.postfixExpression(JavaRecognizer.java:5047)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.unaryExpressionNotPlusMinus(JavaRecognizer.java:5007)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.unaryExpression(JavaRecognizer.java:4867)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.multiplicativeExpression(JavaRecognizer.java:4817)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.additiveExpression(JavaRecognizer.java:4787)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.shiftExpression(JavaRecognizer.java:4754)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.relationalExpression(JavaRecognizer.java:4706)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.equalityExpression(JavaRecognizer.java:4673)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.andExpression(JavaRecognizer.java:4654)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.exclusiveOrExpression(JavaRecognizer.java:4635)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.inclusiveOrExpression(JavaRecognizer.java:4616)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.logicalAndExpression(JavaRecognizer.java:4597)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.logicalOrExpression(JavaRecognizer.java:4578)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.conditionalExpression(JavaRecognizer.java:4549)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.conditionalExpression2(JavaRecognizer.java:5558)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.annMemberValue2(JavaRecognizer.java:5528)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.annMemberValuePair(JavaRecognizer.java:5465)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.annotation2(JavaRecognizer.java:1509)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.annotation(JavaRecognizer.java:667)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.packageDefinition(JavaRecognizer.java:593)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.JavaRecognizer.compilationUnit(JavaRecognizer.java:540)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:212)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:125)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.CloverInstr.execute(CloverInstr.java:76)
      build	27-Jul-2015 13:46:17		at com.atlassian.clover.CloverInstr.mainImpl(CloverInstr.java:54)
      build	27-Jul-2015 13:46:17		at com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrumentSources(AbstractInstrumenter.java:197)
      build	27-Jul-2015 13:46:17		at com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrument(AbstractInstrumenter.java:72)
      build	27-Jul-2015 13:46:17		at com.atlassian.maven.plugin.clover.CloverInstrumentInternalMojo.execute(CloverInstrumentInternalMojo.java:289)
      build	27-Jul-2015 13:46:17		at com.atlassian.maven.plugin.clover.CloverSetupMojo.execute(CloverSetupMojo.java:31)
      build	27-Jul-2015 13:46:17		at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      build	27-Jul-2015 13:46:17		at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      build	27-Jul-2015 13:46:17		at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      build	27-Jul-2015 13:46:17		at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      build	27-Jul-2015 13:46:17		at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      build	27-Jul-2015 13:46:17		at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      build	27-Jul-2015 13:46:17		at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      build	27-Jul-2015 13:46:17		at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      build	27-Jul-2015 13:46:17		at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
      build	27-Jul-2015 13:46:17		at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
      build	27-Jul-2015 13:46:17		at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
      build	27-Jul-2015 13:46:17		at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
      build	27-Jul-2015 13:46:17		at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
      build	27-Jul-2015 13:46:17		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      build	27-Jul-2015 13:46:17		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      build	27-Jul-2015 13:46:17		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      build	27-Jul-2015 13:46:17		at java.lang.reflect.Method.invoke(Method.java:483)
      build	27-Jul-2015 13:46:17		at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      build	27-Jul-2015 13:46:17		at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      build	27-Jul-2015 13:46:17		at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      build	27-Jul-2015 13:46:17		at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      build	27-Jul-2015 13:46:17	[INFO]                                                                         
      

            [CLOV-1776] Instrumentation error on certain projects since 4.0.5 build of Clover.

            Hi Ronan,

            We have implemented a fix, which solves a compilation error of package-info.java files having the same stack trace as your case. I believe it will fix your case as well. Could you please try to build your project with the latest snapshot build of Clover Core (com.atlassian.clover:clover:4.0.6-SNAPSHOT)?

            It's available in Atlassian Central Snapshot repository:
            https://maven.atlassian.com/content/repositories/atlassian-central-snapshot/com/atlassian/clover/clover/4.0.6-SNAPSHOT/

            Cheers
            Marek

            Marek Parfianowicz added a comment - Hi Ronan, We have implemented a fix, which solves a compilation error of package-info.java files having the same stack trace as your case. I believe it will fix your case as well. Could you please try to build your project with the latest snapshot build of Clover Core (com.atlassian.clover:clover:4.0.6-SNAPSHOT)? It's available in Atlassian Central Snapshot repository: https://maven.atlassian.com/content/repositories/atlassian-central-snapshot/com/atlassian/clover/clover/4.0.6-SNAPSHOT/ Cheers Marek

            More of the logs attached as well.

            I don't see any logs attached. May I ask you to attach them again?

            Please note that jira.atlassian.com is a public issue tracker. In case you're concerned about data present in your logs, feel free to create a ticket at support.atlassian.com and attach logs there.

            Marek Parfianowicz added a comment - More of the logs attached as well. I don't see any logs attached. May I ask you to attach them again? Please note that jira.atlassian.com is a public issue tracker. In case you're concerned about data present in your logs, feel free to create a ticket at support.atlassian.com and attach logs there.

            Ronan Ryan added a comment - - edited
            Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T23:51:42+10:00)
            Maven home: /usr/local/maven/latest
            Java version: 1.8.0_40, vendor: Oracle Corporation
            Java home: /usr/java/jdk1.8.0_40/jre
            Default locale: en_US, platform encoding: UTF-8
            OS name: "linux", version: "2.6.32-504.30.3.el6.x86_64", arch: "amd64", family: "unix"
            

            We're using clover auto integrated with bamboo.

            <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <version>${maven.compiler.plugin.version}</version>
                            <configuration>
                                <source>1.8</source>
                                <target>1.8</target>
                            </configuration>
                        </plugin>
            

            Just FYI...I've asked the developer who committed the OTA auto generated code into our src/ folder to remove it and generate it at build time with a jaxb plugin. So that's done and we're no longer experiencing the issue.

            More of the logs attached as well.

            Ronan Ryan added a comment - - edited Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T23:51:42+10:00) Maven home: /usr/local/maven/latest Java version: 1.8.0_40, vendor: Oracle Corporation Java home: /usr/java/jdk1.8.0_40/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" , version: "2.6.32-504.30.3.el6.x86_64" , arch: "amd64" , family: "unix" We're using clover auto integrated with bamboo. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven.compiler.plugin.version}</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> Just FYI...I've asked the developer who committed the OTA auto generated code into our src/ folder to remove it and generate it at build time with a jaxb plugin. So that's done and we're no longer experiencing the issue. More of the logs attached as well.

            Could you also tell what Maven and Java version as well as what <source> level settings (either in the maven-compiler-plugin or the in the maven-clover2-plugin) do you use?

            Marek Parfianowicz added a comment - Could you also tell what Maven and Java version as well as what <source> level settings (either in the maven-compiler-plugin or the in the maven-clover2-plugin) do you use?

            Hi Ronan,

            Unfortunately, I did not reproduce your problem yet (i.e. I was able to successfully instrument the attached file using Clover 4.0.5). According to the stack trace:

            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.annotation(JavaRecognizer.java:667)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.packageDefinition(JavaRecognizer.java:593)
            

            Parsing failed on the annotation for a package, which does not seem to be a case in your sample (i.e. the YesNoType is not a package-info.java file and does not have any annotations before a "package" keyword).

            May I ask you to:

            • double-check if you've attached correct version of the file
            • paste more build log - I'd like to see what happened before instrumenting the YesNoType.java
            • paste a source code of the file which was instrumented before the YesNoType - I'd like to check if it has any influence on YesNoType - I suspect that this problem is related with instrumentation of more than one file (for instance that parser's state machine was not cleaned properly between parsing of subsequent files)

            Cheers
            Marek

            Marek Parfianowicz added a comment - Hi Ronan, Unfortunately, I did not reproduce your problem yet (i.e. I was able to successfully instrument the attached file using Clover 4.0.5). According to the stack trace: build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.annotation(JavaRecognizer.java:667) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.packageDefinition(JavaRecognizer.java:593) Parsing failed on the annotation for a package, which does not seem to be a case in your sample (i.e. the YesNoType is not a package-info.java file and does not have any annotations before a "package" keyword). May I ask you to: double-check if you've attached correct version of the file paste more build log - I'd like to see what happened before instrumenting the YesNoType.java paste a source code of the file which was instrumented before the YesNoType - I'd like to check if it has any influence on YesNoType - I suspect that this problem is related with instrumentation of more than one file (for instance that parser's state machine was not cleaned properly between parsing of subsequent files) Cheers Marek

            Hey Marek and Grzegorz,

            Thanks for looking into this so quickly for us.

            Using the -X option, our issue actually seems to be and OTA (open travel alliance) auto generated source file.

            batch/target/clover/src-instrumented/org/opentravel/ota/_2003/_05/YesNoType.java'
            build	28-Jul-2015 08:34:45	[INFO] Instrumentation error
            build	28-Jul-2015 08:34:45	java.util.NoSuchElementException
            build	28-Jul-2015 08:34:45		at java.util.ArrayDeque.getFirst(ArrayDeque.java:324)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.headIdentifiersStack(JavaRecognizer.java:113)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.pushIdentifierToHeadStack(JavaRecognizer.java:109)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.primaryExpressionPart(JavaRecognizer.java:3368)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.postfixExpression(JavaRecognizer.java:5047)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.unaryExpressionNotPlusMinus(JavaRecognizer.java:5007)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.unaryExpression(JavaRecognizer.java:4867)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.multiplicativeExpression(JavaRecognizer.java:4817)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.additiveExpression(JavaRecognizer.java:4787)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.shiftExpression(JavaRecognizer.java:4754)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.relationalExpression(JavaRecognizer.java:4706)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.equalityExpression(JavaRecognizer.java:4673)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.andExpression(JavaRecognizer.java:4654)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.exclusiveOrExpression(JavaRecognizer.java:4635)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.inclusiveOrExpression(JavaRecognizer.java:4616)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.logicalAndExpression(JavaRecognizer.java:4597)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.logicalOrExpression(JavaRecognizer.java:4578)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.conditionalExpression(JavaRecognizer.java:4549)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.conditionalExpression2(JavaRecognizer.java:5558)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.annMemberValue2(JavaRecognizer.java:5528)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.annMemberValuePair(JavaRecognizer.java:5465)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.annotation2(JavaRecognizer.java:1509)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.annotation(JavaRecognizer.java:667)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.packageDefinition(JavaRecognizer.java:593)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.JavaRecognizer.compilationUnit(JavaRecognizer.java:540)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:212)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:125)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.CloverInstr.execute(CloverInstr.java:76)
            build	28-Jul-2015 08:34:45		at com.atlassian.clover.CloverInstr.mainImpl(CloverInstr.java:54)
            build	28-Jul-2015 08:34:45		at com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrumentSources(AbstractInstrumenter.java:197)
            build	28-Jul-2015 08:34:45		at com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrument(AbstractInstrumenter.java:72)
            build	28-Jul-2015 08:34:45		at com.atlassian.maven.plugin.clover.CloverInstrumentInternalMojo.execute(CloverInstrumentInternalMojo.java:289)
            build	28-Jul-2015 08:34:45		at com.atlassian.maven.plugin.clover.CloverSetupMojo.execute(CloverSetupMojo.java:31)
            build	28-Jul-2015 08:34:45		at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
            build	28-Jul-2015 08:34:45		at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
            build	28-Jul-2015 08:34:45		at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
            build	28-Jul-2015 08:34:45		at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
            build	28-Jul-2015 08:34:45		at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
            build	28-Jul-2015 08:34:45		at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
            build	28-Jul-2015 08:34:45		at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
            build	28-Jul-2015 08:34:45		at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
            build	28-Jul-2015 08:34:45		at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
            build	28-Jul-2015 08:34:45		at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
            build	28-Jul-2015 08:34:45		at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
            build	28-Jul-2015 08:34:45		at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
            build	28-Jul-2015 08:34:45		at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
            build	28-Jul-2015 08:34:45		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            build	28-Jul-2015 08:34:45		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            build	28-Jul-2015 08:34:45		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            build	28-Jul-2015 08:34:45		at java.lang.reflect.Method.invoke(Method.java:497)
            build	28-Jul-2015 08:34:45		at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
            build	28-Jul-2015 08:34:45		at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
            build	28-Jul-2015 08:34:45		at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
            build	28-Jul-2015 08:34:45		at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
            build	28-Jul-2015 08:34:45	[INFO]                                                                         
            

            We probably should be excluding these in any case.... but I have attached the source in case it's something you guys want to fix.

            Ronan Ryan added a comment - Hey Marek and Grzegorz, Thanks for looking into this so quickly for us. Using the -X option, our issue actually seems to be and OTA (open travel alliance) auto generated source file. batch/target/clover/src-instrumented/org/opentravel/ota/_2003/_05/YesNoType.java' build 28-Jul-2015 08:34:45 [INFO] Instrumentation error build 28-Jul-2015 08:34:45 java.util.NoSuchElementException build 28-Jul-2015 08:34:45 at java.util.ArrayDeque.getFirst(ArrayDeque.java:324) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.headIdentifiersStack(JavaRecognizer.java:113) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.pushIdentifierToHeadStack(JavaRecognizer.java:109) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.primaryExpressionPart(JavaRecognizer.java:3368) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.postfixExpression(JavaRecognizer.java:5047) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.unaryExpressionNotPlusMinus(JavaRecognizer.java:5007) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.unaryExpression(JavaRecognizer.java:4867) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.multiplicativeExpression(JavaRecognizer.java:4817) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.additiveExpression(JavaRecognizer.java:4787) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.shiftExpression(JavaRecognizer.java:4754) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.relationalExpression(JavaRecognizer.java:4706) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.equalityExpression(JavaRecognizer.java:4673) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.andExpression(JavaRecognizer.java:4654) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.exclusiveOrExpression(JavaRecognizer.java:4635) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.inclusiveOrExpression(JavaRecognizer.java:4616) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.logicalAndExpression(JavaRecognizer.java:4597) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.logicalOrExpression(JavaRecognizer.java:4578) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.conditionalExpression(JavaRecognizer.java:4549) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.conditionalExpression2(JavaRecognizer.java:5558) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.annMemberValue2(JavaRecognizer.java:5528) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.annMemberValuePair(JavaRecognizer.java:5465) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.annotation2(JavaRecognizer.java:1509) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.annotation(JavaRecognizer.java:667) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.packageDefinition(JavaRecognizer.java:593) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.JavaRecognizer.compilationUnit(JavaRecognizer.java:540) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:212) build 28-Jul-2015 08:34:45 at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:125) build 28-Jul-2015 08:34:45 at com.atlassian.clover.CloverInstr.execute(CloverInstr.java:76) build 28-Jul-2015 08:34:45 at com.atlassian.clover.CloverInstr.mainImpl(CloverInstr.java:54) build 28-Jul-2015 08:34:45 at com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrumentSources(AbstractInstrumenter.java:197) build 28-Jul-2015 08:34:45 at com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrument(AbstractInstrumenter.java:72) build 28-Jul-2015 08:34:45 at com.atlassian.maven.plugin.clover.CloverInstrumentInternalMojo.execute(CloverInstrumentInternalMojo.java:289) build 28-Jul-2015 08:34:45 at com.atlassian.maven.plugin.clover.CloverSetupMojo.execute(CloverSetupMojo.java:31) build 28-Jul-2015 08:34:45 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) build 28-Jul-2015 08:34:45 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) build 28-Jul-2015 08:34:45 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) build 28-Jul-2015 08:34:45 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) build 28-Jul-2015 08:34:45 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) build 28-Jul-2015 08:34:45 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) build 28-Jul-2015 08:34:45 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) build 28-Jul-2015 08:34:45 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) build 28-Jul-2015 08:34:45 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) build 28-Jul-2015 08:34:45 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) build 28-Jul-2015 08:34:45 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) build 28-Jul-2015 08:34:45 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) build 28-Jul-2015 08:34:45 at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) build 28-Jul-2015 08:34:45 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) build 28-Jul-2015 08:34:45 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) build 28-Jul-2015 08:34:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) build 28-Jul-2015 08:34:45 at java.lang.reflect.Method.invoke(Method.java:497) build 28-Jul-2015 08:34:45 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) build 28-Jul-2015 08:34:45 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) build 28-Jul-2015 08:34:45 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) build 28-Jul-2015 08:34:45 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) build 28-Jul-2015 08:34:45 [INFO] We probably should be excluding these in any case.... but I have attached the source in case it's something you guys want to fix.

            Hi Ronan,

            If it's also caused by package-info.java file in your case, as a workaround you can exclude them from instrumentation, either by defining <excludes> or <excludesList> in pom.xml:
            https://docs.atlassian.com/maven-clover2-plugin/latest/setup-mojo.html#excludes
            https://docs.atlassian.com/maven-clover2-plugin/latest/setup-mojo.html#excludesList

            or using the -Dmaven.clover.excludesList=... option.

            Cheers
            Marek

            Marek Parfianowicz added a comment - Hi Ronan, If it's also caused by package-info.java file in your case, as a workaround you can exclude them from instrumentation, either by defining <excludes> or <excludesList> in pom.xml: https://docs.atlassian.com/maven-clover2-plugin/latest/setup-mojo.html#excludes https://docs.atlassian.com/maven-clover2-plugin/latest/setup-mojo.html#excludesList or using the -Dmaven.clover.excludesList=... option. Cheers Marek

            Hi Ronan, I found out that regression was introduced to package-info files instrumentation. Could you confirm that Clover is failing to instrument package-info.java file in your project?

            Grzegorz Lewandowski added a comment - Hi Ronan, I found out that regression was introduced to package-info files instrumentation. Could you confirm that Clover is failing to instrument package-info.java file in your project?

            Regression of: CLOV-1596

            Marek Parfianowicz added a comment - Regression of: CLOV-1596

            Marek Parfianowicz added a comment - - edited

            Hi Ronan, thank you very much for reporting this issue. May I ask you to attach source code of the file which causes this instrumentation error?

            In case you're not sure which file is it, please run your build with debug logging (mvn -X), it should print a message which file is being processed.

            Marek Parfianowicz added a comment - - edited Hi Ronan, thank you very much for reporting this issue. May I ask you to attach source code of the file which causes this instrumentation error? In case you're not sure which file is it, please run your build with debug logging (mvn -X), it should print a message which file is being processed.

              glewandowski Grzegorz Lewandowski
              5dc3870b23c3 Ronan Ryan
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: