Correct ConcurrentHashMapV8 bitwise arithmetic

Previously ConcurrentHashMapV8 evaulated ((x | 1) == 0), an expression
that always returned false.  This commit brings Netty closer to the
Java 8 implementation.
This commit is contained in:
Andrew Gaul 2014-02-27 21:54:51 -08:00 committed by Norman Maurer
parent dd38c8fa78
commit 1f5b74762b

View File

@ -2672,7 +2672,7 @@ public class ConcurrentHashMapV8<K,V>
return;
}
}
else if ((s | WAITER) == 0) {
else if ((s & WAITER) == 0) {
if (U.compareAndSwapInt(this, LOCKSTATE, s, s | WAITER)) {
waiting = true;
waiter = Thread.currentThread();