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:
parent
49ae56659d
commit
b462572e01
|
@ -5058,11 +5058,10 @@ public class StringUtils {
|
||||||
public static String repeat(final String str, final String separator, final int repeat) {
|
public static String repeat(final String str, final String separator, final int repeat) {
|
||||||
if(str == null || separator == null) {
|
if(str == null || separator == null) {
|
||||||
return repeat(str, repeat);
|
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);
|
|
||||||
}
|
}
|
||||||
|
// 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6839,9 +6838,8 @@ public class StringUtils {
|
||||||
// distance
|
// distance
|
||||||
if (p[n] <= threshold) {
|
if (p[n] <= threshold) {
|
||||||
return p[n];
|
return p[n];
|
||||||
} else {
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// startsWith
|
// startsWith
|
||||||
|
|
Loading…
Reference in New Issue