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

Compiling Groovy code with Clover throws NPE

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Activity

          People

            mparfianowicz Marek Parfianowicz
            mparfianowicz Marek Parfianowicz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: