From 130f16087c7bd42f2aca828f51f00b6a75055409 Mon Sep 17 00:00:00 2001
From: vil02 <65706193+vil02@users.noreply.github.com>
Date: Wed, 1 Oct 2025 00:05:45 +0200
Subject: [PATCH] style: include `RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE`
---
spotbugs-exclude.xml | 3 ---
.../java/com/thealgorithms/datastructures/caches/LFUCache.java | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
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;