commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1532267 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
Date Tue, 15 Oct 2013 09:49:33 GMT
Author: bodewig
Date: Tue Oct 15 09:49:33 2013
New Revision: 1532267

URL: http://svn.apache.org/r1532267
Log:
clear password on close, don't swallow exception

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java?rev=1532267&r1=1532266&r2=1532267&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
Tue Oct 15 09:49:33 2013
@@ -110,13 +110,14 @@ public class SevenZFile {
     /**
      * Closes the archive.
      */
-    public void close() {
+    public void close() throws IOException {
         if (file != null) {
             try {
                 file.close();
-            } catch (IOException ignored) { // NOPMD
+            } finally {
+                file = null;
+                password = null;
             }
-            file = null;
         }
     }
     



Mime
View raw message