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 2019/12/04 15:59:52 UTC

[GitHub] [commons-collections] garydgregory commented on a change in pull request #122: Improve MapUtils with the null checks, add Javadoc for the parameter indent and add JUnit for it.

garydgregory commented on a change in pull request #122: Improve MapUtils with the null checks, add Javadoc for the parameter indent and add JUnit for it.
URL: https://github.com/apache/commons-collections/pull/122#discussion_r353829545
 
 

 ##########
 File path: src/main/java/org/apache/commons/collections4/MapUtils.java
 ##########
 @@ -1186,11 +1188,12 @@ public static void debugPrint(final PrintStream out, final Object label, final M
      *
      * @param <K> the key type
      * @param <V> the value type
-     * @param map the map to invert, may not be null
+     * @param map the map to invert, must not be null
      * @return a new HashMap containing the inverted data
      * @throws NullPointerException if the map is null
      */
     public static <K, V> Map<V, K> invertMap(final Map<K, V> map) {
+        Objects.requireNonNull(map, "The map must not be null");
 
 Review comment:
   Please simply use the argument name like "map" or whatever the faulty argument name is.

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