diff --git a/core/src/main/java/org/elasticsearch/common/cache/Cache.java b/core/src/main/java/org/elasticsearch/common/cache/Cache.java index a62ec312c74..92b3b899e46 100644 --- a/core/src/main/java/org/elasticsearch/common/cache/Cache.java +++ b/core/src/main/java/org/elasticsearch/common/cache/Cache.java @@ -604,6 +604,7 @@ public class Cache { if (before == null) { // removing the head + assert head == entry; head = after; if (head != null) { head.before = null; @@ -616,6 +617,7 @@ public class Cache { if (after == null) { // removing tail + assert tail == entry; tail = before; if (tail != null) { tail.after = null;