Community
Participate
Working Groups
Cloned from: 354395: containsAll returns wrong result in case of detached objects https://bugs.eclipse.org/bugs/show_bug.cgi?id=354395 Build Identifier: 20110615-0604 [17:20:17 | Bearbeitet 17:20:27] Bernd: If an ereference feature contains a detached object (e.g. if a contained object was removed from its containment relationship), then the call of containsAll() will return false instead of true. I attached a junit test which demonstrates this problem. I also see this problem with contains(), but I was not able to reproduce this in an unit-test. I think the problem could be in org.eclipse.emf.internal.cdo.view.CDOStoreImpl.contains() where the CDOID of the object will be used for check the containment in the CDORevision values, but in the case of a detached object, the objected itself will be hold in the CDORevision not only its id. Reproducible: Always Steps to Reproduce: 1. see unit-test 2. 3.
Created attachment 201270 [details] Fix
Committed revision 8896: - branches/4.0-maintenance/plugins/org.eclipse.emf.cdo - branches/4.0-maintenance/plugins/org.eclipse.emf.cdo.common - branches/4.0-maintenance/plugins/org.eclipse.emf.cdo.tests
Resolved
Closing.