ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26197] New: - Reference to realThing in UnknownElement.execute defined to null to early
Date Fri, 16 Jan 2004 15:36:51 GMT
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: dev@ant.apache.org
        ReportedBy: rikard.thulin@sun.com


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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message