ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peterrei...@apache.org>
Subject Re: Ant task
Date Mon, 08 Aug 2005 09:06:30 GMT
I do not know if the "" will be interned, it probally will be, but
the code is misleading, so am replacing it with a "".equals(locals.get(0))

Peter

Kev Jackson wrote:

> Alexey Panchenko wrote:
>
>> Hi all,
>>
>> jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java:
>>
>> 383:            if (locals.size() > 0 && !(locals.size() == 1
>> 384:                                       && locals.get(0) == "")) {
>>
>> Is there a reason why the Strings are compared using == here and not
>> equals() ?
>>
>>  
>>
> I think the logic is that we're checking for a "null" or empty String, 
> using equals for a deep comparison is overkill in this situation no?  
> Could be wrong, but does it create a problem downstream?
>
> Kev
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
>


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


Mime
View raw message