[jira] [Work logged] (LANG-1406) StringIndexOutOfBoundsException in StringUtils.replaceIgnoreCase()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Work logged] (LANG-1406) StringIndexOutOfBoundsException in StringUtils.replaceIgnoreCase()

ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/LANG-1406?focusedWorklogId=310684&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-310684 ]

ASF GitHub Bot logged work on LANG-1406:

                Author: ASF GitHub Bot
            Created on: 11/Sep/19 14:48
            Start Date: 11/Sep/19 14:48
    Worklog Time Spent: 10m
      Work Description: geratorres commented on issue #423: LANG-1406: StringIndexOutOfBoundsException in StringUtils.replaceIgnoreCase
URL: https://github.com/apache/commons-lang/pull/423#issuecomment-530415840
   Nice, thanks!
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:
[hidden email]

Issue Time Tracking

    Worklog Id:     (was: 310684)
    Time Spent: 3h 10m  (was: 3h)

> 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
>             Fix For: 3.10
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
> {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