Skip to content

Commit

Permalink
remove call to deprecated API
Browse files Browse the repository at this point in the history
  • Loading branch information
don-vip committed Apr 21, 2019
1 parent 92d9f4b commit be070c2
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.openstreetmap.josm.data.osm.Node;
import org.openstreetmap.josm.data.osm.OsmPrimitive;
import org.openstreetmap.josm.data.osm.Relation;
import org.openstreetmap.josm.tools.Utils;

/**
* Utils class for stop areas
Expand Down Expand Up @@ -69,12 +70,8 @@ public static boolean verifyStopAreaPlatform(final OsmPrimitive p) {
* @return true if the object part of stop area relation, false otherwise.
*/
public static boolean verifyIfMemberOfStopArea(final OsmPrimitive member) {
for (Relation parentRelation : OsmPrimitive.getFilteredList(member.getReferrers(), Relation.class)) {
if (StopUtils.isStopArea(parentRelation)) {
return true;
}
}
return false;
return Utils.filteredCollection(member.getReferrers(), Relation.class).stream()
.anyMatch(StopUtils::isStopArea);
}

}

0 comments on commit be070c2

Please sign in to comment.