Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341999 - [DataBinding] DecoratingObservable.hashCode() should not depend on decorated OV
Summary: [DataBinding] DecoratingObservable.hashCode() should not depend on decorated OV
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.2   Edit
Hardware: All Mac OS X
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 06:43 EDT by Tonny Madsen CLA
Modified: 2019-11-14 02:21 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.