You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/04/07 15:20:22 UTC

[GitHub] [commons-collections] garydgregory commented on issue #117: Better NPE messages in CollectionUtils with Objects.requireNonNull

garydgregory commented on issue #117: Better NPE messages in CollectionUtils with Objects.requireNonNull
URL: https://github.com/apache/commons-collections/pull/117#issuecomment-610449625
 
 
   I'm OK with normalizing our internals on `Objects.requireNonNull` but I really do not like using full sentences for parameter validation.
   
   IOW, say:
   ```
   Objects.requireNonNull(foo, "foo");
   ```
   Do NOT say:
   ```
   Objects.requireNonNull(foo, "The first collection must not be null.");
   Objects.requireNonNull(foo, "foo must not be null.");
   
   ```
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services