harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "spark shen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-3852) [classlib][luni] ArrayList does not throw ConcurrentModificationException after calling sequence: ArrayList.trimToSize() & ArrayList.iterator().next()
Date Mon, 14 May 2007 08:42:16 GMT

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

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

    Attachment: 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.


Mime
View raw message