commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Mehio (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LANG-1453) StringUtils.removeIgnoreCase("İa", "a") throws IndexOutOfBoundsException
Date Sun, 28 Apr 2019 07:51:00 GMT

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

Alan Mehio edited comment on LANG-1453 at 4/28/19 7:50 AM:
-----------------------------------------------------------

This is also verified on 

JDK 12.0.1  under window 10

on commons-lang3 version 3.10-SNAPSHOT

I have adding  the below line to StringUtilsTest 

 

@Test
 public void testRemoveIgnoreCase_String()

{   .... assertEquals("İ", StringUtils.removeIgnoreCase("İa", "a")); }

 

The method fails  with the same exception reported as above.   I wonder about the character
set for "İ" is not "i"  or "I". 

 


was (Author: alanmehio):
This is also verified on 

JDK 12.0.1  under window 10

on commons-lang3 version 3.10-SNAPSHOT

I have adding  the below line to StringUtilsTest 

 

@Test
 public void testRemoveIgnoreCase_String() {

 

....

assertEquals("a", StringUtils.removeIgnoreCase("İa", "a"));

}

 

The method fails  with the same exception reported as above.   I wonder about the character
set for "İ" is not "i"  or "I". 

 

> 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
>
> *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)

Mime
View raw message