diff options
Diffstat (limited to 'libjava/classpath/java/lang/ThreadLocal.java')
-rw-r--r-- | libjava/classpath/java/lang/ThreadLocal.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libjava/classpath/java/lang/ThreadLocal.java b/libjava/classpath/java/lang/ThreadLocal.java index 14778c6..1f60a55 100644 --- a/libjava/classpath/java/lang/ThreadLocal.java +++ b/libjava/classpath/java/lang/ThreadLocal.java @@ -90,7 +90,7 @@ public class ThreadLocal<T> * user. Do not expose this to the public. Package visible for use by * InheritableThreadLocal */ - static final Object notFound = new Object(); + static final Object sentinel = new Object(); /** * The base for the computation of the next hash for a thread local. @@ -100,7 +100,8 @@ public class ThreadLocal<T> /** * Allocate a new hash. */ - private synchronized int computeNextHash() { + private synchronized int computeNextHash() + { return nextHashBase++ * 6709; } @@ -144,7 +145,7 @@ public class ThreadLocal<T> // Note that we don't have to synchronize, as only this thread will // ever modify the map. T value = (T) map.get(this); - if (value == notFound) + if (value == sentinel) { value = initialValue(); map.set(this, value); |