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/06/28 06:48:49 UTC

[camel] 02/05: CAMEL-13681: Property binding support should have support for ignore case in property keys

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 2eb00b5168889b59c81392531412e9b7406b2f4e
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jun 28 07:43:45 2019 +0200

    CAMEL-13681: Property binding support should have support for ignore case in property keys
---
 .../src/main/java/org/apache/camel/support/IntrospectionSupport.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 9883396..2b450d6 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
@@ -405,7 +405,9 @@ public final class IntrospectionSupport {
 
     public static Method getPropertyGetter(Class<?> type, String propertyName, boolean ignoreCase) throws NoSuchMethodException {
         if (ignoreCase) {
-            Method[] methods = type.getDeclaredMethods();
+            List<Method> methods = new ArrayList<>();
+            methods.addAll(Arrays.asList(type.getDeclaredMethods()));
+            methods.addAll(Arrays.asList(type.getMethods()));
             for (Method m : methods) {
                 if (isGetter(m)) {
                     if (m.getName().startsWith("is") && m.getName().substring(2).equalsIgnoreCase(propertyName)) {