/** * Convert the supplied array into a List. A primitive array gets converted * into a List of the appropriate wrapper type. * <p> * A <code>null</code> source value will be converted to an empty List. * * @param source the (potentially primitive) array * @return the converted List result * @see ObjectUtils#toObjectArray(Object) */ public static List<?> arrayToList(final Object source) { return Arrays.asList(ObjectUtils.toObjectArray(source)); }