Ignore:
Timestamp:
2017-02-07T22:00:43+01:00 (3 years ago)
Author:
stoecker
Message:

null colors never worked in preferences and don't make much sense

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/preferences/ColorProperty.java

    r10922 r11542  
    55import java.util.Locale;
    66
     7import org.openstreetmap.josm.tools.CheckParameterUtil;
    78import org.openstreetmap.josm.tools.ColorHelper;
    89
     
    2122     */
    2223    public ColorProperty(String colName, String defaultValue) {
    23         this(colName, defaultValue == null ? null : ColorHelper.html2color(defaultValue));
     24        this(colName, ColorHelper.html2color(defaultValue));
    2425    }
    2526
     
    3132    public ColorProperty(String colName, Color defaultValue) {
    3233        super(getColorKey(colName), defaultValue);
     34        CheckParameterUtil.ensureParameterNotNull(defaultValue, "defaultValue");
    3335        this.name = colName;
    3436        getPreferences().registerColor(getColorKey(colName), colName);
Note: See TracChangeset for help on using the changeset viewer.