Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 45677 invoked from network); 6 May 2008 07:02:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 May 2008 07:02:16 -0000 Received: (qmail 21435 invoked by uid 500); 6 May 2008 07:02:18 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 21419 invoked by uid 500); 6 May 2008 07:02:18 -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 21408 invoked by uid 99); 6 May 2008 07:02:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2008 00:02:18 -0700 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, 06 May 2008 07:01:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8F30A234C100 for ; Tue, 6 May 2008 00:01:55 -0700 (PDT) Message-ID: <692761717.1210057315584.JavaMail.jira@brutus> Date: Tue, 6 May 2008 00:01:55 -0700 (PDT) From: "Sean Qiu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-5808) [classlib][luni] add() method of listIterator implementation in AbstractList may throw unexpected ConcurrentModificationException In-Reply-To: <361756858.1210042315870.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-5808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sean Qiu updated HARMONY-5808: ------------------------------ Attachment: Harmony-5808.diff Could someone please try this patch? Thanks > [classlib][luni] add() method of listIterator implementation in AbstractList may throw unexpected ConcurrentModificationException > --------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-5808 > URL: https://issues.apache.org/jira/browse/HARMONY-5808 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M6 > Reporter: Sean Qiu > Fix For: 5.0M6 > > Attachments: Harmony-5808.diff > > > add() method of listIterator implementation in AbstractList may throw unexpected ConcurrentModificationException. > Its behavior is different from the one of RI. > Here is the test case: > public class AbstractListTest extends junit.framework.TestCase { > public void test_listIterator() { > list = new MockArrayList(); > ListIterator it = list.listIterator(); > it.add("one"); > it.add("two"); > assertEquals(2,list.size()); > } > class MockArrayList extends AbstractList { > ArrayList list = new ArrayList(); > > public E remove(int idx) { > modCount++; > return list.remove(idx); > } > @Override > public E get(int index) { > return list.get(index); > } > @Override > public int size() { > return list.size(); > } > @Override > public void add(int idx, E o) { > modCount += 10; > list.add(idx, o); > } > } > } > Test results: > RI can pass this test. > Harmony will throw a ConcurrentModificationException. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.