Index: applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/DijkstraSP.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/DijkstraSP.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/DijkstraSP.java	(revision 30737)
@@ -46,5 +46,5 @@
 
         // relax vertices in order of distance from s
-        pq = new IndexMinPQ<Double>(G.V());
+        pq = new IndexMinPQ<>(G.V());
         pq.insert(s, distTo[s]);
         int count = 0;
@@ -86,5 +86,5 @@
     public Iterable<DirectedEdge> pathTo(int v) {
         if (!hasPathTo(v)) return null;
-        Stack<DirectedEdge> path = new Stack<DirectedEdge>();
+        Stack<DirectedEdge> path = new Stack<>();
         for (DirectedEdge e = edgeTo[v]; e != null; e = edgeTo[e.from()]) {
             path.push(e);
Index: applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/EdgeWeightedDigraph.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/EdgeWeightedDigraph.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/EdgeWeightedDigraph.java	(revision 30737)
@@ -36,5 +36,5 @@
         adj = (Bag<DirectedEdge>[]) new Bag[V];
         for (int v = 0; v < V; v++)
-            adj[v] = new Bag<DirectedEdge>();
+            adj[v] = new Bag<>();
     }
 
@@ -76,5 +76,5 @@
         for (int v = 0; v < G.V(); v++) {
             // reverse so that adjacency list is in same order as original
-            Stack<DirectedEdge> reverse = new Stack<DirectedEdge>();
+            Stack<DirectedEdge> reverse = new Stack<>();
             for (DirectedEdge e : G.adj[v]) {
                 reverse.push(e);
@@ -124,5 +124,5 @@
      */
     public Iterable<DirectedEdge> edges() {
-        Bag<DirectedEdge> list = new Bag<DirectedEdge>();
+        Bag<DirectedEdge> list = new Bag<>();
         for (int v = 0; v < V; v++) {
             for (DirectedEdge e : adj(v)) {
Index: applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/IndexMinPQ.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/IndexMinPQ.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/IndexMinPQ.java	(revision 30737)
@@ -174,5 +174,5 @@
         // takes linear time since already in heap order so no keys move
         public HeapIterator() {
-            copy = new IndexMinPQ<Key>(pq.length - 1);
+            copy = new IndexMinPQ<>(pq.length - 1);
             for (int i = 1; i <= N; i++)
                 copy.insert(pq[i], keys[pq[i]]);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AddIntersectionsAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AddIntersectionsAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AddIntersectionsAction.java	(revision 30737)
@@ -47,9 +47,9 @@
         }
 
-        LinkedList<Command> cmds = new LinkedList<Command>();
+        LinkedList<Command> cmds = new LinkedList<>();
         Geometry.addIntersections(ways, false, cmds);
         if (!cmds.isEmpty()) {
             Main.main.undoRedo.add(new SequenceCommand(tr("Add nodes at intersections"),cmds));
-            Set<Node> nodes = new HashSet<Node>(10);
+            Set<Node> nodes = new HashSet<>(10);
             // find and select newly added nodes
             for (Command cmd: cmds) if (cmd instanceof AddCommand){
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AlignWayNodesAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AlignWayNodesAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AlignWayNodesAction.java	(revision 30737)
@@ -45,5 +45,5 @@
         int firstNodePos = findFirstNode(way, selectedNodes);
         int lastNodePos = way.isClosed() ? firstNodePos : way.getNodesCount();
-        List<Node> nodes = new ArrayList<Node>();
+        List<Node> nodes = new ArrayList<>();
         int i = firstNodePos;
         boolean iterated = false;
@@ -75,5 +75,5 @@
         // Now, we have an ordered list of nodes, of which idx 0 and N-1 serve as guides
         // and 1..N-2 should be aligned with them
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
         double ax = nodes.get(0).getEastNorth().east();
         double ay = nodes.get(0).getEastNorth().north();
@@ -134,5 +134,5 @@
             List<Way> referrers = OsmPrimitive.getFilteredList(n.getReferrers(), Way.class);
             if( ways == null )
-                ways = new HashSet<Way>(referrers);
+                ways = new HashSet<>(referrers);
             else {
                 ways.retainAll(referrers);
@@ -143,5 +143,5 @@
 
     private Set<Node> filterNodes( Collection<? extends OsmPrimitive> selection ) {
-        Set<Node> result = new HashSet<Node>();
+        Set<Node> result = new HashSet<>();
         if( selection != null ) {
             for( OsmPrimitive p : selection )
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/ExtractPointAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/ExtractPointAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/ExtractPointAction.java	(revision 30737)
@@ -49,5 +49,5 @@
         Node nd = selectedNodes.get(0);
         Node ndCopy = new Node(nd.getCoor());
-        List<Command> cmds = new LinkedList<Command>();
+        List<Command> cmds = new LinkedList<>();
         
         Point p = Main.map.mapView.getMousePosition();
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/PasteRelationsAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/PasteRelationsAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/PasteRelationsAction.java	(revision 30737)
@@ -30,5 +30,5 @@
             return;
 
-        Map<Relation, String> relations = new HashMap<Relation, String>();
+        Map<Relation, String> relations = new HashMap<>();
         for( PrimitiveData pdata : Main.pasteBuffer.getDirectlyAdded() ) {
             OsmPrimitive p = getCurrentDataSet().getPrimitiveById(pdata.getUniqueId(), pdata.getType());
@@ -50,5 +50,5 @@
         }
 
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
         for( Relation rel : relations.keySet() ) {
             Relation r = new Relation(rel);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitObjectAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitObjectAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitObjectAction.java	(revision 30737)
@@ -92,5 +92,5 @@
         // is exactly one way that all nodes are part of.
         if (selectedWay == null && !selectedNodes.isEmpty()) {
-            Map<Way, Integer> wayOccurenceCounter = new HashMap<Way, Integer>();
+            Map<Way, Integer> wayOccurenceCounter = new HashMap<>();
             for (Node n : selectedNodes) {
                 for (Way w : OsmPrimitive.getFilteredList(n.getReferrers(), Way.class)) {
@@ -148,5 +148,5 @@
                 return;
             }
-            HashSet<Node> nds = new HashSet<Node>(selectedNodes);
+            HashSet<Node> nds = new HashSet<>(selectedNodes);
             nds.removeAll(selectedWay.getNodes());
             if (!nds.isEmpty()) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitOnIntersectionsAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitOnIntersectionsAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitOnIntersectionsAction.java	(revision 30737)
@@ -33,7 +33,7 @@
     @Override
     public void actionPerformed( ActionEvent e ) {
-        List<Command> list = new ArrayList<Command>();
+        List<Command> list = new ArrayList<>();
         List<Way> selectedWays = OsmPrimitive.getFilteredList(getCurrentDataSet().getSelected(), Way.class);
-        Map<Way, List<Node>> splitWays = new HashMap<Way, List<Node>>();
+        Map<Way, List<Node>> splitWays = new HashMap<>();
 
         for( Way way : selectedWays ) {
@@ -61,5 +61,5 @@
                         splitWays.get(refs.get(0)).add(node);
                     else {
-                        List<Node> nodes = new ArrayList<Node>(1);
+                        List<Node> nodes = new ArrayList<>(1);
                         nodes.add(node);
                         splitWays.put(refs.get(0), nodes);
@@ -77,5 +77,5 @@
             List<List<Node>> wayChunks = SplitWayAction.buildSplitChunks(splitWay, splitWays.get(splitWay));
             if( wayChunks != null ) {
-                List<OsmPrimitive> sel = new ArrayList<OsmPrimitive>(selectedWays.size());
+                List<OsmPrimitive> sel = new ArrayList<>(selectedWays.size());
                 sel.addAll(selectedWays);
                 SplitWayAction.SplitWayResult result = SplitWayAction.splitWay(getEditLayer(), splitWay, wayChunks, sel);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SymmetryAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SymmetryAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SymmetryAction.java	(revision 30737)
@@ -45,5 +45,5 @@
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
-        HashSet<Node> nodes = new HashSet<Node>();
+        HashSet<Node> nodes = new HashSet<>();
         EastNorth p1=null,p2=null;
         
@@ -74,5 +74,5 @@
         ne /= l; nn /= l; // normal unit vector
         
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
 
         for (Node n : nodes) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagBufferAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagBufferAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagBufferAction.java	(revision 30737)
@@ -18,7 +18,7 @@
 public class TagBufferAction extends JosmAction {
     private static final String TITLE = tr("Copy tags from previous selection");
-    private Map<String, String> tags = new HashMap<String, String>();
-    private Map<String, String> currentTags = new HashMap<String, String>();
-    private Set<OsmPrimitive> selectionBuf = new HashSet<OsmPrimitive>();
+    private Map<String, String> tags = new HashMap<>();
+    private Map<String, String> currentTags = new HashMap<>();
+    private Set<OsmPrimitive> selectionBuf = new HashSet<>();
 
     public TagBufferAction() {
@@ -34,5 +34,5 @@
             return;
 
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
         for( String key : tags.keySet() ) {
             String value = tags.get(key);
@@ -92,5 +92,5 @@
     private void rememberSelectionTags() {
         // Fix #8350 - only care about tagged objects
-        Collection<OsmPrimitive> selectedTaggedObjects = new ArrayList<OsmPrimitive>(getCurrentDataSet().getSelected());
+        Collection<OsmPrimitive> selectedTaggedObjects = new ArrayList<>(getCurrentDataSet().getSelected());
         for (Iterator<OsmPrimitive> it = selectedTaggedObjects.iterator(); it.hasNext(); ) {
             if (!it.next().isTagged()) {
@@ -100,5 +100,5 @@
         if( !selectedTaggedObjects.isEmpty() ) {
             currentTags.clear();
-            Set<String> bad = new HashSet<String>();
+            Set<String> bad = new HashSet<>();
             for( OsmPrimitive p : selectedTaggedObjects ) {
                 if( currentTags.isEmpty() ) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagSourceAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagSourceAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagSourceAction.java	(revision 30737)
@@ -19,5 +19,5 @@
     private static final String TITLE = tr("Add Source Tag");
     private String source;
-    private Set<OsmPrimitive> selectionBuf = new HashSet<OsmPrimitive>();
+    private Set<OsmPrimitive> selectionBuf = new HashSet<>();
     private boolean clickedTwice = false;
 
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/UnGlueRelationAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/UnGlueRelationAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/UnGlueRelationAction.java	(revision 30737)
@@ -49,6 +49,6 @@
     public void actionPerformed(ActionEvent e) {
 
-        LinkedList<Command> cmds = new LinkedList<Command>();
-        List<OsmPrimitive> newPrimitives = new LinkedList<OsmPrimitive>();
+        LinkedList<Command> cmds = new LinkedList<>();
+        List<OsmPrimitive> newPrimitives = new LinkedList<>();
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
 
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/command/ChangeRelationMemberCommand.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/command/ChangeRelationMemberCommand.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/command/ChangeRelationMemberCommand.java	(revision 30737)
@@ -34,5 +34,5 @@
             return;
         }
-        LinkedList<RelationMember> newrms = new LinkedList<RelationMember>();
+        LinkedList<RelationMember> newrms = new LinkedList<>();
         for (RelationMember rm : relation.getMembers()) {
             if (rm.getMember() == oldP) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CircleArcMaker.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CircleArcMaker.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CircleArcMaker.java	(revision 30737)
@@ -23,5 +23,5 @@
 public class CircleArcMaker {
     public static Collection<Command> doCircleArc(List<Node> selectedNodes, List<Way> selectedWays, int angleSeparation) {
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
 
         //// Decides which nodes to use as anchors based on selection
@@ -61,5 +61,5 @@
         }
 
-        Set<Way> targetWays = new HashSet<Way>();
+        Set<Way> targetWays = new HashSet<>();
 
         boolean nodesHaveBeenChoosen = false;
@@ -127,9 +127,9 @@
 
         // // Calculate the new points in the arc
-        ReturnValue<Integer> p2Index = new ReturnValue<Integer>();
+        ReturnValue<Integer> p2Index = new ReturnValue<>();
         List<EastNorth> points = circleArcPoints(p1, p2, p3, angleSeparation, false, p2Index);
 
         //// Create the new arc nodes. Insert anchor nodes at correct positions.
-        List<Node> arcNodes = new ArrayList<Node>(points.size());
+        List<Node> arcNodes = new ArrayList<>(points.size());
         arcNodes.add(n1);
         {
@@ -269,5 +269,5 @@
         int numberOfNodesInArc = Math.max((int) Math.ceil((radialLength / Math.PI) * 180 / angleSeparation)+1,
                 3);
-        List<EastNorth> points = new ArrayList<EastNorth>(numberOfNodesInArc);
+        List<EastNorth> points = new ArrayList<>(numberOfNodesInArc);
 
         // Calculate the circle points in order
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CurveAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CurveAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CurveAction.java	(revision 30737)
@@ -53,6 +53,6 @@
         updatePreferences();
 
-        List<Node> selectedNodes = new ArrayList<Node>(getCurrentDataSet().getSelectedNodes());
-        List<Way> selectedWays = new ArrayList<Way>(getCurrentDataSet().getSelectedWays());
+        List<Node> selectedNodes = new ArrayList<>(getCurrentDataSet().getSelectedNodes());
+        List<Way> selectedWays = new ArrayList<>(getCurrentDataSet().getSelectedWays());
 
         // Collection<Command> cmds = doSpline(selectedNodes, selectedWays);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/URLList.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/URLList.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/URLList.java	(revision 30737)
@@ -23,5 +23,5 @@
     }    
     public static List<String> resetURLList() {
-        List<String> items=new ArrayList<String>();
+        List<String> items=new ArrayList<>();
         items.add("Wikipedia");
         items.add("https://en.wikipedia.org/w/index.php?search={name}&fulltext=Search");
@@ -60,5 +60,5 @@
     
     public static  List<String> loadURLList() {
-        ArrayList<String> items=new ArrayList<String>();
+        ArrayList<String> items=new ArrayList<>();
         BufferedReader fr=null;
         try {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/UtilsPluginPreferences.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/UtilsPluginPreferences.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/UtilsPluginPreferences.java	(revision 30737)
@@ -134,5 +134,5 @@
         TableModel model = (table.getModel());
         String v;
-        ArrayList<String> lst=new ArrayList<String>();
+        ArrayList<String> lst=new ArrayList<>();
         int n=model.getRowCount();
         for (int i=0;i<n;i++) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonAction.java	(revision 30737)
@@ -59,7 +59,7 @@
 
         // we create a list of commands that will modify the map in the way we want.
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
         // first we create all the nodes, then we do extra stuff based on what geometry type we need.
-        LinkedList<Node> nodes = new LinkedList<Node>();
+        LinkedList<Node> nodes = new LinkedList<>();
 
         for (LatLon ll : coordinates) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonDialog.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonDialog.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonDialog.java	(revision 30737)
@@ -309,5 +309,5 @@
     private static LatLon[] parseLatLons(final String text) {
         String lines[] = text.split("\\r?\\n");
-        List<LatLon> latLons = new ArrayList<LatLon>();
+        List<LatLon> latLons = new ArrayList<>();
         for (String line : lines) {
             latLons.add(parseLatLon(line));
@@ -320,5 +320,5 @@
 
         final StringBuilder sb = new StringBuilder();
-        final List<Object> list = new ArrayList<Object>();
+        final List<Object> list = new ArrayList<>();
 
         while (m.find()) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTagDialog.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTagDialog.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTagDialog.java	(revision 30737)
@@ -145,5 +145,5 @@
 
     private void loadHistory() {
-        List<String> cmtHistory = new LinkedList<String>(
+        List<String> cmtHistory = new LinkedList<>(
                 Main.pref.getCollection(HISTORY_KEY, Arrays.asList(defaultHistory)));
         Collections.reverse(cmtHistory);
@@ -197,5 +197,5 @@
     
     public List<OsmPrimitive> getSelectedPrimitives() {
-        ArrayList<OsmPrimitive> sel = new ArrayList<OsmPrimitive>(100);
+        ArrayList<OsmPrimitive> sel = new ArrayList<>(100);
         for (int idx: tbl.getSelectedRows()) {
             sel.add(tableModel.getPrimitiveAt(tbl.convertRowIndexToModel(idx)));
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTaggerTableModel.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTaggerTableModel.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTaggerTableModel.java	(revision 30737)
@@ -29,10 +29,10 @@
 public class MultiTaggerTableModel extends AbstractTableModel implements SelectionChangedListener {
 
-    ArrayList<OsmPrimitive> list = new ArrayList<OsmPrimitive>(50);
+    ArrayList<OsmPrimitive> list = new ArrayList<>(50);
     String mainTags[] = new String[]{};
     boolean isSpecialTag[] = new boolean[]{};
-    Set<OsmPrimitiveType> shownTypes = new HashSet<OsmPrimitiveType>();
+    Set<OsmPrimitiveType> shownTypes = new HashSet<>();
     private boolean autoCommit = true;
-    List<Command> cmds = new ArrayList<Command>();
+    List<Command> cmds = new ArrayList<>();
     private boolean watchSelection = true;
     private JTable table;
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryAction.java	(revision 30737)
@@ -35,5 +35,5 @@
 
         // There must be two ways selected: one with id > 0 and one new.
-        List<OsmPrimitive> selection = new ArrayList<OsmPrimitive>(getCurrentDataSet().getSelected());
+        List<OsmPrimitive> selection = new ArrayList<>(getCurrentDataSet().getSelected());
         if (selection.size() != 2) {
             new Notification(
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java	(revision 30737)
@@ -116,5 +116,5 @@
         }
         // FIXME: handle different layers
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
         commands.add(MergeNodesAction.mergeNodes(Main.main.getEditLayer(), Arrays.asList(subjectNode, referenceNode), referenceNode));
 
@@ -143,5 +143,5 @@
         if (!subjectNode.isNew()) {
             // Prepare a list of nodes that are not important
-            Collection<Node> nodePool = new HashSet<Node>();
+            Collection<Node> nodePool = new HashSet<>();
             if (referenceObject instanceof Way) {
                 nodePool.addAll(getUnimportantNodes((Way) referenceObject));
@@ -161,5 +161,5 @@
         }
 
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
         AbstractMap<String, String> nodeTags = (AbstractMap<String, String>) subjectNode.getKeys();
 
@@ -248,5 +248,5 @@
         }
 
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
                 
         // merge tags
@@ -262,5 +262,5 @@
 
         // And the same for geometry, list nodes that can be freely deleted
-        List<Node> geometryPool = new LinkedList<Node>();
+        List<Node> geometryPool = new LinkedList<>();
         for( Node node : referenceWay.getNodes() ) {
             List<OsmPrimitive> referrers = node.getReferrers();
@@ -275,5 +275,5 @@
         // Find new nodes that are closest to the old ones, remove matching old ones from the pool
         // Assign node moves with least overall distance moved
-        Map<Node, Node> nodeAssoc = new HashMap<Node, Node>();
+        Map<Node, Node> nodeAssoc = new HashMap<>();
         if (geometryPool.size() > 0 && nodePool.size() > 0) {
             if (useRobust) {  // use robust, but slower assignment
@@ -319,5 +319,5 @@
                         tr("Exceeded iteration limit for robust method, using simpler method.")
                     ).setIcon(JOptionPane.WARNING_MESSAGE).show();     
-                    nodeAssoc = new HashMap<Node, Node>();
+                    nodeAssoc = new HashMap<>();
                 }
             }
@@ -375,5 +375,5 @@
      */
     protected static List<Node> getUnimportantNodes(Way way) {
-        List<Node> nodePool = new LinkedList<Node>();
+        List<Node> nodePool = new LinkedList<>();
         for (Node n : way.getNodes()) {
             List<OsmPrimitive> referrers = n.getReferrers();
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/ConnectedMatch.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/ConnectedMatch.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/ConnectedMatch.java	(revision 30737)
@@ -29,6 +29,6 @@
      */
     private void init(boolean all) {
-        Collection<Way> matchedWays = new HashSet<Way>();
-        Set<Node> matchedNodes = new HashSet<Node>();
+        Collection<Way> matchedWays = new HashSet<>();
+        Set<Node> matchedNodes = new HashSet<>();
         // find all ways that match the expression
         Collection<Way> allWays = Main.main.getCurrentDataSet().getWays();
@@ -45,5 +45,5 @@
             }
         }
-        Set<Way> newWays = new HashSet<Way>();
+        Set<Way> newWays = new HashSet<>();
         if (all) {
             NodeWayUtils.addWaysConnectedToNodes(matchedNodes, newWays);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/InsideMatch.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/InsideMatch.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/InsideMatch.java	(revision 30737)
@@ -30,5 +30,5 @@
      */
     private void init() {
-        Collection<OsmPrimitive> matchedAreas = new HashSet<OsmPrimitive>();
+        Collection<OsmPrimitive> matchedAreas = new HashSet<>();
         // find all ways that match the expression
         Collection<Way> ways = Main.main.getCurrentDataSet().getWays();
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/IntersectingMatch.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/IntersectingMatch.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/IntersectingMatch.java	(revision 30737)
@@ -28,5 +28,5 @@
      */
     private void init(boolean all) {
-        Collection<Way> matchedWays = new HashSet<Way>();
+        Collection<Way> matchedWays = new HashSet<>();
         // find all ways that match the expression
         Collection<Way> allWays = Main.main.getCurrentDataSet().getWays();
@@ -36,5 +36,5 @@
             }
         }
-        Set<Way> newWays = new HashSet<Way>();
+        Set<Way> newWays = new HashSet<>();
         if (all) {
             NodeWayUtils.addWaysIntersectingWaysRecursively(allWays, matchedWays, newWays);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentNodesAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentNodesAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentNodesAction.java	(revision 30737)
@@ -29,5 +29,5 @@
     }
 
-    private  Set<Way> activeWays = new HashSet<Way>();
+    private  Set<Way> activeWays = new HashSet<>();
 
     @Override
@@ -58,5 +58,5 @@
         // selecting nodes of selected ways
         if(selectedNodes.isEmpty()) {
-            HashSet<Node> newNodes = new HashSet<Node>();
+            HashSet<Node> newNodes = new HashSet<>();
             NodeWayUtils.addNodesConnectedToWays(selectedWays, newNodes);
             activeWays.clear();
@@ -69,5 +69,5 @@
         }
 
-        Set<Node> newNodes = new HashSet <Node>();
+        Set<Node> newNodes = new HashSet <>();
         for (Node node: selectedNodes) {
             for (Way w: activeWays) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentWaysAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentWaysAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentWaysAction.java	(revision 30737)
@@ -38,5 +38,5 @@
 
         // select ways attached to already selected ways
-        Set<Way> newWays = new HashSet<Way>();
+        Set<Way> newWays = new HashSet<>();
         NodeWayUtils.addWaysConnectedToWays(selectedWays, newWays);
         newWays.addAll(selectedWays);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/ConnectedWaysAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/ConnectedWaysAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/ConnectedWaysAction.java	(revision 30737)
@@ -33,5 +33,5 @@
         Set<Way> selectedWays = OsmPrimitive.getFilteredSet(getCurrentDataSet().getSelected(), Way.class);
 
-        Set<Way> newWays = new HashSet<Way>();
+        Set<Way> newWays = new HashSet<>();
 
         // selecting ways attached to selected nodes
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysAction.java	(revision 30737)
@@ -37,5 +37,5 @@
         // select ways attached to already selected ways
         if (!selectedWays.isEmpty()) {
-            Set<Way> newWays = new HashSet<Way>();
+            Set<Way> newWays = new HashSet<>();
             NodeWayUtils.addWaysIntersectingWays(
                     getCurrentDataSet().getWays(),
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysRecursiveAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysRecursiveAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysRecursiveAction.java	(revision 30737)
@@ -38,5 +38,5 @@
 
         if (!selectedWays.isEmpty()) {
-            Set<Way> newWays = new HashSet<Way>();
+            Set<Way> newWays = new HashSet<>();
             NodeWayUtils.addWaysIntersectingWaysRecursively(
                     getCurrentDataSet().getWays(),
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/MiddleNodesAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/MiddleNodesAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/MiddleNodesAction.java	(revision 30737)
@@ -46,5 +46,5 @@
         }
 
-        Set<Node> newNodes = new HashSet <Node>();
+        Set<Node> newNodes = new HashSet <>();
         NodeWayUtils.addMiddle(selectedNodes, newNodes);
         
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java	(revision 30737)
@@ -187,5 +187,5 @@
     public static void addWaysIntersectingWaysRecursively
         (Collection<Way> allWays, Collection<Way> initWays, Set<Way> newWays) {
-        Set<Way> foundWays = new HashSet<Way>();
+        Set<Way> foundWays = new HashSet<>();
         foundWays.addAll(initWays);
         newWays.addAll(initWays);
@@ -195,5 +195,5 @@
         do {
              c=0;
-             newFoundWays = new HashSet<Way>();
+             newFoundWays = new HashSet<>();
              for (Way w : foundWays){
                   c+=addWaysIntersectingWay(allWays, w, newFoundWays,newWays);
@@ -220,5 +220,5 @@
         do {
              c=0;
-             Set<Way> foundWays = new HashSet<Way>();
+             Set<Way> foundWays = new HashSet<>();
              foundWays.addAll(newWays);
              for (Way w : foundWays){
@@ -241,5 +241,5 @@
         Node n1 = it.next();
         Node n2 = it.next();
-        Set<Way> ways=new HashSet<Way>();
+        Set<Way> ways=new HashSet<>();
         ways.addAll(OsmPrimitive.getFilteredList(n1.getReferrers(), Way.class));
         for (Way w: ways) {
@@ -280,5 +280,5 @@
         Node curNode = w.lastNode();
         Node prevNode = w.getNode(w.getNodes().size()-2);
-        Set<Way> newestWays = new HashSet<Way>();
+        Set<Way> newestWays = new HashSet<>();
         while(true) {
 
@@ -361,6 +361,6 @@
        
         List<Node> searchNodes = data.searchNodes(box);
-        Set<Node> newestNodes = new HashSet<Node>();
-        Set<Way> newestWays = new HashSet<Way>();
+        Set<Node> newestNodes = new HashSet<>();
+        Set<Way> newestWays = new HashSet<>();
         for (Node n : searchNodes) {
             //if (Geometry.nodeInsidePolygon(n, polyNodes)) {
@@ -391,6 +391,6 @@
         
         List<Node> searchNodes = data.searchNodes(box);
-        Set<Node> newestNodes = new HashSet<Node>();
-        Set<Way> newestWays = new HashSet<Way>();
+        Set<Node> newestNodes = new HashSet<>();
+        Set<Way> newestWays = new HashSet<>();
         for (Node n : searchNodes) {
             //if (Geometry.nodeInsidePolygon(n, polyNodes)) {
@@ -483,6 +483,6 @@
         }
 
-        Set<Way> newWays = new HashSet<Way>();
-        Set<Node> newNodes = new HashSet<Node>();
+        Set<Way> newWays = new HashSet<>();
+        Set<Node> newNodes = new HashSet<>();
         // select nodes and ways inside slexcted ways and multipolygons
         if (!selectedWays.isEmpty()) {
@@ -503,5 +503,5 @@
         }
         
-        Set<OsmPrimitive> insideSelection = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> insideSelection = new HashSet<>();
         if (!newWays.isEmpty() || !newNodes.isEmpty()) {
             insideSelection.addAll(newWays);
@@ -512,5 +512,5 @@
 
     private static List<EastNorth> buildPointList(Iterable<Way> ways) {
-        ArrayList<EastNorth> points = new ArrayList<EastNorth>(1000);
+        ArrayList<EastNorth> points = new ArrayList<>(1000);
         for (Way way: ways) {
             for (EastNorth en: getWayPoints(way)) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectHighwayAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectHighwayAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectHighwayAction.java	(revision 30737)
@@ -54,9 +54,9 @@
 
     private Set<Way> selectNamedRoad( Way firstWay ) {
-        Set<Way> newWays = new HashSet<Way>();
+        Set<Way> newWays = new HashSet<>();
         String key = firstWay.hasKey("name") ? "name" : "ref";
         if( firstWay.hasKey(key) ) {
             String value = firstWay.get(key);
-            Queue<Node> nodeQueue = new LinkedList<Node>();
+            Queue<Node> nodeQueue = new LinkedList<>();
             nodeQueue.add(firstWay.firstNode());
             while( !nodeQueue.isEmpty() ) {
@@ -83,5 +83,5 @@
 	    intersection = firstTree.getIntersection(secondTree);
 	}
-	Set<Way> newWays = new HashSet<Way>();
+	Set<Way> newWays = new HashSet<>();
 	newWays.addAll(firstTree.getPath(intersection));
 	newWays.addAll(secondTree.getPath(intersection));
@@ -142,11 +142,11 @@
 
 	public HighwayTree( Way from, int minHighwayRank ) {
-	    tree = new ArrayList<Way>(1);
-	    refs = new ArrayList<Integer>(1);
+	    tree = new ArrayList<>(1);
+	    refs = new ArrayList<>(1);
 	    tree.add(from);
 	    refs.add(Integer.valueOf(-1));
 	    this.minHighwayRank = minHighwayRank;
-	    nodesToCheck = new ArrayList<Node>(2);
-	    nodeRefs = new ArrayList<Integer>(2);
+	    nodesToCheck = new ArrayList<>(2);
+	    nodeRefs = new ArrayList<>(2);
 	    nodesToCheck.add(from.firstNode());
 	    nodesToCheck.add(from.lastNode());
@@ -156,6 +156,6 @@
 	
 	public void processNextLevel() {
-	    List<Node> newNodes = new ArrayList<Node>();
-	    List<Integer> newIdx = new ArrayList<Integer>();
+	    List<Node> newNodes = new ArrayList<>();
+	    List<Integer> newIdx = new ArrayList<>();
 	    for( int i = 0; i < nodesToCheck.size(); i++ ) {
 		Node node = nodesToCheck.get(i);
@@ -197,5 +197,5 @@
 	    if( pos < 0 )
 		throw new ArrayIndexOutOfBoundsException("Way " + to + " is not in the tree.");
-	    List<Way> result = new ArrayList<Way>(1);
+	    List<Way> result = new ArrayList<>(1);
 	    while( pos >= 0 ) {
 		result.add(tree.get(pos));
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModNodesAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModNodesAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModNodesAction.java	(revision 30737)
@@ -52,5 +52,5 @@
         }
 
-        Set<Node> nodes = new HashSet<Node>(10);
+        Set<Node> nodes = new HashSet<>(10);
         do {  //  select next history element
             if (idx>0) idx--; else idx=num-1;
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModWaysAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModWaysAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModWaysAction.java	(revision 30737)
@@ -52,5 +52,5 @@
         }
 
-        Set<Way> ways = new HashSet<Way>(10);
+        Set<Way> ways = new HashSet<>(10);
         do {  //  select next history element
             if (idx>0) idx--; else idx=num-1;
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectWayNodesAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectWayNodesAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectWayNodesAction.java	(revision 30737)
@@ -54,5 +54,5 @@
                 Node n = (Node) p;
                 if (selectedNodes == null) {
-                    selectedNodes = new ArrayList<Node>();
+                    selectedNodes = new ArrayList<>();
                 }
                 selectedNodes.add(n);
@@ -68,5 +68,5 @@
         for (Node n : w.getNodes()) {
             if (selectedNodes == null) {
-                selectedNodes = new ArrayList<Node>();
+                selectedNodes = new ArrayList<>();
             }
             selectedNodes.add(n);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/UndoSelectionAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/UndoSelectionAction.java	(revision 30701)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/UndoSelectionAction.java	(revision 30737)
@@ -48,5 +48,5 @@
         }
         int k=0;
-        Set<OsmPrimitive> newsel = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> newsel = new HashSet<>();
         do {
             if (index+1<history.size()) index++; else index=0;
