Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 48400 invoked from network); 16 Jun 2009 07:15:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Jun 2009 07:15:20 -0000 Received: (qmail 22754 invoked by uid 500); 16 Jun 2009 07:15:31 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 22723 invoked by uid 500); 16 Jun 2009 07:15:31 -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 22714 invoked by uid 99); 16 Jun 2009 07:15:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2009 07:15:31 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2009 07:15:28 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 982C6234C053 for ; Tue, 16 Jun 2009 00:15:07 -0700 (PDT) Message-ID: <1482808955.1245136507622.JavaMail.jira@brutus> Date: Tue, 16 Jun 2009 00:15:07 -0700 (PDT) From: "Jesse Wilson (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6236) ArrayList breaks when given concurrent collections as input In-Reply-To: <898817199.1245104887334.JavaMail.jira@brutus> 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-6236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719956#action_12719956 ] Jesse Wilson commented on HARMONY-6236: --------------------------------------- The test passes on the RI. > ArrayList breaks when given concurrent collections as input > ----------------------------------------------------------- > > Key: HARMONY-6236 > URL: https://issues.apache.org/jira/browse/HARMONY-6236 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M10 > Environment: SVN Revision: 784898 > Reporter: Jesse Wilson > Attachments: ArrayList_on_concurrent_collections.patch > > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > new ArrayList() and ArrayList.addAll(Collection) assume the passed-in collection will not change between calls. > In the attached test case, a special collection simulates a background thread calling "remove" after the ArrayList has called size(), but before it has called "toArray()". This causes the collection to return a null-padded array, which leads to a corrupt ArrayList. The attached patch fixes the problem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.