Changeset 10922 in josm


Ignore:
Timestamp:
2016-08-31T18:44:44+02:00 (8 years ago)
Author:
michael2402
Message:

See #13309: Make PreferencesTest compile again.

Location:
trunk
Files:
2 edited

Legend:

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

    r10824 r10922  
    2121     */
    2222    public ColorProperty(String colName, String defaultValue) {
    23         this(colName, ColorHelper.html2color(defaultValue));
     23        this(colName, defaultValue == null ? null : ColorHelper.html2color(defaultValue));
    2424    }
    2525
  • trunk/test/unit/org/openstreetmap/josm/data/PreferencesTest.groovy

    r10853 r10922  
    2121        assert new ColorProperty("foo", new Color(0x12345678, true)).get().alpha == 0x12
    2222        assert Main.pref.putColor("bar", new Color(0x12345678, true))
    23         assert new ColorProperty("bar", null).get().alpha == 0x12
     23        assert new ColorProperty("bar", (String) null).get().alpha == 0x12
    2424    }
    2525
    2626    void testColorNameAlpha() {
    27         assert new ColorProperty("foo", "bar", new Color(0x12345678, true)).get().alpha == 0x12
     27        assert new ColorProperty("foo", new Color(0x12345678, true)).get().alpha == 0x12
    2828        assert Main.pref.getDefaultColor("foo") == new Color(0x34, 0x56, 0x78, 0x12)
    2929        assert Main.pref.getDefaultColor("foo").alpha == 0x12
Note: See TracChangeset for help on using the changeset viewer.