Date: 2010-10-22 14:41 |
Priority: more information 3 |
Submitted By:
Blake Lucas (blacklight)
|
Assigned To: more information
Nobody (None) |
Summary: more information Backward compatibility of option lists |
Detailed description |
If a new option is added to a
ParamOption list, then it should still be comparable with an older
version of the option list with less options.
I recommend the following change in ParamOption:
public int compareTo(ParamModel model) {
if (model instanceof ParamOption) {
List modelOptions = ((ParamOption) model).getOptions();
return (modelOptions.size()>=options.size())?0:1;
} else {
return 1;
}
}
| |
|
Response
Message |
Date: 2010-12-02 19:54
Sender: Bennett Landman
Moved to feature requests
pending consensus on a way of ensuring backward compatibility when
option lists are tweaked.
|
Date: 2010-10-22 15:38
Sender: Blake Lucas
The current compareTo() only
checks that the two lists are the same size. I prefer a weaker
check in the event that the text has changed but the options have
not or the options have been expanded, but a strict field
comparison would be good defensive programming.
|
Date: 2010-10-22 14:43
Sender: Bennett Landman
What if the options are in a
different order or have been changed?
| |
|
Attached Files:
Name |
Download | No Files Currently Attached | |
|
No commits have been made.
Changes:
No Changes Have Been Made to This Item |