diff options
author | Mark Wielaard <mark@klomp.org> | 2005-09-11 19:29:24 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2005-09-11 19:29:24 +0000 |
commit | 99c81aa3662702a4b6488363b0a5cf4c30b89d46 (patch) | |
tree | 0b434241d98d90f7036dbca84736ef17d505321f | |
parent | cc1839a19b312b428bde1fdb22f4d84f92baba18 (diff) | |
download | classpath-99c81aa3662702a4b6488363b0a5cf4c30b89d46.tar.gz |
* gnu/java/nio/channels/FileChannelImpl.java (finalize): Check whether
fd != -1 before calling close().
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gnu/java/nio/channels/FileChannelImpl.java | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2005-09-11 Mark Wielaard <mark@klomp.org> + + * gnu/java/nio/channels/FileChannelImpl.java (finalize): Check whether + fd != -1 before calling close(). + 2005-09-10 David Gilbert <david.gilbert@object-refinery.com> * javax/swing/plaf/metal/MetalBorders.java diff --git a/gnu/java/nio/channels/FileChannelImpl.java b/gnu/java/nio/channels/FileChannelImpl.java index 0ee5d3fc2..466f3dd55 100644 --- a/gnu/java/nio/channels/FileChannelImpl.java +++ b/gnu/java/nio/channels/FileChannelImpl.java @@ -175,7 +175,8 @@ public final class FileChannelImpl extends FileChannel */ protected void finalize() throws IOException { - this.close(); + if (fd != -1) + close(); } public int read (ByteBuffer dst) throws IOException |