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=9900>. 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=9900 addConfigured methods called multiple times under TaskContainer Summary: addConfigured methods called multiple times under TaskContainer Product: Ant Version: 1.6Alpha (nightly) Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Core AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, Say I have a custom task, <print>, which takes a <message> nested element: <print> <message text="This is a message"/> </print> In my Print.java class, the Message object is added via: public void addConfiguredMessage(Message m) { ... } That's all fine. Now say I wrap everything in a <parallel> element: <parallel> <print> <message text="This is a message"/> </print> </parallel> I find that the addConfiguredMessage() method is called *twice*. If I wrap it again (2 parallel's), it is called 3 times. The same thing happens when wrapping in <sequential>, and (I imagine) any other TaskContainer. It does NOT happen if the Message object is added via addMessage(), not addConfiguredMessage(). AFAIK, the same bug is present in Ant 1.5beta2. I'd hazard a guess that the problem is that ProjectHelperImpl.TaskHandler.init() is called multiple times, once per TaskContainer, and init() calls the addConfiguredMessage() method. Attached is a demo of the problem. Unpackage, type 'ant' to compile, then 'ant -f run.xml' to demonstrate the bug. Thanks, --Jeff -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
