From ea5f046469ab917bc7aa6d71fb837968c55d6f44 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Mon, 8 Aug 2005 00:43:36 +0000 Subject: [PATCH] Statement unnecessarily nested within else clause. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@230717 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/commons/lang/ArrayUtils.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/java/org/apache/commons/lang/ArrayUtils.java b/src/java/org/apache/commons/lang/ArrayUtils.java index 2a5edee27..b2213a3b4 100644 --- a/src/java/org/apache/commons/lang/ArrayUtils.java +++ b/src/java/org/apache/commons/lang/ArrayUtils.java @@ -952,9 +952,8 @@ public class ArrayUtils { public static int getLength(Object array) { if (array == null) { return 0; - } else { - return Array.getLength(array); } + return Array.getLength(array); } /** @@ -3389,9 +3388,8 @@ public class ArrayUtils { Object newArray = Array.newInstance(array.getClass().getComponentType(), arrayLength + 1); System.arraycopy(array, 0, newArray, 0, arrayLength); return newArray; - } else { - return Array.newInstance(newArrayComponentType, 1); } + return Array.newInstance(newArrayComponentType, 1); } /**