summaryrefslogtreecommitdiff
path: root/java/nio/channels/SelectionKey.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/nio/channels/SelectionKey.java')
-rw-r--r--java/nio/channels/SelectionKey.java6
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;
}