You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (Jira)" <ji...@apache.org> on 2019/09/11 13:09:00 UTC
[jira] [Updated] (LANG-1406) StringIndexOutOfBoundsException in
StringUtils.replaceIgnoreCase()
[ https://issues.apache.org/jira/browse/LANG-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Gregory updated LANG-1406:
-------------------------------
Summary: StringIndexOutOfBoundsException in StringUtils.replaceIgnoreCase() (was: 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
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> 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
(v8.3.2#803003)