diff options
| author | Michael Koch <konqueror@gmx.de> | 2004-01-23 14:37:09 +0000 |
|---|---|---|
| committer | Michael Koch <mkoch@gcc.gnu.org> | 2004-01-23 14:37:09 +0000 |
| commit | 9719e37cec64c4a3e2b31c1141dbdd5979f6d69c (patch) | |
| tree | c95fa932096fa9adbd0bc90d83618970a3f84572 /libjava/gnu/java/nio/FileLockImpl.java | |
| parent | ca1d829f319a0919f6543933cd7f561e3ae5bf64 (diff) | |
| download | gcc-9719e37cec64c4a3e2b31c1141dbdd5979f6d69c.zip gcc-9719e37cec64c4a3e2b31c1141dbdd5979f6d69c.tar.gz gcc-9719e37cec64c4a3e2b31c1141dbdd5979f6d69c.tar.bz2 | |
FileLockImpl.java: Fixed filename in copyright.
2004-01-23 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/FileLockImpl.java:
Fixed filename in copyright.
(released): Removed.
(finalize): New method.
* gnu/java/nio/natFileLockImpl.cc
(releaseImpl): Implemented.
* java/nio/channels/FileChannelImpl.java:
Reworked imports.
(lock): Implemented.
(lockImpl): New method.
(tryLock): Implemented.
(tryLockImpl): New method.
* java/nio/channels/natFileChannelImpl.cc
(lockImpl): New method.
(tryLockImpl): New method.
From-SVN: r76422
Diffstat (limited to 'libjava/gnu/java/nio/FileLockImpl.java')
| -rw-r--r-- | libjava/gnu/java/nio/FileLockImpl.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libjava/gnu/java/nio/FileLockImpl.java b/libjava/gnu/java/nio/FileLockImpl.java index f85d60a..b621bd2 100644 --- a/libjava/gnu/java/nio/FileLockImpl.java +++ b/libjava/gnu/java/nio/FileLockImpl.java @@ -1,5 +1,5 @@ -/* FileChannelImpl.java -- - Copyright (C) 2002 Free Software Foundation, Inc. +/* FileLockImpl.java -- + Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,14 +60,24 @@ public class FileLockImpl extends FileLock } private FileDescriptor fd; - private boolean released; public FileLockImpl (FileDescriptor fd, FileChannel channel, long position, long size, boolean shared) { super (channel, position, size, shared); this.fd = fd; - this.released = false; + } + + public void finalize() + { + try + { + release(); + } + catch (IOException e) + { + // Ignore this. + } } public boolean isValid () |
