Statements unnecessarily nested within else clause.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1489695 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2013-06-05 03:40:00 +00:00
parent 49ae56659d
commit b462572e01
1 changed files with 4 additions and 6 deletions

View File

@ -5058,12 +5058,11 @@ public class StringUtils {
public static String repeat(final String str, final String separator, final int repeat) {
if(str == null || separator == null) {
return repeat(str, repeat);
} else {
}
// given that repeat(String, int) is quite optimized, better to rely on it than try and splice this into it
final String result = repeat(str + separator, repeat);
return removeEnd(result, separator);
}
}
/**
* <p>Returns padding using the specified delimiter repeated
@ -6839,9 +6838,8 @@ public class StringUtils {
// distance
if (p[n] <= threshold) {
return p[n];
} else {
return -1;
}
return -1;
}
// startsWith