Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-87

static reference to ant project in fr.jayasoft.ivy.util.Message causes NullPointerException in environments like netbeans

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2
    • 1.3-RC1
    • Ant, Core
    • None
    • Windows XP, Java 1.5, NetBeans 4.1 (5.0 beta), Ant 1.6.5

    Description

      i'am using ivy 1.2a with netbeans. Running the buildlist task works fine for the first time but after run once the task causes a NullPointerException.

      The reason is the following snippet from fr.jayasoft.ivy.ant.IvyTask:

      protected void ensureMessageInitialised() {
      if (!Message.isInitialised())

      { Message.init(new AntMessageImpl(getProject())); }

      }

      NetBeans starts Ant always within the same VM and fr.jayasoft.ivy.util.Message references statically an "old" Ant project. No buildlisteners are registered to the "old" project object anymore and so a call Project.log causes a NullPointerException.

      Please remove this static dependency because NetBeans + Ivy is really cool - when it works...

      Attachments

        Activity

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

          People

            xavier Xavier Hanin
            keil Keil Marx
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment