From: Michael Koch Date: Sat, 17 Jul 2004 08:48:31 +0000 (+0000) Subject: 2004-07-17 Michael Koch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2ccc5a9508b416a39b63eb822ff674bcde7a9ac0;p=gcc.git 2004-07-17 Michael Koch * gnu/java/nio/channels/FileChannelImpl.java (finalize): Added javadoc. From-SVN: r84858 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 2648b5771d9..e9a2a50cdce 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2004-07-17 Michael Koch + + * gnu/java/nio/channels/FileChannelImpl.java + (finalize): Added javadoc. + 2004-07-17 Guilhem Lavaux * java/text/CollationElementIterator.java diff --git a/libjava/gnu/java/nio/channels/FileChannelImpl.java b/libjava/gnu/java/nio/channels/FileChannelImpl.java index f4686b26d4f..8b3d0fc86b3 100644 --- a/libjava/gnu/java/nio/channels/FileChannelImpl.java +++ b/libjava/gnu/java/nio/channels/FileChannelImpl.java @@ -115,11 +115,6 @@ 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; @@ -137,6 +132,14 @@ public final class FileChannelImpl extends FileChannel protected native void implCloseChannel() throws IOException; + /** + * Makes sure the Channel is properly closed. + */ + protected void finalize() throws IOException + { + this.close(); + } + public int read (ByteBuffer dst) throws IOException { int result;