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 2021/02/08 16:33:21 UTC
[camel] branch master updated: camel-main - Should pre check if JVM
sys prop autoconfiguration is enabled before allowing to use it.
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
The following commit(s) were added to refs/heads/master by this push:
new 6eb9b40 camel-main - Should pre check if JVM sys prop autoconfiguration is enabled before allowing to use it.
6eb9b40 is described below
commit 6eb9b40d47254a8fe2db738bd4aee43d62e40c2a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Feb 8 17:32:45 2021 +0100
camel-main - Should pre check if JVM sys prop autoconfiguration is enabled before allowing to use it.
---
.../src/main/java/org/apache/camel/main/BaseMainSupport.java | 11 +++++++++++
1 file changed, 11 insertions(+)
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 c43076e..afe03d9 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
@@ -561,6 +561,17 @@ public abstract class BaseMainSupport extends BaseService {
envEnabled.toString());
}
}
+ // special for system-properties-enabled as we need to know this early before we set all the other options
+ Object jvmEnabled = prop.remove("camel.main.autoConfigurationSystemPropertiesEnabled");
+ if (jvmEnabled == null) {
+ jvmEnabled = prop.remove("camel.main.auto-configuration-system-properties-enabled");
+ if (jvmEnabled != null) {
+ mainConfigurationProperties.setAutoConfigurationSystemPropertiesEnabled(
+ CamelContextHelper.parseBoolean(camelContext, jvmEnabled.toString()));
+ autoConfiguredProperties.put("camel.main.auto-configuration-system-properties-enabled",
+ jvmEnabled.toString());
+ }
+ }
// load properties from ENV (override existing)
Properties propENV = null;