This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new dca5840 Fix regression caused by d5020bea388 dca5840 is described below commit dca5840eab4c6412eadd1268e73ff5a0c5d0feb5 Author: lburgazzoli <lburgazz...@gmail.com> AuthorDate: Tue Dec 3 14:43:48 2019 +0100 Fix regression caused by d5020bea388 --- .../java/org/apache/camel/main/BaseMainSupport.java | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java index 6a03bbb..584fec5 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java @@ -488,12 +488,6 @@ public abstract class BaseMainSupport extends ServiceSupport { if (propertyPlaceholderLocations != null) { PropertiesComponent pc = camelContext.getPropertiesComponent(); pc.addLocation(propertyPlaceholderLocations); - if (initialProperties != null) { - pc.setInitialProperties(initialProperties); - } - if (overrideProperties != null) { - pc.setOverrideProperties(overrideProperties); - } LOG.info("Using properties from: {}", propertyPlaceholderLocations); } else if (ObjectHelper.isNotEmpty(defaultPropertyPlaceholderLocation) && !ObjectHelper.equal("false", defaultPropertyPlaceholderLocation)) { // lets default to defaultPropertyPlaceholderLocation if @@ -502,15 +496,18 @@ public abstract class BaseMainSupport extends ServiceSupport { if (pc.getLocations().isEmpty()) { pc.addLocation(defaultPropertyPlaceholderLocation); } - if (initialProperties != null) { - pc.setInitialProperties(initialProperties); - } - if (overrideProperties != null) { - pc.setOverrideProperties(overrideProperties); - } + LOG.info("Using properties from {}", defaultPropertyPlaceholderLocation); } + PropertiesComponent pc = camelContext.getPropertiesComponent(); + if (initialProperties != null) { + pc.setInitialProperties(initialProperties); + } + if (overrideProperties != null) { + pc.setOverrideProperties(overrideProperties); + } + if (mainConfigurationProperties.getDurationMaxMessages() > 0 || mainConfigurationProperties.getDurationMaxIdleSeconds() > 0) { // register lifecycle so we can trigger to shutdown the JVM when maximum number of messages has been processed EventNotifier notifier = new MainDurationEventNotifier(camelContext, mainConfigurationProperties.getDurationMaxMessages(),