diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-23 14:37:09 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-23 14:37:09 +0000 |
commit | c75d2847fb297e714ce596b2a5bdb59fb3b1bb11 (patch) | |
tree | c95fa932096fa9adbd0bc90d83618970a3f84572 /libjava/gnu/java/nio/FileLockImpl.java | |
parent | d0ce7655692d3fd3784b97217cf8fc0e258df18f (diff) | |
download | ppe42-gcc-c75d2847fb297e714ce596b2a5bdb59fb3b1bb11.tar.gz ppe42-gcc-c75d2847fb297e714ce596b2a5bdb59fb3b1bb11.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76422 138bc75d-0d04-0410-961f-82ee72b054a4
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 f85d60ad67f..b621bd2a539 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 () |