From d5f32c231c74fd8945a7732aa6cb7631b5a82555 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Thu, 31 Mar 2005 00:56:20 +0000 Subject: [PATCH] Removed extra C style parens in return statements. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@159551 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/lang/StringUtils.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/java/org/apache/commons/lang/StringUtils.java b/src/java/org/apache/commons/lang/StringUtils.java index c500d1106..ef2e18a67 100644 --- a/src/java/org/apache/commons/lang/StringUtils.java +++ b/src/java/org/apache/commons/lang/StringUtils.java @@ -192,7 +192,7 @@ public class StringUtils { * @return true 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 @@ public class StringUtils { * @return true 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 @@ public class StringUtils { * 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 @@ public class StringUtils { * @return the trimmed string, null 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 class StringUtils { */ public static String trimToNull(String str) { String ts = trim(str); - return (isEmpty(ts) ? null : ts); + return isEmpty(ts) ? null : ts; } /** @@ -371,7 +371,7 @@ public class StringUtils { * @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 @@ public class StringUtils { * was null */ public static String defaultString(String str) { - return (str == null ? EMPTY : str); + return str == null ? EMPTY : str; } /** @@ -4418,7 +4418,7 @@ public class StringUtils { * @return the passed in String, or the default if it was null */ public static String defaultString(String str, String defaultStr) { - return (str == null ? defaultStr : str); + return str == null ? defaultStr : str; } // Reversing