Ticket #17602: 17602.patch

File 17602.patch, 2.0 KB (added by taylor.smock, 7 years ago)

Replace deprecated functions

  • src/org/openstreetmap/josm/plugins/improveway/ImproveWayAccuracyAction.java

     
    6464import org.openstreetmap.josm.tools.Logging;
    6565import org.openstreetmap.josm.tools.Pair;
    6666import org.openstreetmap.josm.tools.Shortcut;
     67import org.openstreetmap.josm.tools.Utils;
    6768
    6869/**
    6970 * @author Alexander Kachkaev <alexander@kachkaev.ru>, 2011
     
    723724                // Looking for candidateSegment copies in ways that are
    724725                // referenced
    725726                // by candidateSegment nodes
    726                 List<Way> firstNodeWays = OsmPrimitive.getFilteredList(
     727                List<Way> firstNodeWays = new ArrayList<>(Utils.filteredCollection(
    727728                        candidateSegment.getFirstNode().getReferrers(),
    728                         Way.class);
    729                 List<Way> secondNodeWays = OsmPrimitive.getFilteredList(
     729                        Way.class));
     730                List<Way> secondNodeWays = new ArrayList<>(Utils.filteredCollection(
    730731                        candidateSegment.getFirstNode().getReferrers(),
    731                         Way.class);
     732                        Way.class));
    732733
    733734                Collection<WaySegment> virtualSegments = new LinkedList<>();
    734735                for (Way w : firstNodeWays) {
     
    773774
    774775                //check to see if node is in use by more than one object
    775776                List<OsmPrimitive> referrers = candidateNode.getReferrers();
    776                 List<Way> ways = OsmPrimitive.getFilteredList(referrers, Way.class);
     777                Collection<Way> ways = Utils.filteredCollection(referrers, Way.class);
    777778                if (referrers.size() != 1 || ways.size() != 1) {
    778779                    // detach node from way
    779780                    final Way newWay = new Way(targetWay);