This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: gnu.java.nio.channels.FileChannelImpl
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Sat, 17 Jul 2004 10:52:11 +0200
- Subject: Patch: gnu.java.nio.channels.FileChannelImpl
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
I just commited the attached patch to merge
gnu.java.nio.channels.FileChannelImpl more with classpath.
Michael
2004-07-17 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/channels/FileChannelImpl.java
(finalize): Added javadoc.
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA+OjBWSOgCCdjSDsRAlJKAKCXhxCzE8w7wZq8d3Gpodr4v1XNbQCfUutV
jZD8l1EQYOE6uiHvblxDyEM=
=7tnk
-----END PGP SIGNATURE-----
Index: gnu/java/nio/channels/FileChannelImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/channels/FileChannelImpl.java,v
retrieving revision 1.4
diff -u -b -B -r1.4 FileChannelImpl.java
--- gnu/java/nio/channels/FileChannelImpl.java 4 May 2004 05:32:46 -0000 1.4
+++ gnu/java/nio/channels/FileChannelImpl.java 17 Jul 2004 08:48:15 -0000
@@ -115,11 +115,6 @@
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 @@
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;