Skip to content

Commit

Permalink
fixed files form Lang #35
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 9c008c8 commit 147cb90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/Lang/35/org/apache/commons/lang3/ArrayUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -3292,7 +3292,7 @@ public static <T> T[] add(T[] array, T element) {
} else if (element != null) {
type = element.getClass();
} else {
type = Object.class;
throw new IllegalArgumentException("Arguments cannot both be null");
}
@SuppressWarnings("unchecked") // type must be T
T[] newArray = (T[]) copyArrayGrow1(array, type);
Expand Down Expand Up @@ -3571,7 +3571,7 @@ public static <T> T[] add(T[] array, int index, T element) {
} else if (element != null) {
clss = element.getClass();
} else {
return (T[]) new Object[] { null };
throw new IllegalArgumentException("Array and element cannot both be null");
}
@SuppressWarnings("unchecked") // the add method creates an array of type clss, which is type T
final T[] newArray = (T[]) add(array, index, element, clss);
Expand Down

0 comments on commit 147cb90

Please sign in to comment.