commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1147524 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/Validate.java
Date Sun, 17 Jul 2011 05:02:40 GMT
Author: mbenson
Date: Sun Jul 17 05:02:39 2011
New Revision: 1147524

URL: http://svn.apache.org/viewvc?rev=1147524&view=rev
Log:
[LANG-724] Convert Validate.noNullElements(Object[]) to varargs

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/Validate.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/Validate.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/Validate.java?rev=1147524&r1=1147523&r2=1147524&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/Validate.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/Validate.java Sun Jul
17 05:02:39 2011
@@ -535,8 +535,8 @@ public class Validate {
      * @throws IllegalArgumentException if an element is {@code null}
      * @see #noNullElements(Object[], String, Object...)
      */
-    public static <T> T[] noNullElements(T[] array) {
-        return noNullElements(array, DEFAULT_NO_NULL_ELEMENTS_ARRAY_EX_MESSAGE);
+    public static <T> T[] noNullElements(T... array) {
+        return Validate.<T> noNullElements((T[]) array, DEFAULT_NO_NULL_ELEMENTS_ARRAY_EX_MESSAGE);
     }
 
     // noNullElements iterable



Mime
View raw message