From 2e3aa13eb5170ae6daaf1e18ce77aa54c27b2aa6 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Mon, 15 Dec 2025 16:27:21 +0100 Subject: [PATCH] [bugfix] Don't produce a warning that we expected zero listeners when there are zero listeners --- .../src/main/java/org/exist/storage/NotificationService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exist-core/src/main/java/org/exist/storage/NotificationService.java b/exist-core/src/main/java/org/exist/storage/NotificationService.java index a2f7ef4498..0ff1ac8cc5 100644 --- a/exist-core/src/main/java/org/exist/storage/NotificationService.java +++ b/exist-core/src/main/java/org/exist/storage/NotificationService.java @@ -104,7 +104,10 @@ public synchronized void debug() { @Override public void shutdown() { synchronized (this) { - LOG.warn("Expected 0 listeners at shutdown, but {} listeners are still registered", listeners.size()); + final int remainingListeners = listeners.size(); + if (remainingListeners > 0) { + LOG.warn("Expected 0 listeners at shutdown, but {} listeners are still registered", remainingListeners); + } } BrokerPoolService.super.shutdown(); }