diff --git a/utils/src/main/java/li/strolch/utils/ObjectHelper.java b/utils/src/main/java/li/strolch/utils/ObjectHelper.java index 03cc1b5c7..1965a58a8 100644 --- a/utils/src/main/java/li/strolch/utils/ObjectHelper.java +++ b/utils/src/main/java/li/strolch/utils/ObjectHelper.java @@ -252,10 +252,35 @@ public class ObjectHelper { } } - if (right instanceof Object[] arr) { - for (Object o : arr) { - if (equals(left, o, ignoreCase)) - return true; + if (right instanceof Object[] arrayRight) { + + if (left instanceof Collection collectionLeft) { + + for (Object o : arrayRight) { + for (Object l : collectionLeft) { + if (equals(l, o, ignoreCase)) + return true; + } + } + + return false; + + } else if (left instanceof String[] leftArr) { + + for (Object o : arrayRight) { + for (Object l : leftArr) { + if (equals(l, o, ignoreCase)) + return true; + } + } + + return false; + + } else { + for (Object o : arrayRight) { + if (equals(left, o, ignoreCase)) + return true; + } } return false;