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-5705) [classlib][luni] ArrayList.addAll( Collection c) may throw unexpected ArrayIndexOutofBoundsException
Date Wed, 09 Apr 2008 10:17:25 GMT
[classlib][luni] ArrayList.addAll( Collection c) may throw unexpected ArrayIndexOutofBoundsException
----------------------------------------------------------------------------------------------------

                 Key: HARMONY-5705
                 URL: https://issues.apache.org/jira/browse/HARMONY-5705
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M6
            Reporter: Sean Qiu
             Fix For: 5.0M6


Run these test, Harmony will throw unexpected exception of java.lang.ArrayIndexOutofBoundsException:

===============

        String[] data = new String[] { "1", "2", "3", "4", "5", "6", "7", "8" };
        ArrayList list1 = new ArrayList();
        ArrayList list2 = new ArrayList();
        for (String d : data) {
            list1.add(d);
            list2.add(d);
            list2.add(d);
        }
        while (list1.size() > 0)
            list1.remove(0);
        list1.addAll(list2);

-- 
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