commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <scolebou...@btopenworld.com>
Subject Re: [lang] ArrayUtils.toPrimitive and NPEs.
Date Tue, 04 Oct 2005 21:22:08 GMT
Gary Gregory wrote:
> Hello:
> 
> WRT: http://issues.apache.org/bugzilla/show_bug.cgi?id=36915
> 
> 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 
change.

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.

Stephen

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


Mime
View raw message