Simplify a null check in the private replaceEach() method. (#514)
This commit is contained in:
parent
96caf42b31
commit
0b899ee40b
|
@ -6717,8 +6717,7 @@ public class StringUtils {
|
||||||
// index of replace array that will replace the search string found
|
// index of replace array that will replace the search string found
|
||||||
// NOTE: logic duplicated below START
|
// NOTE: logic duplicated below START
|
||||||
for (int i = 0; i < searchLength; i++) {
|
for (int i = 0; i < searchLength; i++) {
|
||||||
if (noMoreMatchesForReplIndex[i] || searchList[i] == null ||
|
if (noMoreMatchesForReplIndex[i] || isEmpty(searchList[i]) || replacementList[i] == null) {
|
||||||
searchList[i].isEmpty() || replacementList[i] == null) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
tempIndex = text.indexOf(searchList[i]);
|
tempIndex = text.indexOf(searchList[i]);
|
||||||
|
|
Loading…
Reference in New Issue