Add @SuppressWarnings.

This commit is contained in:
Gary Gregory 2019-10-28 13:28:37 -04:00
parent ac00199379
commit e55a870d36
1 changed files with 2 additions and 2 deletions

View File

@ -320,7 +320,7 @@ public static Map<Object, Object> toMap(final Object[] array) {
* @return the array, not null unless a null array is passed in
* @since 3.0
*/
public static <T> T[] toArray(final T... items) {
public static <T> T[] toArray(@SuppressWarnings("unchecked") final T... items) {
return items;
}
@ -5077,7 +5077,7 @@ public static boolean isNotEmpty(final boolean[] array) {
* @since 2.1
* @throws IllegalArgumentException if the array types are incompatible
*/
public static <T> T[] addAll(final T[] array1, final T... array2) {
public static <T> T[] addAll(final T[] array1, @SuppressWarnings("unchecked") final T... array2) {
if (array1 == null) {
return clone(array2);
} else if (array2 == null) {