[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath
Kaffe CVS
cvs-commits at kaffe.org
Fri Jan 2 19:40:03 PST 2004
PatchSet 4270
Date: 2004/01/03 03:30:09
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath
2004-01-03 Dalibor Topic <robilad at kaffe.org>
Resynced with GNU Classpath.
2003-12-27 Michael Koch <konqueror at gmx.de>
* java/nio/channels/spi/AbstractSelector.java:
Added import for java.nio.channels.ClosedSelectorException.
(close): Added synchronized to method declaration.
(cancelledKeys): Throw ClosedSelectorException if is closed.
(cancelKey): Synchronize on cancelled key set before key.
Members:
ChangeLog:1.1857->1.1858
libraries/javalib/java/nio/channels/spi/AbstractSelector.java:1.3->1.4
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1857 kaffe/ChangeLog:1.1858
--- kaffe/ChangeLog:1.1857 Sat Jan 3 03:15:10 2004
+++ kaffe/ChangeLog Sat Jan 3 03:30:09 2004
@@ -4,6 +4,18 @@
2003-12-27 Michael Koch <konqueror at gmx.de>
+ * java/nio/channels/spi/AbstractSelector.java:
+ Added import for java.nio.channels.ClosedSelectorException.
+ (close): Added synchronized to method declaration.
+ (cancelledKeys): Throw ClosedSelectorException if is closed.
+ (cancelKey): Synchronize on cancelled key set before key.
+
+2004-01-03 Dalibor Topic <robilad at kaffe.org>
+
+ Resynced with GNU Classpath.
+
+ 2003-12-27 Michael Koch <konqueror at gmx.de>
+
* java/io/ObjectStreamField.java
(isShared): Documentation added.
Index: kaffe/libraries/javalib/java/nio/channels/spi/AbstractSelector.java
diff -u kaffe/libraries/javalib/java/nio/channels/spi/AbstractSelector.java:1.3 kaffe/libraries/javalib/java/nio/channels/spi/AbstractSelector.java:1.4
--- kaffe/libraries/javalib/java/nio/channels/spi/AbstractSelector.java:1.3 Wed Oct 22 10:34:55 2003
+++ kaffe/libraries/javalib/java/nio/channels/spi/AbstractSelector.java Sat Jan 3 03:30:10 2004
@@ -39,6 +39,7 @@
package java.nio.channels.spi;
import java.io.IOException;
+import java.nio.channels.ClosedSelectorException;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.util.Set;
@@ -64,7 +65,7 @@
*
* @exception IOException If an error occurs
*/
- public final void close () throws IOException
+ public final synchronized void close () throws IOException
{
if (closed)
return;
@@ -102,12 +103,18 @@
protected final Set cancelledKeys()
{
+ if (!isOpen())
+ throw new ClosedSelectorException();
+
return cancelledKeys;
}
final void cancelKey (AbstractSelectionKey key)
{
- cancelledKeys.remove (key);
+ synchronized (cancelledKeys)
+ {
+ cancelledKeys.remove(key);
+ }
}
/**
More information about the kaffe
mailing list