namannigam commented on a change in pull request #514: Simplify a null check in
the private replaceEach() method of StringUtils.
URL: https://github.com/apache/commons-lang/pull/514#discussion_r410687269
##########
File path: src/main/java/org/apache/commons/lang3/StringUtils.java
##########
@@ -6723,8 +6723,7 @@ private static String replaceEach(
// index of replace array that will replace the search string found
// NOTE: logic duplicated below START
for (int i = 0; i < searchLength; i++) {
- if (noMoreMatchesForReplIndex[i] || searchList[i] == null ||
- searchList[i].isEmpty() || replacementList[i] == null) {
+ if (noMoreMatchesForReplIndex[i] || isEmpty(searchList[i])||
replacementList[i] == null) {
Review comment:
nit: need to format correctly
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services