commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1582843 - in /commons/proper/io/trunk/src/test/java/org/apache/commons/io: input/BOMInputStreamTest.java output/ByteArrayOutputStreamTestCase.java
Date Fri, 28 Mar 2014 17:46:05 GMT
Author: sebb
Date: Fri Mar 28 17:46:05 2014
New Revision: 1582843

URL: http://svn.apache.org/r1582843
Log:
Close some resources

Modified:
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java?rev=1582843&r1=1582842&r2=1582843&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java
(original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java
Fri Mar 28 17:46:05 2014
@@ -180,6 +180,8 @@ public class BOMInputStreamTest {
         this.readFile(bomInputStream);
         bomInputStream.reset();
         this.readFile(bomInputStream);
+        inputStream.close();
+        bomInputStream.close();
     }
 
     private void readFile(final BOMInputStream bomInputStream) throws Exception {
@@ -214,6 +216,7 @@ public class BOMInputStreamTest {
 
         in.close();
         del.assertCloseCalled();
+        del.close();
     }
 
     @Test

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java?rev=1582843&r1=1582842&r2=1582843&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java
Fri Mar 28 17:46:05 2014
@@ -123,6 +123,8 @@ public class ByteArrayOutputStreamTestCa
         refData = ref.toByteArray();
         assertEquals(8254, baoutData.length);
         checkByteArrays(refData, baoutData);
+        baout.close();
+        in.close();
     }
 
     public void testToInputStreamWithReset() throws IOException {
@@ -155,6 +157,8 @@ public class ByteArrayOutputStreamTestCa
         refData = ref.toByteArray();
         assertEquals(30, baoutData.length);
         checkByteArrays(refData, baoutData);
+        baout.close();
+        in.close();
     }
 
     public void testStream() throws Exception {
@@ -210,6 +214,8 @@ public class ByteArrayOutputStreamTestCa
         assertSame(baos1.toByteArray(), baos2.toByteArray());
         baos1.close();
         baos2.close();
+        baout.close();
+        baout1.close();
     }
 }
 



Mime
View raw message