Re: [collection] NPE vs IAE in org.apache.commons.collections4.CollectionUtils

2019-12-10 Thread Gary Gregory
FTR, using requireNonNull is also an 'Effective Java' recommendation. Gary On Thu, Dec 5, 2019 at 4:54 PM Bruno P. Kinoshita wrote: > +1 for NPE > > On Friday, 6 December 2019, 5:22:34 am NZDT, Gary Gregory < > garydgreg...@gmail.com> wrote: > > Hi All: > > org.apache.commons.collections4

Re: [collection] NPE vs IAE in org.apache.commons.collections4.CollectionUtils

2019-12-05 Thread Bruno P. Kinoshita
+1 for NPE On Friday, 6 December 2019, 5:22:34 am NZDT, Gary Gregory wrote: Hi All: org.apache.commons.collections4.CollectionUtils contains a mix of checking for null inputs by throwing NullPointerExceptions in some methods and IllegalArgumentExceptions in others. I propose we stand

Re: [collection] NPE vs IAE in org.apache.commons.collections4.CollectionUtils

2019-12-05 Thread Matt Sicker
+1 for NPE. New Java versions are supposed to even auto generate useful error messages for them, too. On Thu, Dec 5, 2019 at 10:22 Gary Gregory wrote: > Hi All: > > org.apache.commons.collections4.CollectionUtils contains a mix of checking > for null inputs by throwing NullPointerExceptions in s

[collection] NPE vs IAE in org.apache.commons.collections4.CollectionUtils

2019-12-05 Thread Gary Gregory
Hi All: org.apache.commons.collections4.CollectionUtils contains a mix of checking for null inputs by throwing NullPointerExceptions in some methods and IllegalArgumentExceptions in others. I propose we standardized to NPE simply because the JRE provides Objects.requireNonNull() just for this pur