Community
Participate
Working Groups
When the containment of a reference is changed, the cache behind the method EClass.getEAllContainments does not get refreshed. More specifically, the last assertion of the following minimal test case fails: EClass eClass = EcoreFactory.eINSTANCE.createEClass(); Assert.assertTrue(eClass.getEAllContainments().isEmpty()); EReference reference = EcoreFactory.eINSTANCE.createEReference(); reference.setContainment(true); eClass.getEStructuralFeatures().add(reference); Assert.assertEquals(1, eClass.getEAllContainments().size()); reference.setContainment(false); Assert.assertTrue(eClass.getEAllContainments().isEmpty());
A fix has been committed to CVS for 2.7.
The fix is available in the latest build for the stream.