DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26197>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26197

Reference to realThing in UnknownElement.execute defined to null to early

           Summary: Reference to realThing in UnknownElement.execute defined
                    to null to early
           Product: Ant
           Version: 1.6.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


In UnknownElement.execute() the variable realThing is defined to null. This
makes it impossible to use BuildEvent (via BuildListener) and getTask(), e.g.

public void taskFinished(BuildEvent event) {
        Task task = event.getTask();
        if (task instanceof UnknownElement) {
            UnknownElement ue = (UnknownElement)task;
            System.out.println("UE TASK: " + ue.getTask()); // WILL PRINT NULL
        }
}

The following change in UnknownElement.execute would make this work, but I guess
 it creates other problems with GC?:

// the task will not be reused ( a new init() will be called )
// Let GC do its job
//realThing = null;         ****** THIS LINE WAS REMOVE TO GET IT TO WORK!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to