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 2019/08/24 17:29:17 UTC

[camel] 02/02: CAMEL-13870: Skip known option when autowiring from registry

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

commit f25a01d35135ce23fa5a4648cd64a3f5e8d49a34
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Aug 24 19:29:01 2019 +0200

    CAMEL-13870: Skip known option when autowiring from registry
---
 .../main/java/org/apache/camel/support/PropertyBindingSupport.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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 f45f557..02794f5 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
@@ -347,7 +347,11 @@ public final class PropertyBindingSupport {
         for (Map.Entry<String, Object> entry : properties.entrySet()) {
             String key = entry.getKey();
             Object value = entry.getValue();
-            Class<?> type = getGetterType(camelContext, target, key, false);
+
+            // skip based on some known names
+            if ("basicPropertyBinding".equals(key)) {
+                continue;
+            }
 
             boolean skip = parents.contains(value) || value instanceof CamelContext;
             if (skip) {
@@ -356,6 +360,7 @@ public final class PropertyBindingSupport {
                 continue;
             }
 
+            Class<?> type = getGetterType(camelContext, target, key, false);
             if (isComplexUserType(type)) {
                 // if the property has not been set and its a complex type (not simple or string etc)
                 if (!bindNullOnly || value == null) {