Changes between Initial Version and Version 1 of Ticket #15476, comment 11
- Timestamp:
- 2017-11-18T18:39:59+01:00 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #15476, comment 11
initial v1 1 btw, what is the policy on malformed double pr ef? e.g. if user entered foo123.45bar instead of a valid double1 btw, what is the policy on malformed double prop in preferences? e.g. if user entered foo123.45bar instead of a valid double 2 2 3 pr ef.get() will throw an exception and log it as warning each time, before returning the default value of pref.3 prop.get() will throw an exception and log it as warning each time, before returning the default value of pref. 4 4 (the exception is caught and not promoted (thrown again) in AbstractProperty). 5 5 6 6 Should such malformed values be reset programmatically in a prefChangedListener? 7 7 {{{ 8 if (pr ef.get() == pref.getDefaultValue())9 put(defaultValue); // or prop.remove(); 8 if (prop.get() == prop.getDefaultValue()) 9 prop.put(defaultValue); // or prop.remove(); 10 10 }}} 11 11 Or should that be left to the user to fix (after all he will note that malformed value will not be in effect).


