2004-05-04 Mark Wielaard <mark@klomp.org>
authorMark Wielaard <mark@klomp.org>
Tue, 4 May 2004 05:32:46 +0000 (05:32 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Tue, 4 May 2004 05:32:46 +0000 (05:32 +0000)
* gnu/java/nio/channels/FileChannelImpl.java
(finalize): New method.

From-SVN: r81469

libjava/ChangeLog
libjava/gnu/java/nio/channels/FileChannelImpl.java

index 0a11416648c33e3d6b90709ec98b85e55d343f06..9f33b3ed7b07346352b8df71d0b348b3c3aa809a 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-04  Mark Wielaard  <mark@klomp.org>
+
+       * gnu/java/nio/channels/FileChannelImpl.java
+       (finalize): New method.
+
 2004-05-03  Andreas Tobler  <a.tobler@schweiz.ch>
 
        * Makefile.am (WARNINGS): Replace -W with the more speaking -Wextra.
index ea6ef0e43bf833eddb94468c757db0b62e6528a6..f4686b26d4fcac8a3d8abe6812ad719f45014f2b 100644 (file)
@@ -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;