You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alan Mehio (JIRA)" <ji...@apache.org> on 2019/04/27 20:13:00 UTC
[jira] [Commented] (LANG-1453) StringUtils.removeIgnoreCase("İa", "a") throws IndexOutOfBoundsException
[ https://issues.apache.org/jira/browse/LANG-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16827739#comment-16827739 ]
Alan Mehio commented on LANG-1453:
----------------------------------
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)