Greetings,
I added the following simple method to XMLHelperTestCase. When I invoke this
new test method, a ConcurrentModificationException is thrown (see the stack
trace below). Is this the expected behavior? I can avoid the problem by making
a copy of the quote DataObject before I save it. However, it is not clear to me
why this is necessary.
- Ron
public void testSaveDataObjectListEntries() throws IOException
{
XMLDocument doc =
xmlh.load(getClass().getResource("/simpleWithChangeSummary.xml").openStream());
List quotes = doc.getRootObject().getList("quotes");
for (Iterator iterator = quotes.iterator(); iterator.hasNext();) {
DataObject quote = (DataObject)iterator.next();
xmlh.save(quote, null, "quotes");
}
}
java.util.ConcurrentModificationException
at
org.eclipse.emf.common.util.BasicEList$EIterator.checkModCount(BasicEList.java:1327)
at
org.eclipse.emf.common.util.BasicEList$EIterator.next(BasicEList.java:1275)
at
org.apache.tuscany.sdo.test.XMLHelperTestCase.testSaveDataObjectListEntries(XMLHelperTestCase.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]