You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mark Hindess (JIRA)" <ji...@apache.org> on 2010/06/10 00:01:24 UTC

[jira] Commented: (HARMONY-6547) [classlib][luni] String.replace("", CharSequence) goes out of memory

    [ https://issues.apache.org/jira/browse/HARMONY-6547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877231#action_12877231 ] 

Mark Hindess commented on HARMONY-6547:
---------------------------------------

I've committed your patch in r953170.  Please confirm (by closing this JIRA) that it has been applied as expected.



> [classlib][luni] String.replace("", CharSequence) goes out of memory
> --------------------------------------------------------------------
>
>                 Key: HARMONY-6547
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6547
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Catherine Hope
>            Priority: Minor
>         Attachments: 6547.patch
>
>
> Calling String.replace(CharSequence, CharSequence) with the empty String as the first argument throws an OutOfMemoryError as it goes into an infinite loop trying to substitute the sequence at the same point until the StringBuilder fills the heap.  The RI in this case substitutes the replacement String at the start, inbetween each character and at the end.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.