[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()

Gilles Sadowski (Jira)

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

ASF GitHub Bot logged work on LANG-1406:

                Author: ASF GitHub Bot
            Created on: 11/Sep/19 13:13
            Start Date: 11/Sep/19 13:13
    Worklog Time Spent: 10m
      Work Description: garydgregory commented on issue #423: LANG-1406: StringIndexOutOfBoundsException in StringUtils.replaceIgnoreCase
URL: https://github.com/apache/commons-lang/pull/423#issuecomment-530374221
   Thank you for your PR.
   I merged it into master.
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: 310570)
    Time Spent: 3h  (was: 2h 50m)

> 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: 3h
>  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