You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2009/02/04 05:56:11 UTC
svn commit: r740604 -
/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
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