commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory" <>
Subject [lang] ArrayUtils.toPrimitive and NPEs.
Date Tue, 04 Oct 2005 20:34:59 GMT


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 Gregory
Senior Software Engineer
Seagull Software
Land:	310-546-3134
Mobile:	310-403-8747
Skype:	garygregory
Time Z:	USA, Pacific

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