geratorres commented on a change in pull request #422: LANG-1406: avoid 
StringIndexOutOfBounds exceptions for some cases of …
URL: https://github.com/apache/commons-lang/pull/422#discussion_r283622393
 
 

 ##########
 File path: src/main/java/org/apache/commons/lang3/StringUtils.java
 ##########
 @@ -5624,12 +5638,17 @@ private static String replace(final String text, 
String searchString, final Stri
              if (--max == 0) {
                  break;
              }
-             end = searchText.indexOf(searchString, start);
+             end = indexOf(text, searchString, start, ignoreCase);
          }
          buf.append(text, start, text.length());
          return buf.toString();
      }
 
+     private static int indexOf(String str, String searchStr, int fromIndex, 
boolean ignoreCase) {
 
 Review comment:
   I will move this method below indexOf(CharSequence, CharSequence, int) 
declaration around line 1473

----------------------------------------------------------------
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

Reply via email to