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/11/11 18:33:41 UTC

[camel] 02/02: camel-bean: Should assume Boolean/boolean parameter types are matching.

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 074ca0fd652e69394d2db9e57065df413a6abca8
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Nov 11 19:21:09 2019 +0100

    camel-bean: Should assume Boolean/boolean parameter types are matching.
---
 .../src/main/java/org/apache/camel/component/bean/BeanInfo.java     | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanInfo.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanInfo.java
index bd0f8cb..4cd5478 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanInfo.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanInfo.java
@@ -738,6 +738,12 @@ public class BeanInfo {
                 return true;
             }
         }
+        if (Boolean.class.equals(parameterType)) {
+            // boolean should match both Boolean and boolean
+            if (Boolean.class.isAssignableFrom(expectedType) || boolean.class.isAssignableFrom(expectedType)) {
+                return true;
+            }
+        }
         return parameterType.isAssignableFrom(expectedType);
     }