From d672dafa2ee86c82c25d362e8aae54b8ff558dde Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Wed, 8 Dec 2021 10:11:58 -0500 Subject: [PATCH] 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 5b566a331..920a5988c 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"); }