From b1caa21bf5109328d7e3f880c3da6b7d658c3abf Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Sun, 13 Jul 2014 09:27:57 +0000 Subject: [PATCH] LANG-1026: Bring static method references in StringUtils to consistent style. Thanks to Alex Yursha git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1610149 13f79535-47bb-0310-9956-ffa450edef68 --- src/changes/changes.xml | 1 + .../java/org/apache/commons/lang3/StringUtils.java | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index c279744c5..e693104fb 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -22,6 +22,7 @@ + Bring static method references in StringUtils to consistent style NumberUtils#isParsable method(s) Use non-ASCII digits in Javadoc examples for StringUtils.isNumeric Change min/max methods in NumberUtils/IEEE754rUtils from array input parameters to varargs diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index 8df5152d9..13fc77a79 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -235,7 +235,7 @@ public class StringUtils { * @since 3.0 Changed signature from isNotEmpty(String) to isNotEmpty(CharSequence) */ public static boolean isNotEmpty(final CharSequence cs) { - return !StringUtils.isEmpty(cs); + return !isEmpty(cs); } /** @@ -334,7 +334,7 @@ public class StringUtils { * @since 3.0 Changed signature from isNotBlank(String) to isNotBlank(CharSequence) */ public static boolean isNotBlank(final CharSequence cs) { - return !StringUtils.isBlank(cs); + return !isBlank(cs); } /** @@ -6243,7 +6243,7 @@ public class StringUtils { * @see StringUtils#defaultString(String, String) */ public static T defaultIfBlank(final T str, final T defaultStr) { - return StringUtils.isBlank(str) ? defaultStr : str; + return isBlank(str) ? defaultStr : str; } /** @@ -6265,7 +6265,7 @@ public class StringUtils { * @see StringUtils#defaultString(String, String) */ public static T defaultIfEmpty(final T str, final T defaultStr) { - return StringUtils.isEmpty(str) ? defaultStr : str; + return isEmpty(str) ? defaultStr : str; } // Reversing @@ -7316,7 +7316,7 @@ public class StringUtils { return false; } for (final CharSequence searchString : searchStrings) { - if (StringUtils.startsWith(string, searchString)) { + if (startsWith(string, searchString)) { return true; } } @@ -7473,7 +7473,7 @@ public class StringUtils { return false; } for (final CharSequence searchString : searchStrings) { - if (StringUtils.endsWith(string, searchString)) { + if (endsWith(string, searchString)) { return true; } }