Ticket #17580: 17580.patch

File 17580.patch, 1.5 KB (added by taylor.smock, 6 years ago)

Replace deprecated functions

  • src/org/openstreetmap/josm/plugins/terracer/TerracerAction.java

     
    4646import org.openstreetmap.josm.tools.Pair;
    4747import org.openstreetmap.josm.tools.Shortcut;
    4848import org.openstreetmap.josm.tools.UserCancelException;
     49import org.openstreetmap.josm.tools.Utils;
    4950
    5051/**
    5152 * Terraces a quadrilateral, closed way into a series of quadrilateral,
     
    118119
    119120                outline = (Way) prim;
    120121            } else if (sel.size() > 1) {
    121                 List<Way> ways = OsmPrimitive.getFilteredList(sel, Way.class);
     122                List<Way> ways = new ArrayList<>(Utils.filteredCollection(sel, Way.class));
    122123                Iterator<Way> wit = ways.iterator();
    123124                while (wit.hasNext()) {
    124125                    Way way = wit.next();
     
    142143                if (outline == null)
    143144                    throw new InvalidUserInputException("no outline way found");
    144145
    145                 List<Node> nodes = OsmPrimitive.getFilteredList(sel, Node.class);
     146                List<Node> nodes = new ArrayList<>(Utils.filteredCollection(sel, Node.class));
    146147                Iterator<Node> nit = nodes.iterator();
    147148                // Actually this should test if the selected address nodes lie
    148149                // within the selected outline. Any ideas how to do this?