commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r740604 - /commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
Date Wed, 04 Feb 2009 04:56:11 GMT
Author: bodewig
Date: Wed Feb  4 04:56:10 2009
New Revision: 740604

URL: http://svn.apache.org/viewvc?rev=740604&view=rev
Log:
merge revision 738853 from Ant - [SANDBOX-276]

Modified:
    commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
  (contents, props changed)

Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java?rev=740604&r1=740603&r2=740604&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
(original)
+++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
Wed Feb  4 04:56:10 2009
@@ -147,16 +147,19 @@
     public ZipFile(File f, String encoding) throws IOException {
         this.encoding = encoding;
         archive = new RandomAccessFile(f, "r");
+        boolean success = false;
         try {
             populateFromCentralDirectory();
             resolveLocalFileHeaderData();
-        } catch (IOException e) {
-            try {
-                archive.close();
-            } catch (IOException e2) {
-                // swallow, throw the original exception instead
+            success = true;
+        } finally {
+            if (!success) {
+                try {
+                    archive.close();
+                } catch (IOException e2) {
+                    // swallow, throw the original exception instead
+                }
             }
-            throw e;
         }
     }
 

Propchange: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Wed Feb  4 04:56:10 2009
@@ -0,0 +1 @@
+/ant/core/trunk/src/main/org/apache/tools/zip/ZipFile.java:738853



Mime
View raw message