From 878962e8b7ddeb1a8c2f94c74a43924371c5355d Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Tue, 1 Oct 2024 20:07:11 +0200 Subject: [PATCH] Fix `log4j-spring-cloud-config-client` --- .../logging/log4j/core/config/AbstractConfiguration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java index 0b3c9d2c4ab..27d85270ace 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java @@ -366,12 +366,12 @@ private void monitorSource(final Reconfigurable reconfigurable, final Configurat @Override public void start() { // Preserve the prior behavior of initializing during start if not initialized. - if (getState().equals(State.INITIALIZING)) { + if (getState() == State.INITIALIZING) { initialize(); } LOGGER.info("Starting configuration {}...", this); this.setStarting(); - if (watchManager.getIntervalSeconds() > 0) { + if (watchManager.getIntervalSeconds() >= 0) { LOGGER.info( "Start watching for changes to {} every {} seconds", getConfigurationSource(),