garydgregory commented on code in PR #358: URL: https://github.com/apache/commons-io/pull/358#discussion_r878919402
########## src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTest.java: ########## @@ -350,6 +360,22 @@ public void testWriteZero(final String baosName, final BAOSFactory<?> baosFactor } } + private static final int FILE_SIZE = (1024 * 4) + 1; + private final byte[] inData = TestUtils.generateTestData(FILE_SIZE); + + @Test + public void testToByteArrayImplAndResetImpl() throws Exception { + InputStream in = new ByteArrayInputStream(inData); Review Comment: Use try with resources ########## src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTest.java: ########## @@ -350,6 +360,22 @@ public void testWriteZero(final String baosName, final BAOSFactory<?> baosFactor } } + private static final int FILE_SIZE = (1024 * 4) + 1; + private final byte[] inData = TestUtils.generateTestData(FILE_SIZE); Review Comment: These data do not need to be tracked for all tests. Move them inside the one method that use them. -- 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: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org