[
https://issues.apache.org/jira/browse/LANG-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16688552#comment-16688552
]
ASF GitHub Bot commented on LANG-1406:
--------------------------------------
GitHub user drajakumar opened a pull request:
https://github.com/apache/commons-lang/pull/381
LANG-1406 StringIndexOutOfBoundsException in StringUtils.replaceIgnor…
…eCase
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/drajakumar/commons-lang master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-lang/pull/381.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #381
----
commit 77ad336da790dc522216300bfb20d74b779a9d62
Author: Don Jeba <donjeba@...>
Date: 2018-11-15T19:31:23Z
LANG-1406 StringIndexOutOfBoundsException in StringUtils.replaceIgnoreCase
----
> StringIndexOutOfBoundsException in StringUtils.replaceIgnoreCase
> ----------------------------------------------------------------
>
> Key: LANG-1406
> URL: https://issues.apache.org/jira/browse/LANG-1406
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Reporter: Michael Ryan
> Priority: Major
>
> STEPS TO REPRODUCE:
> {code}
> StringUtils.replaceIgnoreCase("\u0130x", "x", "")
> {code}
> EXPECTED: "\u0130" is returned.
> ACTUAL: StringIndexOutOfBoundsException
> This happens because the replace method is assuming that text.length() ==
> text.toLowerCase().length(), which is not true for certain characters.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)