michael-o edited a comment on issue #117: Better NPE messages in 
CollectionUtils with Objects.requireNonNull
URL: 
https://github.com/apache/commons-collections/pull/117#issuecomment-611546027
 
 
   > 
   > 
   > > Thanks @garydgregory @michael-o . I had keep it simple now.
   > > @garydgregory @michael-o What about the issue returned 
IllegalArgumentException and now would return NullPointerException?
   > > Thanks @kinow .
   > 
   > @dota17
   > The PR looks good. I think it is OK in this case to trade one unchecked 
exception for another. NPE is more precise and does not break binary 
compatibility of method signatures.
   
   Correct, especially there unchecked should be swapped for correctness. IAE 
and NPE almost always indicate programming errors. If there is a null, throw 
always an NPE.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to