commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <>
Subject Re: [lang] ArrayUtils.toPrimitive and NPEs.
Date Tue, 04 Oct 2005 21:22:08 GMT
Gary Gregory wrote:
> Hello:
> WRT:
> All of the ArrayUtils.toPrimitive one arg methods all NPE when an input
> element is null. Why would you want that? 
> We have a handy two arg version of the methods that allows a default
> value to be passed in. Since primitives *have* default values, why not
> simply allow nulls not to NPE and take on the default primitive value?
> Seems easy enough to change...

But it would have compatability issues. At the very least its a semantic 

I think that the basic reasoning is/was to have a validating version and 
a non-validating version of the same method.

So I guess I'm -0.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message