DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=34411>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=34411 Summary: Task.init() gets called twice Product: Ant Version: 1.7Alpha (nightly) Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Core AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The init() method of a custom task that I am working on apparently gets called twice. This is probably not intended and the specification does not state that this would be the case. When looking at the source code of UnknownElement.java and ComponentHelper.java I get the impression that this behavior still exists in the current HEAD stream. UnknownElement.makeObject(...) initially calls ComponentHelper.createComponent(...) to create a new task or type. ComponentHelper.createComponent(...), in turn, calls Task.init() and adds the new task. However, at the end of method UnknownElement.makeObject(...) there is another invocation of Task.init(), which calls the init() method of the task for the second time. I hope I'm not misunderstanding or overlooking something here; I would expect that other custom Ant tasks would have stumbled over this problem before, so I'm somewhat surprised to be the first person to report this problem. Still, the problems that I am encountering with my own task and a look at the current CVS (UnknownElement rev. 1.88, ComponentHelper rev. 1.52) suggests that this is what's happening. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]