commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r159551 - jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java
Date Thu, 31 Mar 2005 00:56:22 GMT
Author: ggregory
Date: Wed Mar 30 16:56:20 2005
New Revision: 159551

URL: http://svn.apache.org/viewcvs?view=rev&rev=159551
Log:
Removed extra C style parens in return statements.

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

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java?view=diff&r1=159550&r2=159551
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java Wed
Mar 30 16:56:20 2005
@@ -192,7 +192,7 @@
      * @return <code>true</code> if the String is empty or null
      */
     public static boolean isEmpty(String str) {
-        return (str == null || str.length() == 0);
+        return str == null || str.length() == 0;
     }
 
     /**
@@ -210,7 +210,7 @@
      * @return <code>true</code> if the String is not empty and not null
      */
     public static boolean isNotEmpty(String str) {
-        return (str != null && str.length() > 0);
+        return str != null && str.length() > 0;
     }
 
     /**
@@ -292,7 +292,7 @@
      *             Method will be removed in Commons Lang 3.0.
      */
     public static String clean(String str) {
-        return (str == null ? EMPTY : str.trim());
+        return str == null ? EMPTY : str.trim();
     }
 
     /**
@@ -319,7 +319,7 @@
      * @return the trimmed string, <code>null</code> if null String input
      */
     public static String trim(String str) {
-        return (str == null ? null : str.trim());
+        return str == null ? null : str.trim();
     }
 
     /**
@@ -346,7 +346,7 @@
      */
     public static String trimToNull(String str) {
         String ts = trim(str);
-        return (isEmpty(ts) ? null : ts);
+        return isEmpty(ts) ? null : ts;
     }
 
     /**
@@ -371,7 +371,7 @@
      * @since 2.0
      */
     public static String trimToEmpty(String str) {
-        return (str == null ? EMPTY : str.trim());
+        return str == null ? EMPTY : str.trim();
     }
 
     // Stripping
@@ -4397,7 +4397,7 @@
      *  was <code>null</code>
      */
     public static String defaultString(String str) {
-        return (str == null ? EMPTY : str);
+        return str == null ? EMPTY : str;
     }
 
     /**
@@ -4418,7 +4418,7 @@
      * @return the passed in String, or the default if it was <code>null</code>
      */
     public static String defaultString(String str, String defaultStr) {
-        return (str == null ? defaultStr : str);
+        return str == null ? defaultStr : str;
     }
 
     // Reversing



---------------------------------------------------------------------
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