From 4eb70a5f436894008fae0325ae749efd110114d8 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Thu, 10 Apr 2014 13:14:08 +0000 Subject: [PATCH] Statement unnecessarily nested within else clause. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1586292 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/lang3/CharSequenceUtils.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java b/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java index dc3992d81..10d8f50b2 100644 --- a/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java +++ b/src/main/java/org/apache/commons/lang3/CharSequenceUtils.java @@ -161,14 +161,13 @@ public class CharSequenceUtils { static char[] toCharArray(final CharSequence cs) { if (cs instanceof String) { return ((String) cs).toCharArray(); - } else { - final int sz = cs.length(); - final char[] array = new char[cs.length()]; - for (int i = 0; i < sz; i++) { - array[i] = cs.charAt(i); - } - return array; } + final int sz = cs.length(); + final char[] array = new char[cs.length()]; + for (int i = 0; i < sz; i++) { + array[i] = cs.charAt(i); + } + return array; } /**