garydgregory commented on code in PR #374:
URL: https://github.com/apache/commons-io/pull/374#discussion_r955968481


##########
src/test/java/org/apache/commons/io/IOUtilsTest.java:
##########
@@ -1716,4 +1718,12 @@ public void testWriteLittleString() throws IOException {
         }
     }
 
+    @Test
+    public void testByteArrayWithNegativeSize() {
+        int size = -1;
+        assertThrows(NegativeArraySizeException.class,() -> {

Review Comment:
   You can just say `assertThrows(NegativeArraySizeException.class,() -> 
IOUtils.byteArray(-1));` but I am not even sure we should have this test since 
it does not improve our code coverage, it just test what the JVM does. @kinow , 
any thoughts?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to