From c2ed5c937b94f61b40ee9e329bf80b0a62fb4fbc Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 30 Apr 2022 11:36:13 +0200 Subject: [PATCH] =?utf8?q?Fehler=20in=20Shutdown-Logik=20f=C3=BCr=20den=20?= =?utf8?q?`ExecutorService`=20korrigiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/de/juplo/kafka/Application.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/juplo/kafka/Application.java b/src/main/java/de/juplo/kafka/Application.java index 6601e6d..b5bd1b9 100644 --- a/src/main/java/de/juplo/kafka/Application.java +++ b/src/main/java/de/juplo/kafka/Application.java @@ -46,12 +46,12 @@ public class Application implements ApplicationRunner } finally { - if (!executor.isShutdown()) + if (!executor.isTerminated()) { log.warn("Forcing shutdown of ExecutorService!"); executor .shutdownNow() - .forEach(runnable -> log.warn("Unfinished task: {}", runnable.getClass().getSimpleName())); + .forEach(runnable -> log.warn("Unprocessed task: {}", runnable.getClass().getSimpleName())); } log.info("Shutdow of ExecutorService finished"); } -- 2.20.1