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 a892cf0efd8 (chores) camel-core: cleanup parameter with constant value
a892cf0efd8 is described below

commit a892cf0efd8b883d3008552bac9d0b2d0efc5ea3
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Wed Sep 27 14:28:22 2023 +0200

    (chores) camel-core: cleanup parameter with constant value
    
    Remove failsafe from doShutdownNow as it is always false
---
 .../camel/impl/engine/BaseExecutorServiceManager.java      | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java
index 529483f5ba0..b543839cf79 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java
@@ -372,20 +372,16 @@ public class BaseExecutorServiceManager extends 
ServiceSupport implements Execut
 
     @Override
     public List<Runnable> shutdownNow(ExecutorService executorService) {
-        return doShutdownNow(executorService, false);
+        return doShutdownNow(executorService);
     }
 
-    private List<Runnable> doShutdownNow(ExecutorService executorService, 
boolean failSafe) {
+    private List<Runnable> doShutdownNow(ExecutorService executorService) {
         ObjectHelper.notNull(executorService, "executorService");
 
         List<Runnable> answer = null;
         if (!executorService.isShutdown()) {
-            if (failSafe) {
-                // log as warn, as we shutdown as fail-safe, so end user 
should see more details in the log.
-                LOG.warn("Forcing shutdown of ExecutorService: {}", 
executorService);
-            } else {
-                LOG.debug("Forcing shutdown of ExecutorService: {}", 
executorService);
-            }
+            LOG.debug("Forcing shutdown of ExecutorService: {}", 
executorService);
+
             answer = executorService.shutdownNow();
             if (LOG.isTraceEnabled()) {
                 LOG.trace("Shutdown of ExecutorService: {} is shutdown: {} and 
terminated: {}.",
@@ -393,7 +389,7 @@ public class BaseExecutorServiceManager extends 
ServiceSupport implements Execut
             }
         }
 
-        doRemove(executorService, failSafe);
+        doRemove(executorService, false);
 
         return answer;
     }

Reply via email to