You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/05/12 06:54:57 UTC
[camel] 01/02: Fixed potential NPE
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 9292390315bc33fa2e2d8b9e87552d2c3b0ca1bf
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun May 12 08:37:21 2019 +0200
Fixed potential NPE
---
.../java/org/apache/camel/impl/engine/AbstractCamelContext.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java b/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index 49e4eaf..de81632 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -2486,9 +2486,10 @@ public abstract class AbstractCamelContext extends ServiceSupport implements Cam
// stop route inputs in the same order as they was started so we stop
// the very first inputs first
try {
- // force shutting down routes as they may otherwise cause shutdown
- // to hang
- shutdownStrategy.shutdownForced(this, getRouteStartupOrder());
+ // force shutting down routes as they may otherwise cause shutdown to hang
+ if (shutdownStrategy != null) {
+ shutdownStrategy.shutdownForced(this, getRouteStartupOrder());
+ }
} catch (Throwable e) {
log.warn("Error occurred while shutting down routes. This exception will be ignored.", e);
}