Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 7018 invoked from network); 8 Apr 2009 09:50:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Apr 2009 09:50:36 -0000 Received: (qmail 94514 invoked by uid 500); 8 Apr 2009 09:50:36 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 94470 invoked by uid 500); 8 Apr 2009 09:50:36 -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 94461 invoked by uid 99); 8 Apr 2009 09:50:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2009 09:50:35 +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; Wed, 08 Apr 2009 09:50:33 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EF1CC234C051 for ; Wed, 8 Apr 2009 02:50:12 -0700 (PDT) Message-ID: <1221662940.1239184212978.JavaMail.jira@brutus> Date: Wed, 8 Apr 2009 02:50:12 -0700 (PDT) From: "Kevin Zhou (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-6141) [classlib][luni] java.util.ArrayList.addAll(int index, Collection c) fails to add itself 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 [classlib][luni] java.util.ArrayList.addAll(int index, Collection c) fails to add itself ----------------------------------------------------------------------------------------------------- Key: HARMONY-6141 URL: https://issues.apache.org/jira/browse/HARMONY-6141 Project: Harmony Issue Type: Bug Components: Classlib Affects Versions: 5.0M8 Reporter: Kevin Zhou Fix For: 5.0M9 Given a test case [1], both of these two scenarios are used to test java.util.ArrayList.addAll(int index, Collection c) method. For scenario1, initialize two array list "arrayListA" and "arrayListB", add 1 to them respectively; then invoke arrayListA.addAll(arrayListB); finally "arrayListA" should be like [1, 1] For scenario2, initialize an array list "arrayList", add one element to it; then try to add itself in the position of 1; finally "arrayList" should look like [1, 1] as well. Conduct this test scenarios on RI and HY, RI passes all while HY fails on the 2nd scenario. [1] Test Case: public void test_ArrayList_addAll_scenario1() { ArrayList arrayListA = new ArrayList(); arrayListA.add(1); ArrayList arrayListB = new ArrayList(); arrayListB.add(1); arrayListA.addAll(1, arrayListB); int size = arrayListA.size(); assertEquals(2, size); for (int index = 0; index < size; index++) { assertEquals(1, arrayListA.get(index)); } } public void test_ArrayList_addAll_scenario2() { ArrayList arrayList = new ArrayList(); arrayList.add(1); arrayList.addAll(1, arrayList); int size = arrayList.size(); assertEquals(2, size); for (int index = 0; index < size; index++) { assertEquals(1, arrayList.get(index)); } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.