Import GNU Classpath (libgcj-import-20081021).
2008-10-22 Matthias Klose <doko@ubuntu.com> Import GNU Classpath (libgcj-import-20081021). * Regenerate class and header files. * Regenerate auto* files. From-SVN: r141302
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user