Groovy
  1. Groovy
  2. GROOVY-2117

GroovyBuilder causes an NPE on non-Groovy projects

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.1-rc-3
    • Component/s: None
    • Labels:
      None

      Description

      If a builder doesn't define an associate nature via hasNature in the extension point, all defined builders run. Since the GroovyProject returned in such a case is null, the NPE is expected.
      We can either add the hasNature tag to the builder extension pt or deal with the null project. I opt for the former.

      java.lang.NullPointerException
      at org.codehaus.groovy.eclipse.core.builder.GroovyBuilder.build(GroovyBuilder.java:54)
      at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:624)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:166)

      1. groovy2117.txt
        2 kB
        Michael Fraenkel

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Michael Fraenkel
            Reporter:
            Michael Fraenkel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development