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] Created: (HARMONY-3852) [classlib][luni] ArrayList does not throw ConcurrentModificationException after calling sequence: ArrayList.trimToSize() & ArrayList.iterator().next()
Date Mon, 14 May 2007 08:40:16 GMT
[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


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