[camel] branch master updated: use isArrayOrCollection

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch master updated: use isArrayOrCollection

davsclaus-2
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 <[hidden email]>
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;
         }