@SuppressWarnings("unchecked")
   public static <E> void mergeArrayIntoCollection(Object array, Collection<E> collection) {
      if (collection == null) {
         throw new IllegalArgumentException("Collection must not be null");
      }
      Object[] arr = ObjectUtils.toObjectArray(array);
      for (Object elem : arr) {
         collection.add((E) elem);
      }
   }