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/14 06:47:21 UTC

[camel] branch master updated: use isArrayOrCollection

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


The following commit(s) were added to refs/heads/master by this push:
     new 8f0b29a  use isArrayOrCollection
8f0b29a is described below

commit 8f0b29a0e0996388f2da2a5e1625d20aea54424a
Author: elbaz michael <mi...@outlook.fr>
AuthorDate: Tue Aug 13 19:54:14 2019 +0200

    use isArrayOrCollection
    
    Reuse isArrayOrCollection method instead of rewriting the condition i guess it was an oversight
---
 .../src/main/java/org/apache/camel/spring/boot/SpringTypeConverter.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringTypeConverter.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringTypeConverter.java
index 5973aa5..c9addcf 100644
--- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringTypeConverter.java
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringTypeConverter.java
@@ -49,7 +49,7 @@ public class SpringTypeConverter extends TypeConverterSupport {
         }
         
         // do not attempt to convert List -> Map. Ognl expression may use this converter as a fallback expecting null
-        if (type.isAssignableFrom(Map.class) && (value.getClass().isArray() || value instanceof Collection)) {
+        if (type.isAssignableFrom(Map.class) && isArrayOrCollection(value)) {
             return null;
         }