From 0ef747156b90cdbf2e316c0a5190f2c423b78529 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Fri, 27 Jun 2014 12:28:05 +0000 Subject: [PATCH] Statement unnecessarily nested within else clause. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1606056 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/lang3/ClassUtils.java | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/ClassUtils.java b/src/main/java/org/apache/commons/lang3/ClassUtils.java index 36214df57..c58a608b4 100644 --- a/src/main/java/org/apache/commons/lang3/ClassUtils.java +++ b/src/main/java/org/apache/commons/lang3/ClassUtils.java @@ -1117,24 +1117,23 @@ public class ClassUtils { } if (dim < 1) { return className; - } else { - if (className.startsWith("L")) { - className = className.substring( - 1, - className.endsWith(";") - ? className.length() - 1 - : className.length()); - } else { - if (className.length() > 0) { - className = reverseAbbreviationMap.get(className.substring(0, 1)); - } - } - final StringBuilder canonicalClassNameBuffer = new StringBuilder(className); - for (int i = 0; i < dim; i++) { - canonicalClassNameBuffer.append("[]"); - } - return canonicalClassNameBuffer.toString(); } + if (className.startsWith("L")) { + className = className.substring( + 1, + className.endsWith(";") + ? className.length() - 1 + : className.length()); + } else { + if (className.length() > 0) { + className = reverseAbbreviationMap.get(className.substring(0, 1)); + } + } + final StringBuilder canonicalClassNameBuffer = new StringBuilder(className); + for (int i = 0; i < dim; i++) { + canonicalClassNameBuffer.append("[]"); + } + return canonicalClassNameBuffer.toString(); } /**