diff options
author | Mark Wielaard <mark@klomp.org> | 2006-08-07 22:23:00 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2006-08-07 22:23:00 +0000 |
commit | 4366b4849b3ed205e3688304721473a8df8e4bb7 (patch) | |
tree | 0f0b28ce21de2cc0b7c0d402065c5c717331a0d0 /java/nio/channels/SelectionKey.java | |
parent | 8e44dc1fa015c1e58adce96dea2793c46f9bb218 (diff) | |
download | classpath-4366b4849b3ed205e3688304721473a8df8e4bb7.tar.gz |
2006-08-07 Tom Tromey <tromey@redhat.com>
PR libgcj/23682:
* java/nio/channels/SelectionKey.java (attach): Now synchronized.
(attachment): Likewise.
* java/nio/channels/spi/AbstractSelectionKey.java (cancel): Now
synchronized.
(isValid): Likewise.
* gnu/java/nio/SelectionKeyImpl.java (impl): Now final
(ch): Likewise.
(interestOps): Synchronize.
(readyOps): Likewise.
* gnu/java/nio/SelectorImpl.java (register): Synchronize around
interestOps call.
Diffstat (limited to 'java/nio/channels/SelectionKey.java')
-rw-r--r-- | java/nio/channels/SelectionKey.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/java/nio/channels/SelectionKey.java b/java/nio/channels/SelectionKey.java index 5219b6bff..9723faf52 100644 --- a/java/nio/channels/SelectionKey.java +++ b/java/nio/channels/SelectionKey.java @@ -1,5 +1,5 @@ /* SelectionKey.java -- - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,7 +60,7 @@ public abstract class SelectionKey /** * Attaches obj to the key and returns the old attached object. */ - public final Object attach(Object obj) + public final synchronized Object attach(Object obj) { Object old = attached; attached = obj; @@ -70,7 +70,7 @@ public abstract class SelectionKey /** * Returns the object attached to the key. */ - public final Object attachment() + public final synchronized Object attachment() { return attached; } |