From 5efc0d44e74df330485f4f49cdee8427fb2cccd6 Mon Sep 17 00:00:00 2001 From: Paolo Patierno Date: Wed, 8 Jan 2025 09:16:00 +0100 Subject: [PATCH] Fixed check Optional not null (#11015) Signed-off-by: Paolo Patierno --- .../io/strimzi/operator/topic/BatchingTopicController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/topic-operator/src/main/java/io/strimzi/operator/topic/BatchingTopicController.java b/topic-operator/src/main/java/io/strimzi/operator/topic/BatchingTopicController.java index f5856a0a3d..bb7775c7c5 100644 --- a/topic-operator/src/main/java/io/strimzi/operator/topic/BatchingTopicController.java +++ b/topic-operator/src/main/java/io/strimzi/operator/topic/BatchingTopicController.java @@ -535,8 +535,8 @@ private Results filterOutNonAlterableConfigChanges( reconcilableTopics.forEach(reconcilableTopic -> { var configChanges = results.getConfigChanges().stream() .filter(pair -> pair.getKey().equals(reconcilableTopic)).findFirst(); - if (configChanges != null && configChanges.isEmpty()) { - LOGGER.debugCr(reconcilableTopic.reconciliation(), "Config changes {}", configChanges); + if (configChanges.isPresent()) { + LOGGER.debugCr(reconcilableTopic.reconciliation(), "Config changes: {}", configChanges.get()); } else { LOGGER.debugCr(reconcilableTopic.reconciliation(), "No config change"); }