You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tony Wu (JIRA)" <ji...@apache.org> on 2007/03/23 10:06:32 UTC

[jira] Updated: (HARMONY-3481) [classlib][luni] ArrayList throw ArrayIndexOutOfBoundsException when invoking addAll(Collection) after removing some elements

     [ https://issues.apache.org/jira/browse/HARMONY-3481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tony Wu updated HARMONY-3481:
-----------------------------

    Attachment: harmony-3481.diff

would you please try the patch? thanks a lot!

> [classlib][luni] ArrayList throw ArrayIndexOutOfBoundsException when invoking addAll(Collection) after removing some elements
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3481
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3481
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Sean Qiu
>         Attachments: harmony-3481.diff
>
>
> Here is the testcase:
> >>>>>>>>
> public class Test extends TestCase {
>     public void test_addAll(){
>         ArrayList<Integer> array = new ArrayList<Integer>(12);
>         for(int i =0; i<12; i++){
>             array.add(new Integer(i));
>         }
>         array.remove(0);
>         array.remove(1);
>         
>         ArrayList<Integer> add = new ArrayList<Integer>(11);
>         for(int i =0; i<11; i++){
>             add.add(new Integer(i));
>         }
>         array.addAll(add);
>     }
> }
> >>>>>>>>>>
> Result
> RI: pass
> Harmony: fail
> Trace in Harmony :
> java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 22
> 	at java.util.ArrayList.addAll(ArrayList.java:233)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.