Ignore:
Timestamp:
2014-04-26T17:39:23+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8465 - use diamond operator where applicable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java

    r6814 r7005  
    4747        Node node = selectedNodes.iterator().next();
    4848
    49         Collection<Command> cmds = new LinkedList<Command>();
     49        Collection<Command> cmds = new LinkedList<>();
    5050
    5151        // If the user has selected some ways, only join the node to these.
     
    5555            List<WaySegment> wss = Main.map.mapView.getNearestWaySegments(
    5656                    Main.map.mapView.getPoint(node), OsmPrimitive.isSelectablePredicate);
    57             HashMap<Way, List<Integer>> insertPoints = new HashMap<Way, List<Integer>>();
     57            HashMap<Way, List<Integer>> insertPoints = new HashMap<>();
    5858            for (WaySegment ws : wss) {
    5959                // Maybe cleaner to pass a "isSelected" predicate to getNearestWaySegments, but this is less invasive.
     
    6666                    is = insertPoints.get(ws.way);
    6767                } else {
    68                     is = new ArrayList<Integer>();
     68                    is = new ArrayList<>();
    6969                    insertPoints.put(ws.way, is);
    7070                }
     
    9898
    9999    private static void pruneSuccsAndReverse(List<Integer> is) {
    100         HashSet<Integer> is2 = new HashSet<Integer>();
     100        HashSet<Integer> is2 = new HashSet<>();
    101101        for (int i : is) {
    102102            if (!is2.contains(i - 1) && !is2.contains(i + 1)) {
Note: See TracChangeset for help on using the changeset viewer.