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

Compiling Groovy code with Clover throws NPE

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 4.0.4
    • None
    • Groovy
    • None

      Clover fails to integrate with Groovyc task and throws NPE:

      Clover failed to integrate with <groovyc/>
      java.lang.NullPointerException
      at com.atlassian.clover.ant.groovy.GroovycSupport.buildTestDetector(GroovycSupport.java:242)
      at com.atlassian.clover.ant.groovy.GroovycSupport.taskStarted(GroovycSupport.java:141)
      at org.apache.tools.ant.Project.fireTaskStarted(Project.java:2184)
      at org.apache.tools.ant.Task.perform(Task.java:344)
      at org.apache.tools.ant.Target.execute(Target.java:392)
      at org.apache.tools.ant.Target.performTasks(Target.java:413)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      ...
      

      Cause:

      NPE is thrown when Clover cannot find it's AntInstrumentationConfig in project references in an Ant-based build. This can happen when a build calls <ant> or <antcall> tasks without inheritrefs=true - lack of this property causes that AntInstrumentationConfig is not passed to these calls.

      Workaround:

      Ensure that inheritrefs=true is used.

            [CLOV-1657] Compiling Groovy code with Clover throws NPE

            Owen made changes -
            Workflow Original: New Clover Workflow [ 898050 ] New: New Clover Workflow - Restricted [ 1474547 ]
            Marcus Silveira made changes -
            Regular Expression New: com.atlassian.clover.ant.groovy.GroovycSupport.buildTestDetector\(GroovycSupport.java:\d+
            Piotr Swiecicki made changes -
            Workflow Original: Clover Workflow [ 896557 ] New: New Clover Workflow [ 898050 ]
            Piotr Swiecicki made changes -
            Workflow Original: reviewflow [ 838674 ] New: Clover Workflow [ 896557 ]
            Marek Parfianowicz made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: In Progress [ 3 ] New: Closed [ 6 ]
            Marek Parfianowicz made changes -
            Status Original: Open [ 1 ] New: In Progress [ 3 ]
            Marek Parfianowicz made changes -
            Description Original: Clover fails to integrate with Groovyc task and throws NPE:

            {noformat}
            Clover failed to integrate with <groovyc/>
            java.lang.NullPointerException
            at com.atlassian.clover.ant.groovy.GroovycSupport.buildTestDetector(GroovycSupport.java:242)
            at com.atlassian.clover.ant.groovy.GroovycSupport.taskStarted(GroovycSupport.java:141)
            at org.apache.tools.ant.Project.fireTaskStarted(Project.java:2184)
            at org.apache.tools.ant.Task.perform(Task.java:344)
            at org.apache.tools.ant.Target.execute(Target.java:392)
            at org.apache.tools.ant.Target.performTasks(Target.java:413)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
            ...
            {noformat}

            *Cause:*

            NPE is thrown when Clover cannot fine it's AntInstrumentationConfig in project references in Ant-based build. This can happen when a build calls <ant> or <antcall> tasks without {{inheritrefs=true}} - lack of this property causes that AntInstrumentationConfig is not passed to.

            *Workaround:*

            Ensure that {{inheritrefs=true}} is used.
            New: Clover fails to integrate with Groovyc task and throws NPE:

            {noformat}
            Clover failed to integrate with <groovyc/>
            java.lang.NullPointerException
            at com.atlassian.clover.ant.groovy.GroovycSupport.buildTestDetector(GroovycSupport.java:242)
            at com.atlassian.clover.ant.groovy.GroovycSupport.taskStarted(GroovycSupport.java:141)
            at org.apache.tools.ant.Project.fireTaskStarted(Project.java:2184)
            at org.apache.tools.ant.Task.perform(Task.java:344)
            at org.apache.tools.ant.Target.execute(Target.java:392)
            at org.apache.tools.ant.Target.performTasks(Target.java:413)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
            ...
            {noformat}

            *Cause:*

            NPE is thrown when Clover cannot find it's AntInstrumentationConfig in project references in an Ant-based build. This can happen when a build calls <ant> or <antcall> tasks without {{inheritrefs=true}} - lack of this property causes that AntInstrumentationConfig is not passed to these calls.

            *Workaround:*

            Ensure that {{inheritrefs=true}} is used.
            Marek Parfianowicz made changes -
            Rank New: Ranked higher
            Marek Parfianowicz made changes -
            Sprint New: Sprint 2 - Stash [ 1910 ]
            Marek Parfianowicz created issue -

              mparfianowicz Marek Parfianowicz
              mparfianowicz Marek Parfianowicz
              Affected customers:
              0 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: