ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@apache.org>
Subject Re: IntrospectionHelper questions
Date Sun, 16 Dec 2001 14:41:20 GMT
From: "Adam Murdoch" <adammurdoch_ml@yahoo.com>

> Yep - that bit was pretty clear.  The behaviour when a 
> String is involved is consistent - it will always choose 
> the non-String one.  My question was related to what 
> happens when there's more than one non-String setter 
> method.  Ant will choose one of them, based on the order 
> Class.getMethods() returns them (which, according to the 
> Javadocs, is unspecified).

When it isn't a String, Ant will choose the *last* method
that gets returned by Class.getMethods().  You are right
in saying that that order is not guaranteed across
VMs and platforms.  So, any task that has lots
of set methods for the same attribute, is either
programmed with a single OS/VM in mind or the
author doesn't care which setter gets called.  At the
moment in Ant 1.1, issuing a debug warning stating 
the methods that get ignored would clarify things to the 
user.  Want to submit a patch for that?

Thanks
Magesh




--
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