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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new c76e3f1811b CAMEL-19090: Remove deprecated apis in core
c76e3f1811b is described below

commit c76e3f1811bc5430974928cdbbf4e9b0eee033dd
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Tue Feb 28 13:30:46 2023 +0100

    CAMEL-19090: Remove deprecated apis in core
---
 .../org/apache/camel/support/ObjectHelper.java     | 33 ----------------------
 1 file changed, 33 deletions(-)

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 ec9bedad9c6..1add25b7d88 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
@@ -809,39 +809,6 @@ public final class ObjectHelper {
         }
     }
 
-    /**
-     * Returns true if the collection contains the specified value
-     *
-     * @deprecated use {@link #typeCoerceContains(TypeConverter, Object, 
Object, boolean)}
-     */
-    @Deprecated
-    public static boolean contains(Object collectionOrArray, Object value) {
-        // favor String types
-        if (collectionOrArray instanceof StringBuffer || collectionOrArray 
instanceof StringBuilder) {
-            collectionOrArray = collectionOrArray.toString();
-        }
-        if (value instanceof StringBuffer || value instanceof StringBuilder) {
-            value = value.toString();
-        }
-
-        if (collectionOrArray instanceof Collection) {
-            Collection<?> collection = (Collection<?>) collectionOrArray;
-            return collection.contains(value);
-        } else if (collectionOrArray instanceof String && value instanceof 
String) {
-            String str = (String) collectionOrArray;
-            String subStr = (String) value;
-            return str.contains(subStr);
-        } else {
-            Iterator<?> iter = createIterator(collectionOrArray);
-            while (iter.hasNext()) {
-                if (org.apache.camel.util.ObjectHelper.equal(value, 
iter.next())) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
     /**
      * Returns true if the collection contains the specified value
      */

Reply via email to