aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java')
-rw-r--r--libjava/java/util/zip/ZipFile.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/libjava/java/util/zip/ZipFile.java b/libjava/java/util/zip/ZipFile.java
index 4b027b0..8f7ef6f 100644
--- a/libjava/java/util/zip/ZipFile.java
+++ b/libjava/java/util/zip/ZipFile.java
@@ -305,6 +305,15 @@ public class ZipFile implements ZipConstants
}
/**
+ * Calls the <code>close()</code> method when this ZipFile has not yet
+ * been explicitly closed.
+ */
+ protected void finalize() throws IOException
+ {
+ if (!closed) close();
+ }
+
+ /**
* Returns an enumeration of all Zip entries in this Zip file.
*/
public Enumeration entries()