Project: Eclipse_Platform_UI
Bug 147545 [DataBinding] When attempting to fire a stale event AbstractObservable throws ClassCastException
Reported: 2006-06-16 19:43:28 | Status: verified fixed

The code in AbstractObservable for the firing of stale events appears to be incomplete. When listeners are added they're added as type IStaleListener but when retrieved they're cast to IChangeListener. I'm assuming that code was copied from the change listener code but not completed. Attaching patch...

Files changed in fix:
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/observable/AbstractObservable.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/observable/list/AbstractObservableList.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/observable/mapping/BaseObservableMapping.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/ObservableTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/observable/AbstractObservableTest.java