You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/08/23 14:56:07 UTC
[commons-lang] branch master updated: PMD: Ternary operators that can be simplified with || or &&
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push:
new 4deabadb9 PMD: Ternary operators that can be simplified with || or &&
4deabadb9 is described below
commit 4deabadb9772b1402dae309fdd3b2dc67d192206
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 23 10:56:01 2022 -0400
PMD: Ternary operators that can be simplified with || or &&
---
src/main/java/org/apache/commons/lang3/ObjectUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/lang3/ObjectUtils.java b/src/main/java/org/apache/commons/lang3/ObjectUtils.java
index b0aeac2ae..735617863 100644
--- a/src/main/java/org/apache/commons/lang3/ObjectUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ObjectUtils.java
@@ -139,7 +139,7 @@ public class ObjectUtils {
* @since 3.5
*/
public static boolean allNotNull(final Object... values) {
- return values != null ? Stream.of(values).noneMatch(Objects::isNull) : false;
+ return values != null && Stream.of(values).noneMatch(Objects::isNull);
}
/**