camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] git commit: CAMEL-6706: camel-blueprint property placeholder favors non-default values when 2+ blueprint placeholders is in use for the same key. Allows end users to override default values to be used by Camel.
Date Wed, 04 Sep 2013 13:00:08 GMT
CAMEL-6706: camel-blueprint property placeholder favors non-default values when 2+ blueprint
placeholders is in use for the same key. Allows end users to override default values to be
used by Camel.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b56b1c56
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b56b1c56
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b56b1c56

Branch: refs/heads/camel-2.12.x
Commit: b56b1c56dd8487f7cbc2a75b8c27bc34caa01e66
Parents: 260ce9e
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed Sep 4 14:59:30 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Sep 4 14:59:47 2013 +0200

----------------------------------------------------------------------
 .../org/apache/camel/blueprint/BlueprintPropertiesParser.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b56b1c56/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
----------------------------------------------------------------------
diff --git a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
index 1649501..4069c5f 100644
--- a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
+++ b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
@@ -20,6 +20,7 @@ import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.LinkedHashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
@@ -127,7 +128,8 @@ public class BlueprintPropertiesParser extends DefaultPropertiesParser
{
                     // okay we have multiple placeholders and we want to return the answer
that
                     // is not the default placeholder if there is multiple keys
                     if (placeholder instanceof PropertyPlaceholder) {
-                        isDefault = ((PropertyPlaceholder) placeholder).getDefaultProperties().containsKey(key);
+                        Map map = ((PropertyPlaceholder) placeholder).getDefaultProperties();
+                        isDefault = map != null && map.containsKey(key);
                     }
                     log.trace("Blueprint property key: {} is part of default properties:
{}", key, isDefault);
                 }


Mime
View raw message