Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327283 - [context] Context functions are called on trivial parent change
Summary: [context] Context functions are called on trivial parent change
Status: VERIFIED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: E4 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-07 16:28 EDT by Oleg Besedin CLA
Modified: 2012-12-13 15:00 EST (History)
2 users (show)

See Also:


Attachments
Patch plus JUnits (3.49 KB, patch)
2010-10-07 16:29 EDT, Oleg Besedin CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Besedin CLA 2010-10-07 16:28:35 EDT
If a context receives #setParent() call and the newParent == oldParent, the context functions are unnecessary called to check if values stay the same. 

If context functions are "factory" functions that produce new values on each call, this will result on listeners receiving updates despite having no real changes in the context data.
Comment 1 Oleg Besedin CLA 2010-10-07 16:29:22 EDT
Created attachment 180454 [details]
Patch plus JUnits
Comment 2 Oleg Besedin CLA 2010-10-07 16:30:41 EDT
Patch applied to CVS Head. Thank you goes to Remy for finding this!
Comment 3 Oleg Besedin CLA 2010-10-27 15:24:07 EDT
Verified that tests testUpdateSameParentCalculated() and testUpdateSameParent() passed on I20101026-0100.