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/16 12:41:59 UTC

[GitHub] [commons-collections] dota17 commented on a change in pull request #89: [COLLECTIONS-708]Add hashCode method to CollectionUtils

dota17 commented on a change in pull request #89: [COLLECTIONS-708]Add hashCode method to CollectionUtils
URL: https://github.com/apache/commons-collections/pull/89#discussion_r409523884
 
 

 ##########
 File path: src/main/java/org/apache/commons/collections4/CollectionUtils.java
 ##########
 @@ -624,9 +624,7 @@ public static boolean isEqualCollection(final Collection<?> a, final Collection<
      */
     public static <E> int hashCode(final Collection<? extends E> collection,
                                 final Equator<? super E> equator) {
-        if (null == equator) {
-            throw new NullPointerException( "Equator must not be null." );
-        }
+        Objects.requireNonNull(equator, "Equator");
 
 Review comment:
   Thanks @garydgregory . I had updated Equator to equator .

----------------------------------------------------------------
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