aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2003-02-21 12:35:49 +0000
committerMark Wielaard <mark@gcc.gnu.org>2003-02-21 12:35:49 +0000
commitfefabda543ffb8952378d743a93a9f43bc2a7ecb (patch)
treef41df673fcc5190ad675e34516efc344c34f7da3 /libjava/java
parent9dca2ad51023866c0fdc1bd060b9f3ba7319f2e8 (diff)
downloadgcc-fefabda543ffb8952378d743a93a9f43bc2a7ecb.zip
gcc-fefabda543ffb8952378d743a93a9f43bc2a7ecb.tar.gz
gcc-fefabda543ffb8952378d743a93a9f43bc2a7ecb.tar.bz2
* java/util/zip/ZipFile.java (finalize): New method.
From-SVN: r63218
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()