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

ASF GitHub Bot commented on LANG-1276:
--------------------------------------

Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/200
  
    
    [![Coverage 
Status](https://coveralls.io/builds/8463388/badge)](https://coveralls.io/builds/8463388)
    
    Coverage increased (+0.02%) to 93.57% when pulling 
**0dd44493d70188ed6145cdb130537532cbc68522 on andyklimczak:LANG-1276** into 
**e2dbe55d56bd6c1209276050f527d36717e33e1d on apache:master**.



> [lang] ArrayIndexOutOfBoundsException StrBuilder replace
> --------------------------------------------------------
>
>                 Key: LANG-1276
>                 URL: https://issues.apache.org/jira/browse/LANG-1276
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 3.2.1, 3.4, 3.5
>            Reporter: Andreas Skomedal
>             Fix For: Patch Needed, 3.6
>
>
> There is a bug in replace for StrBuilder, seems the use of nonupdated buffer 
> and character count is off.
> new StrBuilder("Dear X, hello X.").replaceAll(StrMatcher.stringMatcher("X"), 
> "012345678901234567");
> yields
> {noformat}
> java.lang.ArrayIndexOutOfBoundsException: 49
>       at 
> org.apache.commons.lang3.text.StrMatcher$StringMatcher.isMatch(StrMatcher.java:372)
>       at 
> org.apache.commons.lang3.text.StrBuilder.replaceImpl(StrBuilder.java:2115)
>       at 
> org.apache.commons.lang3.text.StrBuilder.replace(StrBuilder.java:2088)
>       at 
> org.apache.commons.lang3.text.StrBuilder.replaceAll(StrBuilder.java:2049)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to