diff --git a/src/main/java/org/apache/commons/lang3/Validate.java b/src/main/java/org/apache/commons/lang3/Validate.java index eb2e6c6c7..b14eaa7fb 100644 --- a/src/main/java/org/apache/commons/lang3/Validate.java +++ b/src/main/java/org/apache/commons/lang3/Validate.java @@ -535,8 +535,8 @@ public class Validate { * @throws IllegalArgumentException if an element is {@code null} * @see #noNullElements(Object[], String, Object...) */ - public static T[] noNullElements(T[] array) { - return noNullElements(array, DEFAULT_NO_NULL_ELEMENTS_ARRAY_EX_MESSAGE); + public static T[] noNullElements(T... array) { + return Validate. noNullElements((T[]) array, DEFAULT_NO_NULL_ELEMENTS_ARRAY_EX_MESSAGE); } // noNullElements iterable