Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327283

Summary: [context] Context functions are called on trivial parent change
Product: z_Archived Reporter: Oleg Besedin <ob1.eclipse>
Component: E4Assignee: Project Inbox <e4.runtime-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ob1.eclipse, remy.suen
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch plus JUnits none

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.