re PR libgcj/21136 ([4.0 only] tryLock waits for the lock, and lock doesn't)
authorLuca Barbieri <luca.barbieri@gmail.com>
Tue, 26 Apr 2005 21:49:23 +0000 (21:49 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 26 Apr 2005 21:49:23 +0000 (21:49 +0000)
2005-04-26  Luca Barbieri  <luca.barbieri@gmail.com>

PR libgcj/21136:
* gnu/java/nio/channels/FileChannelImpl.java (tryLock): Pass
'false' to native lock().
(lock): Pass 'true' to native lock().

From-SVN: r98792

libjava/ChangeLog
libjava/gnu/java/nio/channels/FileChannelImpl.java

index 9370311..fcd667f 100644 (file)
@@ -1,3 +1,10 @@
+2005-04-26  Luca Barbieri  <luca.barbieri@gmail.com>
+
+       PR libgcj/21136:
+       * gnu/java/nio/channels/FileChannelImpl.java (tryLock): Pass
+       'false' to native lock().
+       (lock): Pass 'true' to native lock().
+
 2005-04-26  Michael Koch  <konqueror@gmx.de>
 
        * java/net/InetAddress.java:
index e5b02e9..9d978c9 100644 (file)
@@ -419,7 +419,7 @@ public final class FileChannelImpl extends FileChannel
     try
       {
        begin();
-        lock(position, size, shared, true);
+        lock(position, size, shared, false);
        completed = true;
        return new FileLockImpl(this, position, size, shared);
       }
@@ -451,7 +451,7 @@ public final class FileChannelImpl extends FileChannel
 
     try
       {
-       boolean lockable = lock(position, size, shared, false);
+       boolean lockable = lock(position, size, shared, true);
        completed = true;
        return (lockable
                ? new FileLockImpl(this, position, size, shared)