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

Bug 331348

Summary: [DataBinding] Make get<Value|Set|List|Map> methods of properties non-final
Product: [Eclipse Project] Platform Reporter: Ovidio Mallo <mallo.ovidio>
Component: UIAssignee: Ovidio Mallo <mallo.ovidio>
Status: RESOLVED FIXED QA Contact: Ovidio Mallo <mallo.ovidio>
Severity: normal    
Priority: P3 CC: bokowski, emoffatt, ob1.eclipse, pwebster, qualidafial, remy.suen
Version: 3.6.1   
Target Milestone: 3.7 M5   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 306611    
Attachments:
Description Flags
patch which makes the getter non-final
none
added the JavaDoc proposed by Matthew none

Description Ovidio Mallo CLA 2010-11-29 10:38:03 EST
This is about making the get/set<Value|Set|List|Map> methods of properties non-final in order to allow subclasses to return default values in case the source object is null. One use case which requires this functionality is bug 306611.
Comment 1 Ovidio Mallo CLA 2010-12-06 14:11:50 EST
After the discussion with Matthew in bug 306611, only the getter methods will be made non-final for now since for the setter it makes less sense.
Comment 2 Ovidio Mallo CLA 2010-12-06 14:17:20 EST
Created attachment 184650 [details]
patch which makes the getter non-final

Matthew, +1?
Comment 3 Matthew Hall CLA 2010-12-06 15:04:11 EST
Let's add javadoc comments to the get<Value|List|Set|Map> methods to clarify:
* What the method implementation does (checks for null and delegates to doGet<Value|List|Set|Map>)
* Under what circumstances subclasses should override the default implementation (give alternative handling of nulls as an example).

+1 once the above are addressed.
Comment 4 Ovidio Mallo CLA 2010-12-06 16:44:37 EST
Created attachment 184661 [details]
added the JavaDoc proposed by Matthew
Comment 5 Ovidio Mallo CLA 2010-12-06 16:48:20 EST
Released to HEAD > 20101206
Comment 6 Oleg Besedin CLA 2010-12-07 09:59:29 EST
Please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=306611#c15 .
Comment 7 Paul Webster CLA 2010-12-07 10:07:14 EST
Hi Ovidio,

I've talked to Boris, and could you please revert this fix.  You can commit it
again when 3.7 M4 is declared.

PW
Comment 8 Ovidio Mallo CLA 2010-12-07 11:15:48 EST
The changes of this bug are reverted.
Comment 9 Matthew Hall CLA 2010-12-22 23:18:46 EST
Ovidio, you can push these changes again.
Comment 10 Ovidio Mallo CLA 2010-12-23 16:59:00 EST
Thanks for the reminder, Matthew.

Re-released to HEAD > 20101223