Changeset 812 in josm
- Timestamp:
- 2008-08-21T00:29:48+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r808 r812 330 330 331 331 synchronized public void putColor(String colName, Color val) { 332 put("color."+colName, ColorHelper.color2html(val));332 put("color."+colName, val != null ? ColorHelper.color2html(val) : null); 333 333 } 334 334 … … 346 346 return def; 347 347 } 348 349 synchronized public double getDouble(String key, double def) { 350 putDefault(key, Double.toString(def)); 351 String v = get(key); 352 if(null == v) 353 return def; 354 355 try { 356 return Double.parseDouble(v); 357 } catch(NumberFormatException e) { 358 // fall out 359 } 360 return def; 361 } 348 362 }
Note:
See TracChangeset
for help on using the changeset viewer.