commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1656354 - /commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/BitStreamTest.java
Date Sun, 01 Feb 2015 19:40:43 GMT
Author: sebb
Date: Sun Feb  1 19:40:43 2015
New Revision: 1656354

URL: http://svn.apache.org/r1656354
Log:
Avoid unclosed stream warnings

Modified:
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/BitStreamTest.java

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/BitStreamTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/BitStreamTest.java?rev=1656354&r1=1656353&r2=1656354&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/BitStreamTest.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/BitStreamTest.java
Sun Feb  1 19:40:43 2015
@@ -30,6 +30,7 @@ public class BitStreamTest extends TestC
         assertEquals("next bit", -1, stream.nextBit());
         assertEquals("next bit", -1, stream.nextBit());
         assertEquals("next bit", -1, stream.nextBit());
+        stream.close();
     }
 
     public void testStream() throws Exception {
@@ -54,12 +55,14 @@ public class BitStreamTest extends TestC
         assertEquals("bit 15", 0, stream.nextBit());
         
         assertEquals("next bit", -1, stream.nextBit());
+        stream.close();
     }
 
     public void testNextByteFromEmptyStream() throws Exception {
         BitStream stream = new BitStream(new ByteArrayInputStream(new byte[0]));
         assertEquals("next byte", -1, stream.nextByte());
         assertEquals("next byte", -1, stream.nextByte());
+        stream.close();
     }
 
     public void testReadAlignedBytes() throws Exception {
@@ -67,6 +70,7 @@ public class BitStreamTest extends TestC
         assertEquals("next byte", 0xEA, stream.nextByte());
         assertEquals("next byte", 0x35, stream.nextByte());
         assertEquals("next byte", -1, stream.nextByte());
+        stream.close();
     }
 
     public void testNextByte() throws Exception {
@@ -78,5 +82,6 @@ public class BitStreamTest extends TestC
         
         assertEquals("next byte", 0x5E, stream.nextByte());
         assertEquals("next byte", -1, stream.nextByte()); // not enough bits left to read
a byte
+        stream.close();
     }
 }



Mime
View raw message