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

Bug 202960

Summary: [WorkingSets] [workingsets] hashcode implementation is WorkingSet violates contract
Product: [Eclipse Project] Platform Reporter: Michael Rennie <Michael_Rennie>
Component: UIAssignee: Kim Horne <eclipse>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: darin.eclipse
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 184915    
Attachments:
Description Flags
proposed fix none

Description Michael Rennie CLA 2007-09-11 13:39:16 EDT
The implementation of hashcode() in WorkingSet violates the implementation guideline from the Java spec. The hashcode of an item cannot change over its lifecycle, which happens for workingsets, as their hashcodes are augmented with the hashcode of the element array.

This is the direct cause of bug 184915, where the change in hashcode for a workingset cause the element map of the tree to hold disposed widgets.
Comment 1 Michael Rennie CLA 2007-09-11 13:41:42 EDT
Created attachment 78088 [details]
proposed fix

this patch proposes a fix which better conforms to the java spec for implementing hashcode and also fixes bug 184915
Comment 2 Kim Horne CLA 2007-09-12 08:53:33 EDT

*** This bug has been marked as a duplicate of bug 171463 ***