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=17883>.
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=17883

Custom task containers don't share property state across subtasks





------- Additional Comments From [EMAIL PROTECTED]  2003-03-12 18:15 -------
Um ... icky?

Is reflection the only answer here?  It seems like it would be safer, if
possible, to check some kind of Ant version constant, and call stuff differently
based on it.  This would only work, of course, if the 'newer' Ant didn't
actually remove any methods from the 'older' Ant.  Which from code, I'm guessing
it didn't (the newer Ant has some kind of new isInvalid() method on something,
and also has a two-arg maybeConfigure(), but the old Ant and new Ant both have
no-arg maybeConfigure().  Making the code more like:

public void maybeConfigure() throws BuildException {
        if (Ant.Version < 1.5) {
                super.maybeConfigure()
        }
        else {
                super.maybeConfigure(getProject().false);
        }
}

A little shorter.  And clearer. <g/>

Assumption is you can compile this against Ant 1.5, but it will actually run
fine on Ant 1.4, since it never tries to execute the 2-arg maybeConfigure() 
call.

Not being able to edit existing comments is 100% pure goodness.  You 
revisionist!

Reply via email to