Changeset 11141 in josm


Ignore:
Timestamp:
2016-10-17T22:51:04+02:00 (8 years ago)
Author:
michael2402
Message:

More checks for MapViewState parameters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapViewState.java

    r11026 r11141  
    1111import java.awt.geom.Rectangle2D;
    1212import java.io.Serializable;
     13import java.util.Objects;
    1314
    1415import javax.swing.JComponent;
     
    193194     */
    194195    public MapViewPoint getPointFor(Node node) {
    195         return getPointFor(node.getEastNorth(getProjection()));
     196        try {
     197            return getPointFor(node.getEastNorth(getProjection()));
     198        } catch (RuntimeException e) {
     199            throw BugReport.intercept(e).put("node", node);
     200        }
    196201    }
    197202
     
    583588
    584589        MapViewEastNorthPoint(EastNorth eastNorth) {
    585             CheckParameterUtil.ensureParameterNotNull(eastNorth, "eastNorth");
    586             this.eastNorth = eastNorth;
     590            this.eastNorth = Objects.requireNonNull(eastNorth, "eastNorth");
    587591        }
    588592
Note: See TracChangeset for help on using the changeset viewer.