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 11481] - WaitFor doesn't extend Task so it can't be used as a Task programmatically
Date Tue, 06 Aug 2002 09:55:00 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=11481>.
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=11481

WaitFor doesn't extend Task so it can't be used as a Task programmatically





------- Additional Comments From bodewig@apache.org  2002-08-06 09:54 -------
Ant deals with "tasks" that are not subclasses of Task with the help of
TaskAdapter - which is basically what you've implemented yourself plus some
core support when it comes to reflecting in attributes for the tasks.

You should do something like

    sequential.addTask(new TaskAdapter(wait));

The "make Task an interface" route has been discussed before, and some of the
Ant2 proposals may have tried that route already.

When I go and compare how the Task class has changed between Ant releases, I
don't think we can ever come to a Task interface that doesn't break all custom
tasks with every new release.  You then have to provide a base Task class and
recommend people to extend from it which is worse than having a concrete
Task class and TaskAdapter IMHO.

Can we close this PR?

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message