From db456f2f89329d75e089f6cfbb6e4d944401a62b Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Wed, 6 Feb 2008 19:27:10 +0000 Subject: [PATCH] Eat own dog food: Use EMPTY instead of "". git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@619115 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/commons/lang/StringUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/org/apache/commons/lang/StringUtils.java b/src/java/org/apache/commons/lang/StringUtils.java index 7b5ff20ff..6c24ff9d7 100644 --- a/src/java/org/apache/commons/lang/StringUtils.java +++ b/src/java/org/apache/commons/lang/StringUtils.java @@ -2351,7 +2351,7 @@ public class StringUtils { return ArrayUtils.EMPTY_STRING_ARRAY; } - if ( ( separator == null ) || ( "".equals( separator ) ) ) { + if ( ( separator == null ) || ( EMPTY.equals( separator ) ) ) { // Split on whitespace. return splitWorker( str, null, max, preserveAllTokens ) ; } @@ -2391,7 +2391,7 @@ public class StringUtils { end = len ; substrings.add( str.substring( beg ) ) ; } else { - substrings.add( "" ); + substrings.add( EMPTY ); } } beg = end + separatorLength ; @@ -3377,7 +3377,7 @@ public class StringUtils { if (isEmpty(str) || isEmpty(remove)) { return str; } - return replace(str, remove, "", -1); + return replace(str, remove, EMPTY, -1); } /** @@ -3856,7 +3856,7 @@ public class StringUtils { return str; } if (replaceChars == null) { - replaceChars = ""; + replaceChars = EMPTY; } boolean modified = false; int replaceCharsLength = replaceChars.length();