diff --git a/spotbugs-exclude.xml b/spotbugs-exclude.xml index 4f327a443781..d2e094556d61 100644 --- a/spotbugs-exclude.xml +++ b/spotbugs-exclude.xml @@ -80,9 +80,6 @@ - - - diff --git a/src/main/java/com/thealgorithms/datastructures/caches/LFUCache.java b/src/main/java/com/thealgorithms/datastructures/caches/LFUCache.java index f0d8ea8f7ff3..bf2b928ec33c 100644 --- a/src/main/java/com/thealgorithms/datastructures/caches/LFUCache.java +++ b/src/main/java/com/thealgorithms/datastructures/caches/LFUCache.java @@ -132,7 +132,7 @@ public void put(K key, V value) { private void addNodeWithUpdatedFrequency(Node node) { if (tail != null && head != null) { Node temp = this.head; - while (temp != null) { + while (true) { if (temp.frequency > node.frequency) { if (temp == head) { node.next = temp;