commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r759338 - in /commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers: JarTestCase.java ZipTestCase.java
Date Fri, 27 Mar 2009 20:45:00 GMT
Author: sebb
Date: Fri Mar 27 20:44:59 2009
New Revision: 759338

URL: http://svn.apache.org/viewvc?rev=759338&view=rev
Log:
Close files

Modified:
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/JarTestCase.java
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/JarTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/JarTestCase.java?rev=759338&r1=759337&r2=759338&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/JarTestCase.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/JarTestCase.java
Fri Mar 27 20:44:59 2009
@@ -79,6 +79,7 @@
         out.close();
         
         in.close();
+        is.close();
     }
 	
 	public void testJarUnarchiveAll() throws Exception {
@@ -102,6 +103,7 @@
 		}
 		
 		in.close();
+		is.close();
 	}
 
 }

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java?rev=759338&r1=759337&r2=759338&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
Fri Mar 27 20:44:59 2009
@@ -57,10 +57,9 @@
         } finally {
             if (os != null) {
                 os.close();
-            } else {
-                out.close();
             }
         }
+        out.close();
 
         // Unarchive the same
         List results = new ArrayList();
@@ -86,10 +85,9 @@
         } finally {
             if (in != null) {
                 in.close();
-            } else {
-                is.close();
             }
         }
+        is.close();
 
         assertEquals(results.size(), 2);
         File result = (File)results.get(0);



Mime
View raw message