You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/10/17 11:56:11 UTC
[camel] branch main updated: (chores) camel-core: minor cleanup in the shutdown strategy
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 87278e71781 (chores) camel-core: minor cleanup in the shutdown strategy
87278e71781 is described below
commit 87278e7178168ee99daf85360f9e3ba92b8a9355
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Oct 17 12:55:41 2023 +0200
(chores) camel-core: minor cleanup in the shutdown strategy
---
.../apache/camel/impl/engine/DefaultShutdownStrategy.java | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
index ff5beac8897..b6c4123eca8 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
@@ -199,15 +199,11 @@ public class DefaultShutdownStrategy extends ServiceSupport implements ShutdownS
routesOrdered.sort(comparator);
if (logger.shouldLog()) {
- if (suspendOnly) {
- String msg = String.format("Starting to graceful suspend %s routes (timeout %s %s)", routesOrdered.size(),
- timeout, timeUnit.toString().toLowerCase(Locale.ENGLISH));
- logger.log(msg);
- } else {
- String msg = String.format("Starting to graceful shutdown %s routes (timeout %s %s)", routesOrdered.size(),
- timeout, timeUnit.toString().toLowerCase(Locale.ENGLISH));
- logger.log(msg);
- }
+ final String action = suspendOnly ? "suspend" : "shutdown";
+
+ String msg = String.format("Starting to graceful %s %s routes (timeout %s %s)", action, routesOrdered.size(),
+ timeout, timeUnit.toString().toLowerCase(Locale.ENGLISH));
+ logger.log(msg);
}
// use another thread to perform the shutdowns so we can support timeout