From 1a824f69ad111424cb94350d3aab829113f165e7 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Mon, 8 Aug 2005 18:20:13 +0000 Subject: [PATCH] Statement unnecessarily nested within else clause. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@230836 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/commons/lang/CharUtils.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/java/org/apache/commons/lang/CharUtils.java b/src/java/org/apache/commons/lang/CharUtils.java index daf4f3db4..d4975c001 100644 --- a/src/java/org/apache/commons/lang/CharUtils.java +++ b/src/java/org/apache/commons/lang/CharUtils.java @@ -85,9 +85,8 @@ public class CharUtils { public static Character toCharacterObject(char ch) { if (ch < CHAR_ARRAY.length) { return CHAR_ARRAY[ch]; - } else { - return new Character(ch); } + return new Character(ch); } /** @@ -309,9 +308,8 @@ public class CharUtils { public static String toString(char ch) { if (ch < 128) { return CHAR_STRING_ARRAY[ch]; - } else { - return new String(new char[] {ch}); } + return new String(new char[] {ch}); } /** @@ -334,9 +332,8 @@ public class CharUtils { public static String toString(Character ch) { if (ch == null) { return null; - } else { - return toString(ch.charValue()); } + return toString(ch.charValue()); } //--------------------------------------------------------------------------