Isira-Seneviratne commented on a change in pull request #522:
URL: https://github.com/apache/commons-lang/pull/522#discussion_r452545234
##########
File path: src/main/java/org/apache/commons/lang3/ObjectUtils.java
##########
@@ -277,6 +277,33 @@ public static boolean isNotEmpty(final Object object) {
return object != null ? object : defaultSupplier == null ? null :
defaultSupplier.get();
}
+ /**
+ * Checks if any value in the given array is {@code null}.
+ *
+ * <p>
+ * If all the values are {@code null} or the array is {@code null}
+ * or empty, then {@code true} is returned, otherwise {@code false} is
returned.
+ * </p>
+ *
+ * <pre>
+ * ObjectUtils.anyNull(*) = false
+ * ObjectUtils.anyNull(*, null) = false
+ * ObjectUtils.anyNull(null, *) = false
+ * ObjectUtils.anyNull(null, null, *, *) = false
+ * ObjectUtils.anyNull(null) = true
+ * ObjectUtils.anyNull(null, null) = true
+ * </pre>
+ *
+ * @param values the values to test, may be {@code null} or empty
+ * @return {@code true} if there is at least one {@code null} value in the
array,
+ * {@code false} if all the values are non-null.
+ * If the array is {@code null} or empty, {@code true} is also returned.
+ * @since 3.10.1
Review comment:
Okay, I'll correct it :)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]