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 31ad045  camel-core - Removed deprecated code
31ad045 is described below

commit 31ad045c910b0b6c5fe4fc8cc16760999cf125f5
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sat Apr 10 13:56:23 2021 +0200

    camel-core - Removed deprecated code
---
 .../org/apache/camel/util/ExchangeHelperTest.java   | 14 --------------
 .../org/apache/camel/support/ExchangeHelper.java    | 21 ---------------------
 2 files changed, 35 deletions(-)

diff --git 
a/core/camel-core/src/test/java/org/apache/camel/util/ExchangeHelperTest.java 
b/core/camel-core/src/test/java/org/apache/camel/util/ExchangeHelperTest.java
index 201cb2b..cf4331c 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/util/ExchangeHelperTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/util/ExchangeHelperTest.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.util;
 
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -109,19 +108,6 @@ public class ExchangeHelperTest extends ContextTestSupport 
{
     }
 
     @Test
-    public void testGetExchangeById() throws Exception {
-        List<Exchange> list = new ArrayList<>();
-        Exchange e1 = context.getEndpoint("mock:foo").createExchange();
-        Exchange e2 = context.getEndpoint("mock:foo").createExchange();
-        list.add(e1);
-        list.add(e2);
-
-        assertNull(ExchangeHelper.getExchangeById(list, "unknown"));
-        assertEquals(e1, ExchangeHelper.getExchangeById(list, 
e1.getExchangeId()));
-        assertEquals(e2, ExchangeHelper.getExchangeById(list, 
e2.getExchangeId()));
-    }
-
-    @Test
     public void testPopulateVariableMapBodyAndHeaderOnly() throws Exception {
         exchange.setPattern(ExchangePattern.InOut);
         exchange.getMessage().setBody("bar");
diff --git 
a/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java 
b/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java
index 7312518..511dff9 100644
--- 
a/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java
+++ 
b/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java
@@ -577,27 +577,6 @@ public final class ExchangeHelper {
     }
 
     /**
-     * Returns the first exchange in the given collection of exchanges which 
has the same exchange ID as the one given
-     * or null if none could be found
-     *
-     * @param      exchanges  the exchanges
-     * @param      exchangeId the exchangeId to find
-     * @return                matching exchange, or <tt>null</tt> if none found
-     *
-     * @deprecated            not in use, to be removed in a future Camel 
release
-     */
-    @Deprecated
-    public static Exchange getExchangeById(Iterable<Exchange> exchanges, 
String exchangeId) {
-        for (Exchange exchange : exchanges) {
-            String id = exchange.getExchangeId();
-            if (id != null && id.equals(exchangeId)) {
-                return exchange;
-            }
-        }
-        return null;
-    }
-
-    /**
      * Prepares the exchanges for aggregation.
      * <p/>
      * This implementation will copy the OUT body to the IN body so when you 
do aggregation the body is <b>only</b> in

Reply via email to