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 2021/12/08 15:12:03 UTC
[commons-lang] branch master updated: In-line some single use local variables.
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 d672daf In-line some single use local variables.
d672daf is described below
commit d672dafa2ee86c82c25d362e8aae54b8ff558dde
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Dec 8 10:11:58 2021 -0500
In-line some single use local variables.
---
src/main/java/org/apache/commons/lang3/BooleanUtils.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/commons/lang3/BooleanUtils.java b/src/main/java/org/apache/commons/lang3/BooleanUtils.java
index 5b566a3..920a598 100644
--- a/src/main/java/org/apache/commons/lang3/BooleanUtils.java
+++ b/src/main/java/org/apache/commons/lang3/BooleanUtils.java
@@ -122,8 +122,7 @@ public class BooleanUtils {
public static Boolean and(final Boolean... array) {
ObjectUtils.requireNonEmpty(array, "array");
try {
- final boolean[] primitive = ArrayUtils.toPrimitive(array);
- return and(primitive) ? Boolean.TRUE : Boolean.FALSE;
+ return and(ArrayUtils.toPrimitive(array)) ? Boolean.TRUE : Boolean.FALSE;
} catch (final NullPointerException ex) {
throw new IllegalArgumentException("The array must not contain any null elements");
}
@@ -301,8 +300,7 @@ public class BooleanUtils {
public static Boolean or(final Boolean... array) {
ObjectUtils.requireNonEmpty(array, "array");
try {
- final boolean[] primitive = ArrayUtils.toPrimitive(array);
- return or(primitive) ? Boolean.TRUE : Boolean.FALSE;
+ return or(ArrayUtils.toPrimitive(array)) ? Boolean.TRUE : Boolean.FALSE;
} catch (final NullPointerException ex) {
throw new IllegalArgumentException("The array must not contain any null elements");
}
@@ -1122,8 +1120,7 @@ public class BooleanUtils {
public static Boolean xor(final Boolean... array) {
ObjectUtils.requireNonEmpty(array, "array");
try {
- final boolean[] primitive = ArrayUtils.toPrimitive(array);
- return xor(primitive) ? Boolean.TRUE : Boolean.FALSE;
+ return xor(ArrayUtils.toPrimitive(array)) ? Boolean.TRUE : Boolean.FALSE;
} catch (final NullPointerException ex) {
throw new IllegalArgumentException("The array must not contain any null elements");
}