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 3fa336d  CAMEL-13846: Make PropertyBindingSupport a fluent builder only
3fa336d is described below

commit 3fa336db4da3e4ade814ffcb270833297cd53e73
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Fri Aug 9 21:44:12 2019 +0200

    CAMEL-13846: Make PropertyBindingSupport a fluent builder only
---
 .../org/apache/camel/spring/boot/util/CamelPropertiesHelper.java     | 5 +++--
 .../main/java/org/apache/camel/support/PropertyBindingSupport.java   | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/util/CamelPropertiesHelper.java
 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/util/CamelPropertiesHelper.java
index ca06bbe..f060a43 100644
--- 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/util/CamelPropertiesHelper.java
+++ 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/util/CamelPropertiesHelper.java
@@ -52,6 +52,7 @@ public final class CamelPropertiesHelper {
      *     <li>value as lookup - The value is used as-is (eg like #value) to 
lookup in the Registry if there is a bean then its set on the target</li>
      * </ul>
      * When an option has been set on the target bean, then its removed from 
the given properties map. If all the options has been set, then the map will be 
empty.
+     * The implementation ignores case for the property keys.
      *
      * @param context        the CamelContext
      * @param target         the target bean
@@ -75,7 +76,7 @@ public final class CamelPropertiesHelper {
             String stringValue = value != null ? value.toString() : null;
             boolean hit = false;
             try {
-                hit = PropertyBindingSupport.build().bind(context, target, 
name, value);
+                hit = 
PropertyBindingSupport.build().withIgnoreCase(true).bind(context, target, name, 
value);
             } catch (PropertyBindingException e) {
                 // no we could not and this would be thrown if we attempted to 
set a value on a property which we cannot do type conversion as
                 // then maybe the value refers to a spring bean in the 
registry so try this
@@ -85,7 +86,7 @@ public final class CamelPropertiesHelper {
                     }
                     // use #bean: to lookup
                     stringValue = "#bean:" + stringValue;
-                    hit = PropertyBindingSupport.build().bind(context, target, 
name, stringValue);
+                    hit = 
PropertyBindingSupport.build().withIgnoreCase(true).bind(context, target, name, 
stringValue);
                 }
             }
 
diff --git 
a/core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
 
b/core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
index 5edf7f4..10f28aa 100644
--- 
a/core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
+++ 
b/core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
@@ -445,7 +445,9 @@ public final class PropertyBindingSupport {
         boolean rc = false;
 
         // must set reference parameters first before the other bindings
+        int size = properties.size();
         setReferenceProperties(camelContext, target, properties);
+        rc = properties.size() != size;
 
         String uOptionPrefix = "";
         if (ignoreCase && isNotEmpty(optionPrefix)) {

Reply via email to