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

ASF GitHub Bot logged work on LANG-1453:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/May/19 14:56
            Start Date: 08/May/19 14:56
    Worklog Time Spent: 10m 
      Work Description: chtompki commented on pull request #420: LANG-1453: 
using toUpperCase instead of toLowerCase solve the problem
URL: https://github.com/apache/commons-lang/pull/420#discussion_r282105741
 
 

 ##########
 File path: src/test/java/org/apache/commons/lang3/StringUtilsTest.java
 ##########
 @@ -2687,6 +2687,9 @@ public void testRemoveIgnoreCase_String() {
 
         // StringUtils.removeIgnoreCase("queued", "zZ") = "queued"
         assertEquals("queued", StringUtils.removeIgnoreCase("queued", "zZ"));
+
+        // StringUtils.removeIgnoreCase("İa", "a") = "İ"
+        assertEquals("İ", StringUtils.removeIgnoreCase("İa", "a"));
 
 Review comment:
   We need to minimally replace `"İ"` with `"\u0130"` for this to properly 
work. For example try running:
   
   ```java
   System.out.println("İ");
   System.out.println("\u0130");
   ```
   only the second will give your desired output. That said, your point is 
still quite valid.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 239231)
    Time Spent: 1h 10m  (was: 1h)

> StringUtils.removeIgnoreCase("İa", "a") throws IndexOutOfBoundsException
> ------------------------------------------------------------------------
>
>                 Key: LANG-1453
>                 URL: https://issues.apache.org/jira/browse/LANG-1453
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.text.*
>    Affects Versions: 3.8.1
>            Reporter: Thomas Neerup
>            Priority: Critical
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> *try* {
> String s = StringUtils._removeIgnoreCase_("İa", "a");
> } *catch* (Exception e) {
> e.printStackTrace();
> }
> output
> java.lang.IndexOutOfBoundsException: start 3, end 2, s.length() 2
> at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:539)
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to