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

Bug 246103

Summary: [DataBinding] JavaBeanObservableValue does not generate correct ValueDiff when oldValue == newValue == null
Product: [Eclipse Project] Platform Reporter: Matthew Hall <qualidafial>
Component: UIAssignee: Matthew Hall <qualidafial>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski
Version: 4.0   
Target Milestone: 3.5 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch
none
mylyn/context/zip none

Description Matthew Hall CLA 2008-09-03 11:59:43 EDT
The bean spec specifies that a bean can fire a PropertyChangeEvent with oldValue and newValue at null, which indicates that an unknown change occured.  JavaBeanObservableValue naively converts the property change event into a ValueDiff, which means that we may be missing legitimate property changes because we are not interpreting the PropertyChangeEvent correctly.
Comment 1 Matthew Hall CLA 2008-09-03 12:03:21 EDT
JavaBeanObservableMap and JavaBeanPropertyObservableMap also naively convert the PropertyChangeEvents into MapDiffs.
Comment 2 Matthew Hall CLA 2008-09-04 20:09:43 EDT
The patch for 194734 eliminates this issue--leaving open in case we decide not to go that direction
Comment 3 Matthew Hall CLA 2008-09-19 15:32:29 EDT
Retargeting for M3
Comment 4 Matthew Hall CLA 2008-11-06 21:01:43 EST
Created attachment 117279 [details]
patch

Fixed bug in JavaBeanObservableMap, JavaBeanObservableValue, and JavaBeanPropertyObservableMap.  The list and set implementations did not have the described bug.

Added tests to all JavaBeanObservable*Test classes just so we capture this requirement in the future.

Boris, +1?
Comment 5 Matthew Hall CLA 2008-11-06 21:01:50 EST
Created attachment 117280 [details]
mylyn/context/zip
Comment 6 Boris Bokowski CLA 2008-11-11 10:43:34 EST
+1 looks good
Comment 7 Matthew Hall CLA 2008-12-02 10:20:57 EST
Released to HEAD > 20081111

(forgot to resolve bug at the time)
Comment 8 Matthew Hall CLA 2009-01-30 00:43:18 EST
Verified in I20090129-0100 by running test suite