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
This commit is contained in:
parent
fc734d1046
commit
db456f2f89
|
@ -2351,7 +2351,7 @@ public class StringUtils {
|
||||||
return ArrayUtils.EMPTY_STRING_ARRAY;
|
return ArrayUtils.EMPTY_STRING_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ( separator == null ) || ( "".equals( separator ) ) ) {
|
if ( ( separator == null ) || ( EMPTY.equals( separator ) ) ) {
|
||||||
// Split on whitespace.
|
// Split on whitespace.
|
||||||
return splitWorker( str, null, max, preserveAllTokens ) ;
|
return splitWorker( str, null, max, preserveAllTokens ) ;
|
||||||
}
|
}
|
||||||
|
@ -2391,7 +2391,7 @@ public class StringUtils {
|
||||||
end = len ;
|
end = len ;
|
||||||
substrings.add( str.substring( beg ) ) ;
|
substrings.add( str.substring( beg ) ) ;
|
||||||
} else {
|
} else {
|
||||||
substrings.add( "" );
|
substrings.add( EMPTY );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
beg = end + separatorLength ;
|
beg = end + separatorLength ;
|
||||||
|
@ -3377,7 +3377,7 @@ public class StringUtils {
|
||||||
if (isEmpty(str) || isEmpty(remove)) {
|
if (isEmpty(str) || isEmpty(remove)) {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
return replace(str, remove, "", -1);
|
return replace(str, remove, EMPTY, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3856,7 +3856,7 @@ public class StringUtils {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
if (replaceChars == null) {
|
if (replaceChars == null) {
|
||||||
replaceChars = "";
|
replaceChars = EMPTY;
|
||||||
}
|
}
|
||||||
boolean modified = false;
|
boolean modified = false;
|
||||||
int replaceCharsLength = replaceChars.length();
|
int replaceCharsLength = replaceChars.length();
|
||||||
|
|
Loading…
Reference in New Issue