From af62fd128af9714e00dfc41808b919f44688feb1 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 4 May 2004 05:32:46 +0000 Subject: [PATCH] 2004-05-04 Mark Wielaard * gnu/java/nio/channels/FileChannelImpl.java (finalize): New method. From-SVN: r81469 --- libjava/ChangeLog | 5 +++++ libjava/gnu/java/nio/channels/FileChannelImpl.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 0a11416648c..9f33b3ed7b0 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2004-05-04 Mark Wielaard + + * gnu/java/nio/channels/FileChannelImpl.java + (finalize): New method. + 2004-05-03 Andreas Tobler * Makefile.am (WARNINGS): Replace -W with the more speaking -Wextra. diff --git a/libjava/gnu/java/nio/channels/FileChannelImpl.java b/libjava/gnu/java/nio/channels/FileChannelImpl.java index ea6ef0e43bf..f4686b26d4f 100644 --- a/libjava/gnu/java/nio/channels/FileChannelImpl.java +++ b/libjava/gnu/java/nio/channels/FileChannelImpl.java @@ -115,6 +115,11 @@ public final class FileChannelImpl extends FileChannel this.mode = mode; } + protected void finalize() throws Throwable + { + close(); + } + public static FileChannelImpl in; public static FileChannelImpl out; public static FileChannelImpl err; -- 2.30.2