Description
org.apache.commons.lang3.ArrayUtils.java
public static <T> T[] add(final T[] array, final T element) { Class<?> type; if (array != null){ type = array.getClass(); } else if (element != null) { type = element.getClass(); } else { throw new IllegalArgumentException("Arguments cannot both be null"); } ....... }
I think it should be:
org.apache.commons.lang3.ArrayUtils.java
public static <T> T[] add(final T[] array, final T element) { Class<?> type; if (array != null){ type = array.getClass().getComponentType(); } else if (element != null) { type = element.getClass(); } else { throw new IllegalArgumentException("Arguments cannot both be null"); } ....... }