Hi Matt,

Matt Benson wrote:

> On Mon, Jul 8, 2013 at 8:22 AM, Jörg Schaible
> <joerg.schai...@scalaris.com>wrote:
> 
>> Hi Hen,
>>
>> Henri Yandell wrote:
>>
>> > I don't see any value having the first two methods - replacing the '=='
>> > sign is a bit too far in the 'provide simple methods' direction I think
>> :)
>> >
>> > I think the third method is already in Lang as:
>> >
>> >     ArrayUtils.contains(array, null);
>>
>>
>> Well, no, this is not, what the method does!
> 
> 
> Correct, but to be fair, it's simple enough to use this method to
> implement
> the desired check.  Negate the result.
> 
> 
>> With Lang we could use now:
>>
>>     ObjectUtils.firstNotNull(array) != null
>>
> 
> I don't see such a method as this.

http://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/ObjectUtils.html#firstNonNull(T...)

> If it did exist, it still wouldn't
> implement the feature requested (check that no element of the array is
> null).  I'm pretty sure !ArrayUtils.contains(array, null) is fine.

I've re-read the original code and you're right.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to