commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory" <ggreg...@seagullsoftware.com>
Subject [lang] ArrayUtils.toPrimitive and NPEs.
Date Tue, 04 Oct 2005 20:34:59 GMT
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...

Gary

Gary Gregory
Senior Software Engineer
Seagull Software
Web:	http://www.seagullsoftware.com
Email:	ggregory@seagullsw.com
Land:	310-546-3134
Mobile:	310-403-8747
Skype:	garygregory
Time Z:	USA, Pacific


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message