Changeset 10240 in josm


Ignore:
Timestamp:
2016-05-17T13:17:22+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #12847 - NPE - regression of r10238

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java

    r10238 r10240  
    2323import org.openstreetmap.josm.gui.mappaint.styleelement.BoxTextElement.SimpleBoxProvider;
    2424import org.openstreetmap.josm.gui.util.RotationAngle;
     25import org.openstreetmap.josm.tools.CheckParameterUtil;
    2526import org.openstreetmap.josm.tools.Utils;
    2627
     
    7980    }
    8081
     82    private static final String[] ICON_KEYS = {ICON_IMAGE, ICON_WIDTH, ICON_HEIGHT, ICON_OPACITY, ICON_OFFSET_X, ICON_OFFSET_Y};
     83
    8184    public static final NodeElement SIMPLE_NODE_ELEMSTYLE;
    8285    public static final BoxProvider SIMPLE_NODE_ELEMSTYLE_BOXPROVIDER;
     
    9295    public static final StyleElementList DEFAULT_NODE_STYLELIST_TEXT = new StyleElementList(NodeElement.SIMPLE_NODE_ELEMSTYLE,
    9396            BoxTextElement.SIMPLE_NODE_TEXT_ELEMSTYLE);
    94 
    95     private static final String[] ICON_KEYS = {ICON_IMAGE, ICON_WIDTH, ICON_HEIGHT, ICON_OPACITY, ICON_OFFSET_X, ICON_OFFSET_Y};
    9697
    9798    protected NodeElement(Cascade c, MapImage mapImage, Symbol symbol, float defaultMajorZindex, RotationAngle rotationAngle) {
     
    144145
    145146    public static MapImage createIcon(final Environment env, final String[] keys) {
     147        CheckParameterUtil.ensureParameterNotNull(env, "env");
     148        CheckParameterUtil.ensureParameterNotNull(keys, "keys");
     149
    146150        Cascade c = env.mc.getCascade(env.layer);
    147151
Note: See TracChangeset for help on using the changeset viewer.