commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r230836 - /jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharUtils.java
Date Mon, 08 Aug 2005 18:20:15 GMT
Author: ggregory
Date: Mon Aug  8 11:20:13 2005
New Revision: 230836

URL: http://svn.apache.org/viewcvs?rev=230836&view=rev
Log:
Statement unnecessarily nested within else clause.

Modified:
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharUtils.java

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharUtils.java?rev=230836&r1=230835&r2=230836&view=diff
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharUtils.java Mon
Aug  8 11:20:13 2005
@@ -85,9 +85,8 @@
     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 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 static String toString(Character ch) {
         if (ch == null) {
             return null;
-        } else {
-            return toString(ch.charValue());
         }
+        return toString(ch.charValue());
     }
     
     //--------------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message