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/10/25 10:16:18 UTC

[GitHub] [commons-lang] apirom9 commented on a change in pull request #472: Add more test inputs for ArrayUtils.toMap() method

apirom9 commented on a change in pull request #472: Add more test inputs for ArrayUtils.toMap() method
URL: https://github.com/apache/commons-lang/pull/472#discussion_r338983245
 
 

 ##########
 File path: src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
 ##########
 @@ -264,6 +266,31 @@ public int hashCode() {
             }
         }});
         assertEquals("bar", map.get("foo"));
+
+        // Return empty map when got input array with length = 0
+        assertEquals(Collections.emptyMap(), ArrayUtils.toMap(new Object[0]));
+
+        // Test all null values
+        map = ArrayUtils.toMap(new Object[][] { {null, null}, {null, null} });
+        assertEquals(new HashMap<Object, Object>() {
 
 Review comment:
   Fixed. Thanks

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