diff --git a/common/src/main/java/io/netty/util/internal/MpscLinkedQueue.java b/common/src/main/java/io/netty/util/internal/MpscLinkedQueue.java
index c1b931a562..a1a8c2c9d1 100644
--- a/common/src/main/java/io/netty/util/internal/MpscLinkedQueue.java
+++ b/common/src/main/java/io/netty/util/internal/MpscLinkedQueue.java
@@ -32,22 +32,19 @@ import java.util.Queue;
* A lock-free concurrent single-consumer multi-producer {@link Queue}.
* It allows multiple producer threads to perform the following operations simultaneously:
*
- * - {@link #offer(Object)}, {@link #add(Object)}, and {@link #addAll(Collection)}
- * - All other read-only operations:
- *
- * - {@link #contains(Object)} and {@link #containsAll(Collection)}
- * - {@link #element()}, {@link #peek()}
- * - {@link #size()} and {@link #isEmpty()}
- * - {@link #iterator()} (except {@link Iterator#remove()}
- * - {@link #toArray()} and {@link #toArray(Object[])}
- *
- *
+ * - {@link #offer(Object)}, {@link #add(Object)}, {@link #addAll(Collection)}
+ * - {@link #isEmpty()}
*
* .. while only one consumer thread is allowed to perform the following operations exclusively:
*
- * - {@link #poll()} and {@link #remove()}
- * - {@link #remove(Object)}, {@link #removeAll(Collection)}, and {@link #retainAll(Collection)}
- * - {@link #clear()}
{@link #}
+ * - {@link #poll()} and {@link #remove()}
+ * - {@link #element()}, {@link #peek()}
+ * - {@link #remove(Object)}, {@link #removeAll(Collection)}, and {@link #retainAll(Collection)}
+ * - {@link #clear()}
{@link #}
+ * - {@link #iterator()}
+ * - {@link #toArray()} and {@link #toArray(Object[])}
+ * - {@link #contains(Object)} and {@link #containsAll(Collection)}
+ * - {@link #size()}
*
*
* The behavior of this implementation is undefined if you perform the operations for a consumer thread only
@@ -184,7 +181,7 @@ final class MpscLinkedQueue extends MpscLinkedQueueTailRef implements Queu
@Override
public boolean isEmpty() {
- return peekNode() == null;
+ return headRef() == tailRef();
}
@Override
diff --git a/common/src/main/java/io/netty/util/internal/MpscLinkedQueueHeadRef.java b/common/src/main/java/io/netty/util/internal/MpscLinkedQueueHeadRef.java
index cf8d4a91b2..fabcf42ed4 100644
--- a/common/src/main/java/io/netty/util/internal/MpscLinkedQueueHeadRef.java
+++ b/common/src/main/java/io/netty/util/internal/MpscLinkedQueueHeadRef.java
@@ -38,7 +38,7 @@ abstract class MpscLinkedQueueHeadRef extends MpscLinkedQueuePad0 implemen
UPDATER = updater;
}
- private transient volatile MpscLinkedQueueNode headRef;
+ private transient volatile MpscLinkedQueueNode headRef;
protected final MpscLinkedQueueNode headRef() {
return headRef;