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/05/24 10:12:45 UTC
[camel] 05/27: CAMEL-13557: Add property binding support to make it
convenient to configure components and whatnot.
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 d4972be9a0416dffa77bcc169c60dbe5c887bde3
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu May 23 06:17:11 2019 +0200
CAMEL-13557: Add property binding support to make it convenient to configure components and whatnot.
---
.../src/main/java/org/apache/camel/support/IntrospectionSupport.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/IntrospectionSupport.java b/core/camel-support/src/main/java/org/apache/camel/support/IntrospectionSupport.java
index 8e4ea5f..3585940 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/IntrospectionSupport.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/IntrospectionSupport.java
@@ -197,8 +197,9 @@ public final class IntrospectionSupport {
// is it a setXXX method
boolean validName = name.startsWith("set") && name.length() >= 4 && Character.isUpperCase(name.charAt(3));
- if (validName) {
- return parameterCount == 1 && type.equals(Void.TYPE);
+ if (validName && parameterCount == 1) {
+ // a setXXX can also be a builder pattern so check for its return type is itself
+ return type.equals(Void.TYPE) || allowBuilderPattern && method.getDeclaringClass().isAssignableFrom(type);
}
// or if its a builder method
if (allowBuilderPattern && parameterCount == 1 && method.getDeclaringClass().isAssignableFrom(type)) {