Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 1230 invoked from network); 9 Jun 2010 22:01:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Jun 2010 22:01:48 -0000 Received: (qmail 13637 invoked by uid 500); 9 Jun 2010 22:01:48 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 13613 invoked by uid 500); 9 Jun 2010 22:01:48 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 13606 invoked by uid 99); 9 Jun 2010 22:01:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jun 2010 22:01:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jun 2010 22:01:46 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o59M1ObK021360 for ; Wed, 9 Jun 2010 22:01:25 GMT Message-ID: <7152190.11701276120884944.JavaMail.jira@thor> Date: Wed, 9 Jun 2010 18:01:24 -0400 (EDT) From: "Mark Hindess (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6547) [classlib][luni] String.replace("", CharSequence) goes out of memory In-Reply-To: <7302367.1881276088896301.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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.