You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/12/03 13:48:56 UTC
[camel] branch camel-3.0.x updated: Fix regression caused by
d5020bea388
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch camel-3.0.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.0.x by this push:
new daeef5a Fix regression caused by d5020bea388
daeef5a is described below
commit daeef5a15f4f07a31ce3fd957b84efd4c8c6c132
Author: lburgazzoli <lb...@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(),