re PR libgcj/21136 ([4.0 only] tryLock waits for the lock, and lock doesn't)

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
This commit is contained in:
Luca Barbieri 2005-04-26 21:49:23 +00:00 committed by Tom Tromey
parent 583db39167
commit 31f0451e7e
2 changed files with 9 additions and 2 deletions

View 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:

View 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)