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

Bug 341999

Summary: [DataBinding] DecoratingObservable.hashCode() should not depend on decorated OV
Product: [Eclipse Project] Platform Reporter: Tonny Madsen <tonny.madsen>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: daniel_megert, prakash
Version: 3.6.2   
Target Milestone: ---   
Hardware: All   
OS: Mac OS X   
Whiteboard: stalebug

Description Tonny Madsen CLA 2011-04-06 06:43:41 EDT
The current implementation of DecoratingObservable.hashCode() delegates to the decorated observable, which means that once this decorating observable is disposed, it cannot be used as a key in Maps and other structures that depends on hashCode().

Unfortunately, there are no easy way around this, as the disposed event is only fired after the key member fields has been cleared - see DecoratingObservable.dispose().

The fix is trivial, I should think: let DecoratingObservable provide its own implementation of hashCode() and equals().

One can argue that the current semantics of equals() is wrong anyway, as this implies that a decorating observable is equal to the decorated observable: why should that be true?


-- Configuration Details --
Product: Eclipse 1.3.2.20110218-0812 (org.eclipse.epp.package.rcp.product)
Installed Features:
 org.eclipse.platform 3.6.2.r362_v20110210-9gF78Gs1FrIGnHDHWkEcopoN8AmxeZflGDGKQi
Comment 1 Lars Vogel CLA 2019-11-14 02:21:20 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.