private static boolean areCollectionsLooselyEqual(Object[] value1, Object value2) {
        if (value2.getClass()
                .isArray()) {
            Object[] values = ArrayUtil.getArray(value2);
            return areArraysLooselyEqual(value1, values);
        } else if (value2 instanceof Collection<?> values) {
            return areCollectionLooselyEqual(values, value1);
        }
        return false;
    }
Note that the method only checks the immutable classes used by Turms.
turms-server-common/src/main/java/im/turms/server/common/infra/collection/CollectionUtil.java