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 7d04136734
commit aa5306adc1

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();