harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6547) [classlib][luni] String.replace("", CharSequence) goes out of memory
Date Wed, 09 Jun 2010 22:01:24 GMT

    [ 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.

View raw message