aherbert commented on a change in pull request #108: Refactor 
ByteArrayOutputStream into synchronized and non-synchronized versions
URL: https://github.com/apache/commons-io/pull/108#discussion_r402927367
 
 

 ##########
 File path: 
src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java
 ##########
 @@ -211,13 +217,30 @@ public void testStream() throws Exception {
 
         //Make sure that empty ByteArrayOutputStreams really don't create 
garbage
         //on toByteArray()
-        final ByteArrayOutputStream baos1 = new ByteArrayOutputStream();
-        final ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
+        final AbstractByteArrayOutputStream baos1 = baosFactory.instance();
+        final AbstractByteArrayOutputStream baos2 = baosFactory.instance();
         assertSame(baos1.toByteArray(), baos2.toByteArray());
         baos1.close();
         baos2.close();
         baout.close();
         baout1.close();
     }
+
+    private static Stream<Arguments> baosFactories() {
+        final BAOSFactory syncBaosFactory = size -> new 
ByteArrayOutputStream(size);
+        final BAOSFactory nonSyncBaos = size -> new 
FastByteArrayOutputStream(size);
 
 Review comment:
   rename nonSyncBaosFactory

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to