Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2117

GroovyBuilder causes an NPE on non-Groovy projects

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.1-rc-3
    • None
    • 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)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            fraenkel Michael Fraenkel
            fraenkel Michael Fraenkel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment