summaryrefslogtreecommitdiffstats
path: root/libjava/java/util/zip/ZipFile.java
diff options
context:
space:
mode:
authormark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-21 12:35:49 +0000
committermark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-21 12:35:49 +0000
commite736ae061c3d2631cd27a53d0de839ab17710a62 (patch)
treef41df673fcc5190ad675e34516efc344c34f7da3 /libjava/java/util/zip/ZipFile.java
parent43585301cffd714beb29f29db87cfb05af5fe288 (diff)
downloadppe42-gcc-e736ae061c3d2631cd27a53d0de839ab17710a62.tar.gz
ppe42-gcc-e736ae061c3d2631cd27a53d0de839ab17710a62.zip
* java/util/zip/ZipFile.java (finalize): New method.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63218 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/util/zip/ZipFile.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 4b027b088a9..8f7ef6f8d6f 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()
OpenPOWER on IntegriCloud