ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Rev 568096 breaks ant-contrib
Date Wed, 05 Sep 2007 04:21:09 GMT
On Wed, 05 Sep 2007, Stefan Bodewig <bodewig@apache.org> wrote:

> Equals now has changed the signature of the setters to take Object
> arguments (rev 557097) so setArg1 in IsGreateThan no longer
> overrides the one in Equals.

I see the String setters haven't been removed.  In order to have
subclasses work as expected the deleagtion must be changed.

Instead of what we have in Equals it should probably be

public void setArg1(Object a) {
    if (a instanceof String) {
        setArg1((String) a);
    } else {
        somePrivateArg1Setter(a);
    }
}

public void setArg1(String a) {
    somePrivateArg1Setter(a);
}

I haven't changed the code yet, 'cause I'm waiting for feedback.  Also
Equals probably isn't the only place and I don't feel like searching
through the commit logs 8-)

Stefan

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


Mime
View raw message