Changes between Initial Version and Version 1 of Ticket #15476, comment 11


Ignore:
Timestamp:
2017-11-18T18:39:59+01:00 (8 years ago)
Author:
cmuelle8

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15476, comment 11

    initial v1  
    1 btw, what is the policy on malformed double pref?  e.g. if user entered foo123.45bar instead of a valid double
     1btw, what is the policy on malformed double prop in preferences?  e.g. if user entered foo123.45bar instead of a valid double
    22
    3 pref.get() will throw an exception and log it as warning each time, before returning the default value of pref.
     3prop.get() will throw an exception and log it as warning each time, before returning the default value of pref.
    44(the exception is caught and not promoted (thrown again) in AbstractProperty).
    55
    66Should such malformed values be reset programmatically in a prefChangedListener?
    77{{{
    8     if (pref.get() == pref.getDefaultValue())
    9          put(defaultValue);  // or prop.remove();
     8    if (prop.get() == prop.getDefaultValue())
     9         prop.put(defaultValue);  // or prop.remove();
    1010}}}
    1111Or should that be left to the user to fix (after all he will note that malformed value will not be in effect).