Community
Participate
Working Groups
When detaching objects the legacy wrapper need to adjust the opposite reference. Looking at the attached exception it seems that it does not do this carefully enough. java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:546) at java.util.ArrayList.set(ArrayList.java:337) at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.set(BaseCDORevision.java:484) at org.eclipse.emf.internal.cdo.CDOStore.set(CDOStore.java:345) at org.eclipse.emf.internal.cdo.CDOLegacyWrapper.setOppositeReference(CDOLegacyWrapper.java:232) at org.eclipse.emf.internal.cdo.CDOLegacyWrapper.cdoInternalPostDetach(CDOLegacyWrapper.java:215) at org.eclipse.emf.internal.cdo.CDOStateMachine.detach(CDOStateMachine.java:280) at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.detached(CDOResourceImpl.java:838) at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eBasicSetContainer(BasicEObjectImpl.java:1334) at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eInverseRemove(BasicEObjectImpl.java:1451) at org.eclipse.emf.ecore.util.EcoreEList.inverseRemove(EcoreEList.java:328) at org.eclipse.emf.common.notify.impl.NotifyingListImpl.remove(NotifyingListImpl.java:716) at org.eclipse.emf.common.util.AbstractEList.remove(AbstractEList.java:466) at org.eclipse.gmf.runtime.notation.impl.DiagramImpl.removeEdge(DiagramImpl.java:600) at org.eclipse.emf.cdo.dawn.tests.ui.MultipleResourcesTest.testDeleteAssociationConnectionRemotely(MultipleResourcesTest.java:550) 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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner.run(SWTBotJunit4ClassRunner.java:54) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.main(RemotePluginTestRunner.java:64) at org.eclipse.swtbot.eclipse.core.UITestApplication.runTests(UITestApplication.java:117) at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71) at java.lang.Thread.run(Thread.java:595)
Created attachment 177602 [details] Patch v1 Unfortunately I could not reproduce this neither with a CDO test model nor on the Dawn test case where it originally occurred. The attached patch fixed the problem but since it does not occur anymore I'd like to keep it just as future reference for the case the exception occurs again.
Created attachment 177603 [details] Test v1 Also for future reference I attach the a test (even if it currently could not reproduce the problem)
Seems that the problem still exists, see: http://www.eclipse.org/forums/index.php?t=tree&th=175283&S=4b5956275945654574dfe32e04286e32#page_top The patch seems to solve it but I still can not reproduce it reliably. We could commit the patch but I actually would postpone this until I have time to reproduce this problem. Opinions about this?
Created attachment 182118 [details] Patch v2 Patch was out of date. I updated it. Please review.
Committed to HEAD.
Available in R20110608-1407