commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [commons-lang] apirom9 commented on a change in pull request #472: Add more test inputs for ArrayUtils.toMap() method
Date Fri, 25 Oct 2019 10:16:18 GMT
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

Mime
View raw message