forked from kolesar-andras/josm-plugin-improve-way
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
see #josm17598 #josm17599 #josm17600 #josm17601 #josm17602 - remove d…
…eprecated api (patches by taylor.smock)
- Loading branch information
Showing
1 changed file
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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) { | ||
|
@@ -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); | ||
|