This is an automated email from the ASF dual-hosted git repository. zregvart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 3a42f597176190df18b4267decc67031dcde921b Author: Zoran Regvart <zo...@regvart.com> AuthorDate: Mon Oct 29 11:43:01 2018 +0100 12905: No need to cast ContextRefreshedEvent. Safety applicationContext identity check. Co-Authored-By: oalles <oal...@gmail.com> --- .../src/main/java/org/apache/camel/spring/boot/RoutesCollector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java index 42167cf..3f951a5 100644 --- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java +++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java @@ -84,7 +84,7 @@ public class RoutesCollector implements ApplicationListener<ContextRefreshedEven CamelContext camelContext = applicationContext.getBean(CamelContext.class); // only add and start Camel if its stopped (initial state) - if (((ContextRefreshedEvent) event).getApplicationContext().getId().equals(this.applicationContext.getId()) + if (event.getApplicationContext() == this.applicationContext) && camelContext.getStatus().isStopped()) { LOG.debug("Post-processing CamelContext bean: {}", camelContext.getName());