Changeset 11991 in josm


Ignore:
Timestamp:
2017-04-24T00:51:00+02:00 (2 years ago)
Author:
Don-vip
Message:

see #13665 - cleaner error

File:
1 edited

Legend:

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

    r11746 r11991  
    189189
    190190    /**
    191      * Gets the {@link MapViewPoint} for the given node. This is faster than {@link #getPointFor(LatLon)} because it uses the node east/north
    192      * cache.
     191     * Gets the {@link MapViewPoint} for the given node.
     192     * This is faster than {@link #getPointFor(LatLon)} because it uses the node east/north cache.
    193193     * @param node The node
    194194     * @return The position of that node.
     
    197197    public MapViewPoint getPointFor(Node node) {
    198198        try {
    199             return getPointFor(node.getEastNorth(getProjection()));
     199            return getPointFor(Optional.ofNullable(node.getEastNorth(getProjection()))
     200                    .orElseThrow(IllegalArgumentException::new));
    200201        } catch (JosmRuntimeException | IllegalArgumentException | IllegalStateException e) {
    201202            throw BugReport.intercept(e).put("node", node);
Note: See TracChangeset for help on using the changeset viewer.