Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 383757 - Check if an EObject was already contained in Collection in EObjectChangeNotifier
Summary: Check if an EObject was already contained in Collection in EObjectChangeNotifier
Status: CLOSED FIXED
Alias: None
Product: EMFStore
Classification: Modeling
Component: Common (show other bugs)
Version: 0.9.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-28 06:01 EDT by Julian Sommerfeldt CLA
Modified: 2012-06-29 08:38 EDT (History)
1 user (show)

See Also:


Attachments
Git-patch: Only notify EObject if it was already contained in collection. (956 bytes, patch)
2012-06-28 06:01 EDT, Julian Sommerfeldt CLA
emueller: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Sommerfeldt CLA 2012-06-28 06:01:10 EDT
Created attachment 218002 [details]
Git-patch: Only notify EObject if it was already contained in collection.

Added a new check before notify in the EObjectChangeNotifier: Was an EObject already contained in the NotifiableIdEObjectCollection? If not, you cannot notify the object because you do not know about it.
This occurrs for instance if an EObject was removed from the collection and then a new child was added to this EObject. When the EObject gets notified, the new child cannot be notified because it never was in the collection (e.g. does not have a modelelementid).
Comment 1 Edgar Mueller CLA 2012-06-29 08:37:29 EDT
Patch has been applied. Thanks!