You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "spark shen (JIRA)" <ji...@apache.org> on 2007/05/14 10:42:16 UTC

[jira] Updated: (HARMONY-3852) [classlib][luni] ArrayList does not throw ConcurrentModificationException after calling sequence: ArrayList.trimToSize() & ArrayList.iterator().next()

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

spark shen updated HARMONY-3852:
--------------------------------

    Attachment:     (was: ArrayList_trimToSize.patch)

> [classlib][luni] ArrayList does not throw ConcurrentModificationException after calling sequence: ArrayList.trimToSize() & ArrayList.iterator().next()
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3852
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3852
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: spark shen
>         Attachments: ArrayList_trimToSize.patch
>
>
> The following test case will fail on harmony but pass on RI
> import java.util.*;
> import junit.framework.TestCase;
> public class ArrayListTest extends TestCase {
>     public void test_trimToSize() {
>         Vector v = new Vector();
> 	v.add("a");
> 	ArrayList al = new ArrayList(v);
> 	Iterator it = al.iterator();
> 	al.trimToSize();
> 	try {
> 		it.next();
> 		fail("should throw a ConcurrentModificationException");
> 	} catch (ConcurrentModificationException ioobe) {
> 		// expected
> 	}
>     }
> }

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