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 /gnu/java/nio/channels | |
parent | cc1839a19b312b428bde1fdb22f4d84f92baba18 (diff) | |
download | classpath-99c81aa3662702a4b6488363b0a5cf4c30b89d46.tar.gz |
* gnu/java/nio/channels/FileChannelImpl.java (finalize): Check whether
fd != -1 before calling close().
Diffstat (limited to 'gnu/java/nio/channels')
-rw-r--r-- | gnu/java/nio/channels/FileChannelImpl.java | 3 |
1 files changed, 2 insertions, 1 deletions
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 |