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 2020/08/23 13:14:12 UTC

[camel] 05/11: CAMEL-15394: PropertyBindingSupport: Old syntax for #ref values should be handled specially for reflection vs configurer for options that are String type based.

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 dc5535c7815f8bad3bf9be12bd774f186dfc2fec
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Aug 22 21:00:05 2020 +0200

    CAMEL-15394: PropertyBindingSupport: Old syntax for #ref values should be handled specially for reflection vs configurer for options that are String type based.
---
 .../src/main/java/org/apache/camel/support/PropertyBindingSupport.java | 3 ++-
 1 file changed, 2 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 5e53862..3deb614 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
@@ -873,7 +873,8 @@ public final class PropertyBindingSupport {
                 str = camelContext.resolvePropertyPlaceholders(str.toString());
             }
             // special for reference (we should not do this for options that are String type)
-            if (reference && isReferenceParameter(str)) {
+            // this is only required for reflection (non configurer as configurer does this automatic in a more safe way)
+            if (configurer == null && reference && isReferenceParameter(str)) {
                 Object bean = CamelContextHelper.lookup(camelContext, str.toString().substring(1));
                 if (bean != null) {
                     str = bean;