Github user sparsick commented on a diff in the pull request:
https://github.com/apache/commons-lang/pull/357#discussion_r219674807
--- Diff: src/main/java/org/apache/commons/lang3/ObjectUtils.java ---
@@ -236,6 +236,39 @@ public static boolean anyNotNull(final Object...
values) {
return firstNonNull(values) != null;
}
+ /**
+ * Checks if any value in the given array is {@code null}.
+ *
+ * <p>
+ * If none of the values are {@code null} or the array is {@code null}
+ * or empty then {@code false} is returned. Otherwise {@code true} is
returned.
+ * </p>
+ *
+ * <pre>
+ * ObjectUtils.anyNull(*) = false
+ * ObjectUtils.anyNull(*, null) = true
+ * ObjectUtils.anyNull(null, *) = true
+ * ObjectUtils.anyNull(null, null, *, *) = true
+ * ObjectUtils.anyNull(null) = true
+ * ObjectUtils.anyNull(null, null) = true
+ * ObjectUtils.anyNull() = false
+ * ObjectUtils.anyNull((Object[]) null) = false
+ * </pre>
+ *
+ * @param values the values to test, may be {@code null} or empty
+ * @return {@code true} if there is at least one null value in the
array,
+ * {@code false} if all values in the array are not {@code null}s.
+ * If the array is {@code null} or empty {@code fatolse} is also
returned.
--- End diff --
Thank you for reviewing. I don't find a better replacement for the if
sentence. I hope it is ok.
---