harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Qiu (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3481) [classlib][luni] ArrayList throw ArrayIndexOutOfBoundsException when invoking addAll(Collection) after removing some elements
Date Fri, 23 Mar 2007 07:58:32 GMT
[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


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.


Mime
View raw message