LANG-1375: defaultString(str) reuses defaultString(str, defaultStr)

This commit is contained in:
Jerry Zhao 2018-01-19 13:57:30 +11:00
parent e72654ed5a
commit d575057852
1 changed files with 2 additions and 2 deletions

View File

@ -4743,7 +4743,7 @@ public class StringUtils {
throw new IllegalArgumentException("Object varargs must not be null"); throw new IllegalArgumentException("Object varargs must not be null");
} }
final String sanitizedSeparator = defaultString(separator, StringUtils.EMPTY); final String sanitizedSeparator = defaultString(separator);
final StringBuilder result = new StringBuilder(); final StringBuilder result = new StringBuilder();
@ -7359,7 +7359,7 @@ public class StringUtils {
* was {@code null} * was {@code null}
*/ */
public static String defaultString(final String str) { public static String defaultString(final String str) {
return str == null ? EMPTY : str; return defaultString(str, EMPTY);
} }
/** /**