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 34411] New: - Task.init() gets called twice
Date Tue, 12 Apr 2005 01:11:38 GMT
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: dev@ant.apache.org
        ReportedBy: mirko@raner.ws


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


Mime
View raw message