Changeset 11315 in josm


Ignore:
Timestamp:
2016-11-26T00:30:08+01:00 (8 years ago)
Author:
Don-vip
Message:

findbugs - UC_USELESS_OBJECT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r11252 r11315  
    10941094    public static List<AssembledPolygon> findBoundaryPolygons(Collection<WayInPolygon> multigonWays,
    10951095            List<Way> discardedResult) {
    1096         //first find all discardable ways, by getting outer shells.
    1097         //this will produce incorrect boundaries in some cases, but second pass will fix it.
    1098         List<WayInPolygon> discardedWays = new ArrayList<>();
    1099 
    11001096        // In multigonWays collection, some way are just a point (i.e. way like nodeA-nodeA)
    11011097        // This seems to appear when is apply over invalid way like #9911 test-case
     
    11031099        List<WayInPolygon> cleanMultigonWays = new ArrayList<>();
    11041100        for (WayInPolygon way: multigonWays) {
    1105             if (way.way.getNodesCount() == 2 && way.way.isClosed())
    1106                 discardedWays.add(way);
    1107             else
     1101            if (way.way.getNodesCount() != 2 || !way.way.isClosed())
    11081102                cleanMultigonWays.add(way);
    11091103        }
Note: See TracChangeset for help on using the changeset viewer.