Skip to content

Commit

Permalink
see #josm17598 #josm17599 #josm17600 #josm17601 #josm17602 - remove d…
Browse files Browse the repository at this point in the history
…eprecated api (patches by taylor.smock)
  • Loading branch information
don-vip committed Apr 13, 2019
1 parent b301937 commit c038f7e
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
import org.openstreetmap.josm.tools.Logging;
import org.openstreetmap.josm.tools.Pair;
import org.openstreetmap.josm.tools.Shortcut;
import org.openstreetmap.josm.tools.Utils;

/**
* @author Alexander Kachkaev <[email protected]>, 2011
Expand Down Expand Up @@ -723,12 +724,12 @@ public void mouseReleased(MouseEvent e) {
// Looking for candidateSegment copies in ways that are
// referenced
// by candidateSegment nodes
List<Way> firstNodeWays = OsmPrimitive.getFilteredList(
List<Way> firstNodeWays = new ArrayList<>(Utils.filteredCollection(
candidateSegment.getFirstNode().getReferrers(),
Way.class);
List<Way> secondNodeWays = OsmPrimitive.getFilteredList(
Way.class));
List<Way> secondNodeWays = new ArrayList<>(Utils.filteredCollection(
candidateSegment.getFirstNode().getReferrers(),
Way.class);
Way.class));

Collection<WaySegment> virtualSegments = new LinkedList<>();
for (Way w : firstNodeWays) {
Expand Down Expand Up @@ -773,7 +774,7 @@ public void mouseReleased(MouseEvent e) {

//check to see if node is in use by more than one object
List<OsmPrimitive> referrers = candidateNode.getReferrers();
List<Way> ways = OsmPrimitive.getFilteredList(referrers, Way.class);
Collection<Way> ways = Utils.filteredCollection(referrers, Way.class);
if (referrers.size() != 1 || ways.size() != 1) {
// detach node from way
final Way newWay = new Way(targetWay);
Expand Down

0 comments on commit c038f7e

Please sign in to comment.