Changeset 34926 in osm for applications/editors/josm


Ignore:
Timestamp:
2019-03-20T20:34:00+01:00 (6 years ago)
Author:
donvip
Message:

fix java warnings

Location:
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/RoadGui.java

    r33294 r34926  
    3636
    3737import org.openstreetmap.josm.data.osm.Node;
    38 import org.openstreetmap.josm.data.osm.OsmPrimitive;
    3938import org.openstreetmap.josm.data.osm.Way;
    4039import org.openstreetmap.josm.plugins.turnlanes.model.Lane;
     
    629628
    630629        final Node n = end.getJunction().getNode();
    631         for (Way w : OsmPrimitive.getFilteredList(n.getReferrers(), Way.class)) {
     630        for (Way w : org.openstreetmap.josm.tools.Utils.filteredCollection(n.getReferrers(), Way.class)) {
    632631            if (w.getNodesCount() > 1 && !end.getWay().equals(w) && w.isFirstLastNode(n) && Utils.isRoad(w)) {
    633632                final Node nextNode = w.firstNode().equals(n) ? w.getNode(1) : w.getNode(w.getNodesCount() - 2);
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/TurnLanesDialog.java

    r34288 r34926  
    99import java.awt.event.ActionEvent;
    1010import java.util.Collection;
    11 import java.util.Collections;
    1211import java.util.HashSet;
    13 import java.util.List;
    1412import java.util.Set;
    1513
     
    178176    void refresh() {
    179177        if (isShowing && editing) {
    180             final Collection<OsmPrimitive> s = Collections.unmodifiableCollection(selected);
    181             final List<Node> nodes = OsmPrimitive.getFilteredList(s, Node.class);
    182             final List<Way> ways = OsmPrimitive.getFilteredList(s, Way.class);
     178            final Collection<Node> nodes = org.openstreetmap.josm.tools.Utils.filteredCollection(selected, Node.class);
     179            final Collection<Way> ways = org.openstreetmap.josm.tools.Utils.filteredCollection(selected, Way.class);
    183180
    184181            final ModelContainer mc = nodes.isEmpty() ? ModelContainer.empty() : ModelContainer
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/ModelContainer.java

    r33085 r34926  
    6161        boolean closed = true;
    6262
    63         for (Relation r : OsmPrimitive.getFilteredList(w.getReferrers(), Relation.class)) {
     63        for (Relation r : org.openstreetmap.josm.tools.Utils.filteredCollection(w.getReferrers(), Relation.class)) {
    6464            if (!r.get("type").equals(Constants.TYPE_TURNS)) {
    6565                continue;
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Turn.java

    r34566 r34926  
    2424        final Set<Turn> result = new HashSet<>();
    2525
    26         for (Relation r : OsmPrimitive.getFilteredList(primitive.getReferrers(), Relation.class)) {
     26        for (Relation r : org.openstreetmap.josm.tools.Utils.filteredCollection(primitive.getReferrers(), Relation.class)) {
    2727            if (!r.isUsable() || !r.get("type").equals(Constants.TYPE_TURNS)) {
    2828                continue;
Note: See TracChangeset for help on using the changeset viewer.