From fefabda543ffb8952378d743a93a9f43bc2a7ecb Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 21 Feb 2003 12:35:49 +0000 Subject: * java/util/zip/ZipFile.java (finalize): New method. From-SVN: r63218 --- libjava/java/util/zip/ZipFile.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libjava/java') 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 close() 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() -- cgit v1.1