This is an automated email from the ASF dual-hosted git repository.

acosentino 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 f73b286  Revert "CAMEL-13741 - Allow to convert a Map to an Iterable"
f73b286 is described below

commit f73b286df50041f172ac3f3b5b549c49bb7ae7f0
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Fri Jul 12 14:29:20 2019 +0200

    Revert "CAMEL-13741 - Allow to convert a Map to an Iterable"
    
    This reverts commit 1c8cfadde1245e90887399feb57c38e8b1038547.
---
 .../java/org/apache/camel/converter/ObjectConverterTest.java  | 11 -----------
 .../src/main/java/org/apache/camel/support/ObjectHelper.java  |  3 ---
 2 files changed, 14 deletions(-)

diff --git 
a/core/camel-core/src/test/java/org/apache/camel/converter/ObjectConverterTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/converter/ObjectConverterTest.java
index e705858..b533f31 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/converter/ObjectConverterTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/converter/ObjectConverterTest.java
@@ -17,11 +17,8 @@
 package org.apache.camel.converter;
 
 import java.math.BigInteger;
-import java.util.AbstractMap.SimpleEntry;
 import java.util.Date;
 import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -48,14 +45,6 @@ public class ObjectConverterTest extends Assert {
                 fail();
             }
         }
-
-        Map<String, String> map = new LinkedHashMap<>();
-        map.put("A", "AA");
-        map.put("B", "BB");
-        Iterator<?> it = ObjectConverter.iterable(map).iterator();
-        assertEquals(new SimpleEntry<>("A", "AA"), it.next());
-        assertEquals(new SimpleEntry<>("B", "BB"), it.next());
-        assertFalse(it.hasNext());
     }
 
     @Test
diff --git 
a/core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java 
b/core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java
index fe5f99d..195b1c7 100644
--- 
a/core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java
+++ 
b/core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java
@@ -23,7 +23,6 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
-import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.concurrent.Callable;
 
@@ -612,8 +611,6 @@ public final class ObjectHelper {
                     };
                 };
             }
-        } else if (value instanceof Map) {
-            return ((Map)value).entrySet();
         } else {
             return Collections.singletonList(value);
         }

Reply via email to