Changeset 15942 in josm


Ignore:
Timestamp:
2020-02-26T19:30:59+01:00 (5 weeks ago)
Author:
GerdP
Message:

findbugs BC_UNCONFIRMED_CAST

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r15938 r15942  
    3030import org.openstreetmap.josm.data.osm.INode;
    3131import org.openstreetmap.josm.data.osm.IPrimitive;
    32 import org.openstreetmap.josm.data.osm.IRelation;
    3332import org.openstreetmap.josm.data.osm.IWay;
    3433import org.openstreetmap.josm.data.osm.MultipolygonBuilder;
     
    563562            return Geometry.getArea(((Way) p).getNodes());
    564563        }
    565         if (p.isMultipolygon() && !p.isIncomplete() && !((IRelation<?>) p).hasIncompleteMembers()) {
     564        if (p instanceof Relation && p.isMultipolygon() && !p.isIncomplete()
     565                && !((Relation) p).hasIncompleteMembers()) {
    566566            Multipolygon mp = MultipolygonCache.getInstance().get((Relation) p);
    567567            Path2D path = new Path2D.Double();
Note: See TracChangeset for help on using the changeset viewer.