From 421ac6d74fe05b3f81e1f62ea6be0e73e4db7db8 Mon Sep 17 00:00:00 2001
From: Piotr Idzik <65706193+vil02@users.noreply.github.com>
Date: Wed, 1 Oct 2025 09:06:50 +0200
Subject: [PATCH] style: include `RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE`
(#6559)
---
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 4f327a443..d2e094556 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 f0d8ea8f7..bf2b928ec 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 class LFUCache {
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;