Index: trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 8338)
@@ -13,4 +13,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Set;
 
 import javax.swing.JOptionPane;
@@ -133,5 +134,5 @@
         List<Node> nodes = new LinkedList<>();
         // fixNodes: All nodes for which the angle relative to center should not be modified
-        HashSet<Node> fixNodes = new HashSet<>();
+        Set<Node> fixNodes = new HashSet<>();
         List<Way> ways = new LinkedList<>();
         EastNorth center = null;
@@ -156,11 +157,11 @@
             Way closedWay = new Way(w);
             closedWay.addNode(w.firstNode());
-            ArrayList<Way> usedWays = new ArrayList<>(1);
+            List<Way> usedWays = new ArrayList<>(1);
             usedWays.add(closedWay);
             nodes = collectNodesAnticlockwise(usedWays);
         } else if (!ways.isEmpty() && checkWaysArePolygon(ways)) {
             // Case 2
-            ArrayList<Node> inside = new ArrayList<>();
-            ArrayList<Node> outside = new ArrayList<>();
+            List<Node> inside = new ArrayList<>();
+            List<Node> outside = new ArrayList<>();
 
             for(Node n: nodes) {
@@ -287,5 +288,5 @@
      */
     private List<Node> collectNodesWithExternReferers(List<Way> ways) {
-        ArrayList<Node> withReferrers = new ArrayList<>();
+        List<Node> withReferrers = new ArrayList<>();
         for(Way w: ways)
             for(Node n: w.getNodes())
@@ -301,5 +302,5 @@
      */
     private List<Node> collectNodesAnticlockwise(List<Way> ways) {
-        ArrayList<Node> nodes = new ArrayList<>();
+        List<Node> nodes = new ArrayList<>();
         Node firstNode = ways.get(0).firstNode();
         Node lastNode = null;
Index: trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 8338)
@@ -271,5 +271,5 @@
             DataSet dataset = Main.main.getCurrentDataSet();
             if(dataset != null) {
-                ArrayList<DataSource> dataSources = new ArrayList<>(dataset.getDataSources());
+                List<DataSource> dataSources = new ArrayList<>(dataset.getDataSources());
                 int s = dataSources.size();
                 if(s > 0) {
Index: trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 8338)
@@ -11,5 +11,4 @@
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
@@ -184,6 +183,6 @@
         List<Command> resolution = CombinePrimitiveResolverDialog.launchIfNecessary(wayTags, ways, Collections.singleton(targetWay));
 
-        LinkedList<Command> cmds = new LinkedList<>();
-        LinkedList<Way> deletedWays = new LinkedList<>(ways);
+        List<Command> cmds = new LinkedList<>();
+        List<Way> deletedWays = new LinkedList<>(ways);
         deletedWays.remove(targetWay);
 
@@ -561,5 +560,5 @@
 
         protected Set<Node> getNodes(Stack<NodePair> pairs) {
-            HashSet<Node> nodes = new LinkedHashSet<>(2*pairs.size());
+            Set<Node> nodes = new LinkedHashSet<>(2*pairs.size());
             for (NodePair pair: pairs) {
                 nodes.add(pair.getA());
@@ -594,5 +593,5 @@
 
         protected List<Node> buildPathFromNodePairs(Stack<NodePair> path) {
-            LinkedList<Node> ret = new LinkedList<>();
+            List<Node> ret = new LinkedList<>();
             for (NodePair pair: path) {
                 ret.add(pair.getA());
Index: trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 8338)
@@ -164,5 +164,5 @@
     public static List<ExtensionFileFilter> getImportExtensionFileFilters() {
         updateAllFormatsImporter();
-        LinkedList<ExtensionFileFilter> filters = new LinkedList<>();
+        List<ExtensionFileFilter> filters = new LinkedList<>();
         for (FileImporter importer : importers) {
             filters.add(importer.filter);
@@ -181,5 +181,5 @@
      */
     public static List<ExtensionFileFilter> getExportExtensionFileFilters() {
-        LinkedList<ExtensionFileFilter> filters = new LinkedList<>();
+        List<ExtensionFileFilter> filters = new LinkedList<>();
         for (FileExporter exporter : exporters) {
             if (filters.contains(exporter.filter) || !exporter.isEnabled()) {
Index: trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 8338)
@@ -1071,5 +1071,5 @@
         // This seems to appear when is apply over invalid way like #9911 test-case
         // Remove all of these way to make the next work.
-        ArrayList<WayInPolygon> cleanMultigonWays = new ArrayList<>();
+        List<WayInPolygon> cleanMultigonWays = new ArrayList<>();
         for(WayInPolygon way: multigonWays)
             if(way.way.getNodesCount() == 2 && way.way.firstNode() == way.way.lastNode())
@@ -1083,5 +1083,5 @@
         WayInPolygon startWay;
         while((startWay = traverser.startNewWay()) != null) {
-            ArrayList<WayInPolygon> path = new ArrayList<>();
+            List<WayInPolygon> path = new ArrayList<>();
             List<WayInPolygon> startWays = new ArrayList<>();
             path.add(startWay);
Index: trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 8338)
@@ -283,5 +283,5 @@
 
         // put the nodes of all ways in a set
-        final HashSet<Node> allNodes = new HashSet<>();
+        final Set<Node> allNodes = new HashSet<>();
         for (WayData w : wayDataList) {
             for (Node n : w.way.getNodes()) {
@@ -291,6 +291,6 @@
 
         // the new x and y value for each node
-        final HashMap<Node, Double> nX = new HashMap<>();
-        final HashMap<Node, Double> nY = new HashMap<>();
+        final Map<Node, Double> nX = new HashMap<>();
+        final Map<Node, Double> nY = new HashMap<>();
 
         // calculate the centroid of all nodes
@@ -314,5 +314,5 @@
         final Direction[][] ORIENTATIONS = {HORIZONTAL, VERTICAL};
         for (Direction[] orientation : ORIENTATIONS){
-            final HashSet<Node> s = new HashSet<>(allNodes);
+            final Set<Node> s = new HashSet<>(allNodes);
             int s_size = s.size();
             for (int dummy = 0; dummy < s_size; ++dummy) {
@@ -322,6 +322,6 @@
                 final Node dummy_n = s.iterator().next();     // pick arbitrary element of s
 
-                final HashSet<Node> cs = new HashSet<>(); // will contain each node that can be reached from dummy_n
-                cs.add(dummy_n);                              // walking only on horizontal / vertical segments
+                final Set<Node> cs = new HashSet<>(); // will contain each node that can be reached from dummy_n
+                cs.add(dummy_n);                      // walking only on horizontal / vertical segments
 
                 boolean somethingHappened = true;
@@ -349,5 +349,5 @@
                 }
 
-                final HashMap<Node, Double> nC = (orientation == HORIZONTAL) ? nY : nX;
+                final Map<Node, Double> nC = (orientation == HORIZONTAL) ? nY : nX;
 
                 double average = 0;
Index: trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 8338)
@@ -119,5 +119,5 @@
 
         protected Map<OsmPrimitiveType, Integer> getSourceStatistics() {
-            HashMap<OsmPrimitiveType, Integer> ret = new HashMap<>();
+            Map<OsmPrimitiveType, Integer> ret = new HashMap<>();
             for (OsmPrimitiveType type: OsmPrimitiveType.dataValues()) {
                 if (!getSourceTagsByType(type).isEmpty()) {
@@ -129,5 +129,5 @@
 
         protected Map<OsmPrimitiveType, Integer> getTargetStatistics() {
-            HashMap<OsmPrimitiveType, Integer> ret = new HashMap<>();
+            Map<OsmPrimitiveType, Integer> ret = new HashMap<>();
             for (OsmPrimitiveType type: OsmPrimitiveType.dataValues()) {
                 int count = OsmPrimitive.getFilteredList(target, type.getOsmClass()).size();
Index: trunk/src/org/openstreetmap/josm/actions/PurgeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PurgeAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/PurgeAction.java	(revision 8338)
@@ -101,5 +101,5 @@
         // Add referrer, unless the object to purge is not new
         // and the parent is a relation
-        HashSet<OsmPrimitive> toPurgeRecursive = new HashSet<>();
+        Set<OsmPrimitive> toPurgeRecursive = new HashSet<>();
         while (!toPurge.isEmpty()) {
 
Index: trunk/src/org/openstreetmap/josm/actions/SelectByInternalPointAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SelectByInternalPointAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/SelectByInternalPointAction.java	(revision 8338)
@@ -6,4 +6,5 @@
 import java.util.Collection;
 import java.util.Collections;
+import java.util.Map;
 import java.util.TreeMap;
 
@@ -39,5 +40,5 @@
         }
         final Node n = new Node(internalPoint);
-        final TreeMap<Double, OsmPrimitive> found = new TreeMap<>();
+        final Map<Double, OsmPrimitive> found = new TreeMap<>();
         for (Way w : ds.getWays()) {
             if (w.isUsable() && w.isClosed() && w.isSelectable()) {
Index: trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java	(revision 8338)
@@ -135,5 +135,5 @@
     public void extend(DataSet data) {
         Collection<OsmPrimitive> currentSelection;
-        LinkedList<OsmPrimitive> selection;
+        Collection<OsmPrimitive> selection;
         boolean selectionChanged = false;
         Way way;
Index: trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 8338)
@@ -14,4 +14,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Set;
 
 import javax.swing.JOptionPane;
@@ -191,5 +192,5 @@
         }
 
-        HashSet<Node> delNodes = new HashSet<>();
+        Set<Node> delNodes = new HashSet<>();
         delNodes.addAll(w.getNodes());
         delNodes.removeAll(newNodes);
Index: trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 8338)
@@ -167,5 +167,5 @@
      */
     private void unglueNode(ActionEvent e) {
-        LinkedList<Command> cmds = new LinkedList<>();
+        List<Command> cmds = new LinkedList<>();
 
         Node c = new Node(selectedNode);
@@ -332,5 +332,5 @@
             }
             Relation newRel = null;
-            HashMap<String, Integer> rolesToReAdd = null; // <role name, index>
+            Map<String, Integer> rolesToReAdd = null; // <role name, index>
             int i = 0;
             for (RelationMember rm : r.getMembers()) {
@@ -361,6 +361,6 @@
      */
     private void unglueWays() {
-        LinkedList<Command> cmds = new LinkedList<>();
-        LinkedList<Node> newNodes = new LinkedList<>();
+        List<Command> cmds = new LinkedList<>();
+        List<Node> newNodes = new LinkedList<>();
 
         if (selectedWay == null) {
@@ -409,5 +409,5 @@
     private boolean unglueSelfCrossingWay() {
         // According to previous check, only one valid way through that node
-        LinkedList<Command> cmds = new LinkedList<>();
+        List<Command> cmds = new LinkedList<>();
         Way way = null;
         for (Way w: OsmPrimitive.getFilteredList(selectedNode.getReferrers(), Way.class))
@@ -416,6 +416,6 @@
             }
         List<Node> oldNodes = way.getNodes();
-        ArrayList<Node> newNodes = new ArrayList<>(oldNodes.size());
-        ArrayList<Node> addNodes = new ArrayList<>();
+        List<Node> newNodes = new ArrayList<>(oldNodes.size());
+        List<Node> addNodes = new ArrayList<>();
         boolean seen = false;
         for (Node n: oldNodes) {
@@ -451,5 +451,5 @@
      */
     private void unglueWays2() {
-        LinkedList<Command> cmds = new LinkedList<>();
+        List<Command> cmds = new LinkedList<>();
         List<Node> allNewNodes = new LinkedList<>();
         Way tmpWay = selectedWay;
Index: trunk/src/org/openstreetmap/josm/actions/UploadAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UploadAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/UploadAction.java	(revision 8338)
@@ -10,4 +10,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
 
 import javax.swing.JOptionPane;
@@ -239,5 +240,5 @@
             @Override
             public void run() {
-                final HashMap<String, String> tags = new HashMap<>(layer.data.getChangeSetTags());
+                final Map<String, String> tags = new HashMap<>(layer.data.getChangeSetTags());
                 if (!tags.containsKey("source")) {
                     tags.put("source", dialog.getLastChangesetSourceFromHistory());
Index: trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 8338)
@@ -69,5 +69,5 @@
 
     protected Set<OsmPrimitive> getDeletedPrimitives(DataSet ds) {
-        HashSet<OsmPrimitive> ret = new HashSet<>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         for (OsmPrimitive p: ds.allPrimitives()) {
             if (p.isDeleted() && !p.isNew() && p.isVisible() && p.isModified()) {
@@ -79,5 +79,5 @@
 
     protected Set<OsmPrimitive> getModifiedPrimitives(Collection<OsmPrimitive> primitives) {
-        HashSet<OsmPrimitive> ret = new HashSet<>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         for (OsmPrimitive p: primitives) {
             if (p.isNewOrUndeleted()) {
@@ -306,5 +306,5 @@
          */
         protected Set<OsmPrimitive> getPrimitivesToCheckForParents() {
-            HashSet<OsmPrimitive> ret = new HashSet<>();
+            Set<OsmPrimitive> ret = new HashSet<>();
             for (OsmPrimitive p: toUpload) {
                 if (p.isDeleted() && !p.isNewOrUndeleted()) {
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java	(revision 8338)
@@ -126,5 +126,5 @@
      */
     protected Set<OsmPrimitive> getCompletePrimitives(DataSet ds) {
-        HashSet<OsmPrimitive> ret = new HashSet<>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         for (OsmPrimitive primitive : ds.allPrimitives()) {
             if (!primitive.isIncomplete() && !primitive.isNew()) {
@@ -216,5 +216,5 @@
      */
     public Set<OsmPrimitive> getDownloadedPrimitives() {
-        HashSet<OsmPrimitive> ret = new HashSet<>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         for (DownloadTask task : tasks) {
             if (task instanceof DownloadOsmTask) {
@@ -253,5 +253,5 @@
                 }
             }
-            LinkedHashSet<Object> errors = new LinkedHashSet<>();
+            Set<Object> errors = new LinkedHashSet<>();
             for (DownloadTask dt : tasks) {
                 errors.addAll(dt.getErrorObjects());
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 8338)
@@ -8,4 +8,5 @@
 import java.util.LinkedHashSet;
 import java.util.List;
+import java.util.Set;
 import java.util.concurrent.Future;
 
@@ -77,5 +78,5 @@
         // make sure errors are reported only once
         //
-        LinkedHashSet<Object> errors = new LinkedHashSet<>();
+        Set<Object> errors = new LinkedHashSet<>();
         errors.addAll(task.getErrorObjects());
         if (errors.isEmpty())
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 8338)
@@ -950,5 +950,5 @@
 
     private static void pruneSuccsAndReverse(List<Integer> is) {
-        HashSet<Integer> is2 = new HashSet<>();
+        Set<Integer> is2 = new HashSet<>();
         for (int i : is) {
             if (!is2.contains(i - 1) && !is2.contains(i + 1)) {
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 8338)
@@ -101,5 +101,5 @@
      * Collection of nodes that is moved
      */
-    private ArrayList<Node> movingNodeList;
+    private List<Node> movingNodeList;
 
     /**
@@ -626,5 +626,5 @@
         boolean segmentAngleZero = prevNode != null && Math.abs(Geometry.getCornerAngle(prevNode.getEastNorth(), initialN1en, newN1en)) < 1e-5;
         boolean hasOtherWays = hasNodeOtherWays(selectedSegment.getFirstNode(), selectedSegment.way);
-        ArrayList<Node> changedNodes = new ArrayList<>();
+        List<Node> changedNodes = new ArrayList<>();
         if (nodeOverlapsSegment && !alwaysCreateNodes && !hasOtherWays) {
             //move existing node
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java	(revision 8338)
@@ -8,4 +8,5 @@
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
@@ -40,5 +41,5 @@
         // Make a deep copy of the ways, keeping the copied ways connected
         // TODO: This assumes the first/last nodes of the ways are the only possible shared nodes.
-        HashMap<Node, Node> splitNodeMap = new HashMap<>(sourceWays.size());
+        Map<Node, Node> splitNodeMap = new HashMap<>(sourceWays.size());
         for (Way w : sourceWays) {
             if (!splitNodeMap.containsKey(w.firstNode())) {
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 8338)
@@ -248,5 +248,5 @@
         determineMapMode(!c.isEmpty());
 
-        HashSet<OsmPrimitive> newHighlights = new HashSet<>();
+        Set<OsmPrimitive> newHighlights = new HashSet<>();
 
         virtualManager.clear();
Index: trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java	(revision 8338)
@@ -6,4 +6,5 @@
 import java.awt.event.ActionEvent;
 import java.util.HashSet;
+import java.util.Set;
 
 import org.openstreetmap.josm.Main;
@@ -17,5 +18,5 @@
  */
 public class SelectMembersAction extends AbstractRelationAction {
-    
+
     private final boolean add;
 
@@ -35,6 +36,6 @@
     public void actionPerformed(ActionEvent e) {
         if (!isEnabled() || relations.isEmpty() || !Main.isDisplayingMapView()) return;
-        
-        HashSet<OsmPrimitive> members = new HashSet<>();
+
+        Set<OsmPrimitive> members = new HashSet<>();
         for (Relation r: relations) {
             members.addAll(r.getMemberPrimitives());
Index: trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 8338)
@@ -23,4 +23,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import javax.swing.ButtonGroup;
@@ -109,5 +110,5 @@
             searchHistory.removeLast();
         }
-        LinkedHashSet<String> savedHistory = new LinkedHashSet<>(searchHistory.size());
+        Set<String> savedHistory = new LinkedHashSet<>(searchHistory.size());
         for (SearchSetting item: searchHistory) {
             savedHistory.add(item.writeToString());
Index: trunk/src/org/openstreetmap/josm/actions/upload/DiscardTagsHook.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/upload/DiscardTagsHook.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/upload/DiscardTagsHook.java	(revision 8338)
@@ -4,9 +4,9 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.util.AbstractMap;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 
 import org.openstreetmap.josm.Main;
@@ -37,5 +37,5 @@
 
         if (needsChange) {
-            AbstractMap<String, String> map = new HashMap<>();
+            Map<String, String> map = new HashMap<>();
             for (String key : discardableKeys) {
                 map.put(key, null);
Index: trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java	(revision 8338)
@@ -190,5 +190,5 @@
 
         for (OsmPrimitive osm : objectsToUpload) {
-            HashMap<String, String> keys = new HashMap<>(osm.getKeys());
+            Map<String, String> keys = new HashMap<>(osm.getKeys());
             if(!keys.isEmpty()) {
                 boolean modified = false;
Index: trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 8338)
@@ -6,5 +6,4 @@
 import static org.openstreetmap.josm.tools.I18n.trn;
 
-import java.util.AbstractMap;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -40,5 +39,5 @@
      * those objects that do not have the key yet.
      */
-    private final AbstractMap<String, String> tags;
+    private final Map<String, String> tags;
 
     /**
@@ -48,5 +47,5 @@
      * @param tags the tags to set
      */
-    public ChangePropertyCommand(Collection<? extends OsmPrimitive> objects, AbstractMap<String, String> tags) {
+    public ChangePropertyCommand(Collection<? extends OsmPrimitive> objects, Map<String, String> tags) {
         this.objects = new LinkedList<>();
         this.tags = tags;
Index: trunk/src/org/openstreetmap/josm/command/PurgeCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/PurgeCommand.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/command/PurgeCommand.java	(revision 8338)
@@ -201,5 +201,5 @@
         List<Relation> outR = new ArrayList<>(inR.size());
 
-        HashMap<Relation, Integer> numChilds = new HashMap<>();
+        Map<Relation, Integer> numChilds = new HashMap<>();
 
         // calculate initial number of childs
Index: trunk/src/org/openstreetmap/josm/data/APIDataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/APIDataSet.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/APIDataSet.java	(revision 8338)
@@ -185,5 +185,5 @@
      */
     public List<OsmPrimitive> getPrimitives() {
-        LinkedList<OsmPrimitive> ret = new LinkedList<>();
+        List<OsmPrimitive> ret = new LinkedList<>();
         ret.addAll(toAdd);
         ret.addAll(toUpdate);
@@ -218,5 +218,5 @@
      */
     public void adjustRelationUploadOrder() throws CyclicUploadDependencyException{
-        LinkedList<OsmPrimitive> newToAdd = new LinkedList<>();
+        List<OsmPrimitive> newToAdd = new LinkedList<>();
         newToAdd.addAll(Utils.filteredCollection(toAdd, Node.class));
         newToAdd.addAll(Utils.filteredCollection(toAdd, Way.class));
@@ -231,5 +231,5 @@
         toAdd = newToAdd;
 
-        LinkedList<OsmPrimitive> newToDelete = new LinkedList<>();
+        List<OsmPrimitive> newToDelete = new LinkedList<>();
         graph = new RelationUploadDependencyGraph(Utils.filteredCollection(toDelete, Relation.class), false);
         newToDelete.addAll(graph.computeUploadOrder());
Index: trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 8338)
@@ -21,4 +21,5 @@
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
@@ -202,5 +203,5 @@
      */
     public static void exportPreferencesKeysToFile(String filename, boolean append, String... keys) {
-        HashSet<String> keySet = new HashSet<>();
+        Set<String> keySet = new HashSet<>();
         Collections.addAll(keySet, keys);
         exportPreferencesKeysToFile(filename, append, keySet);
Index: trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java	(revision 8338)
@@ -320,5 +320,5 @@
      */
     public Set<OsmPrimitive> getMyConflictParties() {
-        HashSet<OsmPrimitive> ret = new HashSet<>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         for (Conflict<?> c: conflicts) {
             ret.add(c.getMy());
@@ -326,4 +326,5 @@
         return ret;
     }
+
     /**
      * Replies the set of  {@link OsmPrimitive} which participate in the role
@@ -334,5 +335,5 @@
      */
     public Set<OsmPrimitive> getTheirConflictParties() {
-        HashSet<OsmPrimitive> ret = new HashSet<>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         for (Conflict<?> c: conflicts) {
             ret.add(c.getTheir());
Index: trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java	(revision 8338)
@@ -86,5 +86,5 @@
 
     public static void saveBookmarks() {
-        LinkedList<Collection<String>> coll = new LinkedList<>();
+        List<Collection<String>> coll = new LinkedList<>();
         for (OffsetBookmark b : allBookmarks) {
             coll.add(b.getInfoArray());
Index: trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java	(revision 8338)
@@ -48,6 +48,5 @@
     private final Map<Integer, Changeset> cache = new HashMap<>();
 
-    private final CopyOnWriteArrayList<ChangesetCacheListener> listeners =
-        new CopyOnWriteArrayList<>();
+    private final CopyOnWriteArrayList<ChangesetCacheListener> listeners = new CopyOnWriteArrayList<>();
 
     private ChangesetCache() {
Index: trunk/src/org/openstreetmap/josm/data/osm/ChangesetDataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/ChangesetDataSet.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/ChangesetDataSet.java	(revision 8338)
@@ -116,5 +116,5 @@
     public Set<HistoryOsmPrimitive> getPrimitivesByModificationType(ChangesetModificationType cmt) {
         CheckParameterUtil.ensureParameterNotNull(cmt,"cmt");
-        HashSet<HistoryOsmPrimitive> ret = new HashSet<>();
+        Set<HistoryOsmPrimitive> ret = new HashSet<>();
         for (Entry<PrimitiveId, ChangesetModificationType> entry: modificationTypes.entrySet()) {
             if (entry.getValue().equals(cmt)) {
Index: trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 8338)
@@ -729,5 +729,5 @@
         boolean changed;
         synchronized (selectionLock) {
-            LinkedHashSet<OsmPrimitive> oldSelection = new LinkedHashSet<>(selectedPrimitives);
+            Set<OsmPrimitive> oldSelection = new LinkedHashSet<>(selectedPrimitives);
             selectedPrimitives = new LinkedHashSet<>();
             addSelected(selection, false);
@@ -878,5 +878,5 @@
         try {
             DataSet ds = new DataSet();
-            HashMap<OsmPrimitive, OsmPrimitive> primMap = new HashMap<>();
+            Map<OsmPrimitive, OsmPrimitive> primMap = new HashMap<>();
             for (Node n : nodes) {
                 Node newNode = new Node(n);
Index: trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 8338)
@@ -264,5 +264,5 @@
         if (target == null)
             throw new IllegalStateException(tr("Missing merge target for relation with id {0}", source.getUniqueId()));
-        LinkedList<RelationMember> newMembers = new LinkedList<>();
+        List<RelationMember> newMembers = new LinkedList<>();
         for (RelationMember sourceMember : source.getMembers()) {
             OsmPrimitive targetMember = getMergeTarget(sourceMember.getMember());
Index: trunk/src/org/openstreetmap/josm/data/osm/NoteData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/NoteData.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/NoteData.java	(revision 8338)
@@ -7,4 +7,5 @@
 import java.util.Comparator;
 import java.util.Date;
+import java.util.List;
 import java.util.Map;
 
@@ -113,5 +114,5 @@
      */
     public Collection<Note> getSortedNotes() {
-        final ArrayList<Note> list = new ArrayList<>(noteList);
+        final List<Note> list = new ArrayList<>(noteList);
         Collections.sort(list, comparator);
         return list;
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 8338)
@@ -161,5 +161,5 @@
      */
     public static Set<OsmPrimitive> getReferrer(Collection<? extends OsmPrimitive> primitives) {
-        HashSet<OsmPrimitive> ret = new HashSet<>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         if (primitives == null || primitives.isEmpty()) return ret;
         for (OsmPrimitive p: primitives) {
@@ -173,5 +173,6 @@
      */
     public static final Predicate<OsmPrimitive> isUsablePredicate = new Predicate<OsmPrimitive>() {
-        @Override public boolean evaluate(OsmPrimitive primitive) {
+        @Override
+        public boolean evaluate(OsmPrimitive primitive) {
             return primitive.isUsable();
         }
@@ -179,5 +180,6 @@
 
     public static final Predicate<OsmPrimitive> isSelectablePredicate = new Predicate<OsmPrimitive>() {
-        @Override public boolean evaluate(OsmPrimitive primitive) {
+        @Override
+        public boolean evaluate(OsmPrimitive primitive) {
             return primitive.isSelectable();
         }
@@ -665,5 +667,5 @@
     public static Collection<String> getUninterestingKeys() {
         if (uninteresting == null) {
-            LinkedList<String> l = new LinkedList<>(Arrays.asList(
+            List<String> l = new LinkedList<>(Arrays.asList(
                 "source", "source_ref", "source:", "comment",
                 "converted_by", "watch", "watch:",
@@ -1364,5 +1366,5 @@
      */
     public static Set<Relation> getParentRelations(Collection<? extends OsmPrimitive> primitives) {
-        HashSet<Relation> ret = new HashSet<>();
+        Set<Relation> ret = new HashSet<>();
         for (OsmPrimitive w : primitives) {
             ret.addAll(OsmPrimitive.getFilteredList(w.getReferrers(), Relation.class));
Index: trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 8338)
@@ -477,6 +477,6 @@
     }
 
-    public ArrayList<T> toArrayList() {
-        ArrayList<T> a = new ArrayList<>();
+    public List<T> toList() {
+        List<T> a = new ArrayList<>();
         for (T n : this) {
             a.add(n);
@@ -487,10 +487,10 @@
     @Override
     public Object[] toArray() {
-        return this.toArrayList().toArray();
+        return this.toList().toArray();
     }
 
     @Override
     public <A> A[] toArray(A[] template) {
-        return this.toArrayList().toArray(template);
+        return this.toList().toArray(template);
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/Relation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Relation.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/Relation.java	(revision 8338)
@@ -388,5 +388,5 @@
      */
     public Set<OsmPrimitive> getMemberPrimitives() {
-        HashSet<OsmPrimitive> ret = new HashSet<>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         RelationMember[] members = this.members;
         for (RelationMember m: members) {
Index: trunk/src/org/openstreetmap/josm/data/osm/SimplePrimitiveId.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/SimplePrimitiveId.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/SimplePrimitiveId.java	(revision 8338)
@@ -97,5 +97,5 @@
      */
     public static List<SimplePrimitiveId> fuzzyParse(String s) {
-        final ArrayList<SimplePrimitiveId> ids = new ArrayList<>();
+        final List<SimplePrimitiveId> ids = new ArrayList<>();
         final Matcher m = ID_PATTERN.matcher(s);
         while (m.find()) {
Index: trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 8338)
@@ -499,5 +499,5 @@
      */
     public Set<String> getKeys() {
-        HashSet<String> ret = new HashSet<>();
+        Set<String> ret = new HashSet<>();
         for (Tag tag: tags) {
             ret.add(tag.getKey());
@@ -512,5 +512,5 @@
      */
     public Set<String> getKeysWithMultipleValues() {
-        HashMap<String, Integer> counters = new HashMap<>();
+        Map<String, Integer> counters = new HashMap<>();
         for (Tag tag: tags) {
             Integer v = counters.get(tag.getKey());
@@ -557,5 +557,5 @@
      */
     public Set<String> getValues() {
-        HashSet<String> ret = new HashSet<>();
+        Set<String> ret = new HashSet<>();
         for (Tag tag: tags) {
             ret.add(tag.getValue());
@@ -573,5 +573,5 @@
      */
     public Set<String> getValues(String key) {
-        HashSet<String> ret = new HashSet<>();
+        Set<String> ret = new HashSet<>();
         if (key == null) return ret;
         for (Tag tag: tags) {
Index: trunk/src/org/openstreetmap/josm/data/osm/TigerUtils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/TigerUtils.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/TigerUtils.java	(revision 8338)
@@ -46,5 +46,5 @@
 
     public static String combineTags(String name, Set<String> values) {
-        TreeSet<Object> resultSet = new TreeSet<>();
+        Set<Object> resultSet = new TreeSet<>();
         for (String value: values) {
             String[] parts = value.split(":");
Index: trunk/src/org/openstreetmap/josm/data/osm/Way.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Way.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/Way.java	(revision 8338)
@@ -168,5 +168,5 @@
      */
     public Set<Node> getNeighbours(Node node) {
-        HashSet<Node> neigh = new HashSet<>();
+        Set<Node> neigh = new HashSet<>();
 
         if (node == null) return neigh;
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java	(revision 8338)
@@ -9,4 +9,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.CopyOnWriteArrayList;
 
@@ -187,5 +188,5 @@
 
     public Collection<Long> getChangesetIds() {
-        final HashSet<Long> ids = new HashSet<>();
+        final Set<Long> ids = new HashSet<>();
         for (Collection<HistoryOsmPrimitive> i : data.values()) {
             for (HistoryOsmPrimitive j : i) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 8338)
@@ -386,5 +386,5 @@
         if (!isFixable(testError)) return null;
         Collection<OsmPrimitive> sel = new LinkedList<>(testError.getPrimitives());
-        LinkedHashSet<Node> nodes = new LinkedHashSet<>(OsmPrimitive.getFilteredList(sel, Node.class));
+        Set<Node> nodes = new LinkedHashSet<>(OsmPrimitive.getFilteredList(sel, Node.class));
 
         // Filter nodes that have already been deleted (see #5764 and #5773)
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 8338)
@@ -229,5 +229,5 @@
         if (testError.getCode() == SAME_RELATION) return null;
         Collection<? extends OsmPrimitive> sel = testError.getPrimitives();
-        HashSet<Relation> relFix = new HashSet<>();
+        Set<Relation> relFix = new HashSet<>();
 
         for (OsmPrimitive osm : sel)
@@ -292,5 +292,5 @@
         // We fix it only if there is no more than one relation that is relation member.
         Collection<? extends OsmPrimitive> sel = testError.getPrimitives();
-        HashSet<Relation> relations = new HashSet<>();
+        Set<Relation> relations = new HashSet<>();
 
         for (OsmPrimitive osm : sel)
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java	(revision 8338)
@@ -237,5 +237,5 @@
     public Command fixError(TestError testError) {
         Collection<? extends OsmPrimitive> sel = testError.getPrimitives();
-        HashSet<Way> ways = new HashSet<>();
+        Set<Way> ways = new HashSet<>();
 
         for (OsmPrimitive osm : sel) {
@@ -305,5 +305,5 @@
         // We fix it only if there is no more than one way that is relation member.
         Collection<? extends OsmPrimitive> sel = testError.getPrimitives();
-        HashSet<Way> ways = new HashSet<>();
+        Set<Way> ways = new HashSet<>();
 
         for (OsmPrimitive osm : sel) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java	(revision 8338)
@@ -12,4 +12,5 @@
 import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
 
 import org.openstreetmap.josm.command.ChangePropertyCommand;
@@ -152,5 +153,5 @@
         }
 
-        final HashSet<OsmPrimitive> referrers = new HashSet<>();
+        final Set<OsmPrimitive> referrers = new HashSet<>();
 
         if (way.isClosed()) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java	(revision 8338)
@@ -6,4 +6,5 @@
 import java.util.HashSet;
 import java.util.Map.Entry;
+import java.util.Set;
 import java.util.regex.Pattern;
 
@@ -60,5 +61,5 @@
     @Override
     public void check(OsmPrimitive p) {
-        HashSet<String> names = new HashSet<>();
+        Set<String> names = new HashSet<>();
 
         for (Entry<String, String> entry : p.getKeys().entrySet()) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 8338)
@@ -10,4 +10,5 @@
 import java.util.HashMap;
 import java.util.LinkedList;
+import java.util.List;
 import java.util.Map;
 
@@ -84,9 +85,9 @@
 
     private static class RolePreset {
-        public RolePreset(LinkedList<Role> roles, String name) {
+        public RolePreset(List<Role> roles, String name) {
             this.roles = roles;
             this.name = name;
         }
-        private final LinkedList<Role> roles;
+        private final List<Role> roles;
         private final String name;
     }
@@ -151,5 +152,5 @@
                 for(Role role: r.roles) {
                     String key = role.key;
-                    LinkedList<Role> roleGroup = null;
+                    List<Role> roleGroup = null;
                     if (allroles.containsKey(key)) {
                         roleGroup = allroles.get(key).roles;
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWay.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWay.java	(revision 8338)
@@ -6,4 +6,5 @@
 import java.util.Arrays;
 import java.util.HashSet;
+import java.util.Set;
 
 import org.openstreetmap.josm.data.osm.Node;
@@ -29,6 +30,7 @@
     }
 
-    @Override public void visit(Way w) {
-        HashSet<Node> nodes = new HashSet<>();
+    @Override
+    public void visit(Way w) {
+        Set<Node> nodes = new HashSet<>();
 
         for (int i = 1; i < w.getNodesCount() - 1; i++) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java	(revision 8338)
@@ -40,5 +40,5 @@
     private MultiMap<Way, Way> errorWays;
 
-    private ArrayList<NormalizeRule> rules = new ArrayList<NormalizeRule>();
+    private List<NormalizeRule> rules = new ArrayList<NormalizeRule>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 8338)
@@ -684,5 +684,5 @@
     private Map<Double, List<Node>> getNearestNodesImpl(Point p,
             Predicate<OsmPrimitive> predicate) {
-        TreeMap<Double, List<Node>> nearestMap = new TreeMap<>();
+        Map<Double, List<Node>> nearestMap = new TreeMap<>();
         DataSet ds = getCurrentDataSet();
 
Index: trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java	(revision 8338)
@@ -229,5 +229,5 @@
 
         public Set<OsmPrimitive> getObjectsToDelete() {
-            HashSet<OsmPrimitive> ret = new HashSet<>();
+            Set<OsmPrimitive> ret = new HashSet<>();
             for (RelationToChildReference ref: data) {
                 ret.add(ref.getChild());
@@ -241,5 +241,5 @@
 
         public Set<OsmPrimitive> getParentRelations() {
-            HashSet<OsmPrimitive> ret = new HashSet<>();
+            Set<OsmPrimitive> ret = new HashSet<>();
             for (RelationToChildReference ref: data) {
                 ret.add(ref.getParent());
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java	(revision 8338)
@@ -731,5 +731,5 @@
         private final transient List<T> entries;
 
-        public EntriesSelectionModel(ArrayList<T> nodes) {
+        public EntriesSelectionModel(List<T> nodes) {
             this.entries = nodes;
         }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 8338)
@@ -253,5 +253,5 @@
 
     protected List<Command> buildTagChangeCommand(OsmPrimitive primitive, TagCollection tc) {
-        LinkedList<Command> cmds = new LinkedList<>();
+        List<Command> cmds = new LinkedList<>();
         for (String key : tc.getKeys()) {
             if (tc.hasUniqueEmptyValue(key)) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 8338)
@@ -287,5 +287,5 @@
 
         protected Map<User, Integer> computeStatistics(Collection<? extends OsmPrimitive> primitives) {
-            HashMap<User, Integer> ret = new HashMap<>();
+            Map<User, Integer> ret = new HashMap<>();
             if (primitives == null || primitives.isEmpty()) return ret;
             for (OsmPrimitive primitive: primitives) {
@@ -354,5 +354,5 @@
 
         public List<User> getSelectedUsers(int[] rows) {
-            LinkedList<User> ret = new LinkedList<>();
+            List<User> ret = new LinkedList<>();
             if (rows == null || rows.length == 0) return ret;
             for (int row: rows) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java	(revision 8338)
@@ -190,5 +190,5 @@
         Set<DefaultMutableTreeNode> processedNodes = new HashSet<>();
 
-        LinkedList<TestError> errorsToFix = new LinkedList<>();
+        List<TestError> errorsToFix = new LinkedList<>();
         for (TreePath path : selectionPaths) {
             DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
@@ -548,6 +548,5 @@
             tree.setFilter(null);
         }
-        HashSet<OsmPrimitive> filter = new HashSet<>(newSelection);
-        tree.setFilter(filter);
+        tree.setFilter(new HashSet<>(newSelection));
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetHeaderDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetHeaderDownloadTask.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetHeaderDownloadTask.java	(revision 8338)
@@ -65,5 +65,5 @@
         }
 
-        HashSet<Integer> ids = new HashSet<>();
+        Set<Integer> ids = new HashSet<>();
         for (Changeset cs: changesets) {
             if (cs == null || cs.isNew()) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 8338)
@@ -608,5 +608,5 @@
         final Map<String, String> tags = new HashMap<>();
         valueCount.clear();
-        EnumSet<TaggingPresetType> types = EnumSet.noneOf(TaggingPresetType.class);
+        Set<TaggingPresetType> types = EnumSet.noneOf(TaggingPresetType.class);
         for (OsmPrimitive osm : newSel) {
             types.add(TaggingPresetType.forPrimitive(osm));
@@ -619,5 +619,5 @@
                         v.put(value, v.containsKey(value) ? v.get(value) + 1 : 1);
                     } else {
-                        TreeMap<String, Integer> v = new TreeMap<>();
+                        Map<String, Integer> v = new TreeMap<>();
                         v.put(value, 1);
                         valueCount.put(key, v);
@@ -753,5 +753,5 @@
         int row = tagTable.getSelectedRow();
         if (row == -1) return null;
-        TreeMap<String, Integer> map = (TreeMap<String, Integer>) tagData.getValueAt(row, 1);
+        Map<String, Integer> map = (TreeMap<String, Integer>) tagData.getValueAt(row, 1);
         return new Tag(
                 tagData.getValueAt(row, 0).toString(),
@@ -905,5 +905,5 @@
         protected void deleteTags(int[] rows){
             // convert list of rows to HashMap (and find gap for nextKey)
-            HashMap<String, String> tags = new HashMap<>(rows.length);
+            Map<String, String> tags = new HashMap<>(rows.length);
             int nextKeyIndex = rows[0];
             for (int row : rows) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 8338)
@@ -258,5 +258,5 @@
             if (selection == null || selection.length == 0)
                 return;
-            HashSet<Relation> relations = new HashSet<>();
+            Set<Relation> relations = new HashSet<>();
             for (TreePath aSelection : selection) {
                 relations.add((Relation) aSelection.getLastPathComponent());
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 8338)
@@ -514,5 +514,5 @@
      */
     public Set<OsmPrimitive> getChildPrimitives(Collection<? extends OsmPrimitive> referenceSet) {
-        HashSet<OsmPrimitive> ret = new HashSet<>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         if (referenceSet == null) return null;
         for (RelationMember m: members) {
@@ -606,5 +606,5 @@
         if (primitives == null || primitives.isEmpty())
             return false;
-        HashSet<OsmPrimitive> referrers = new HashSet<>();
+        Set<OsmPrimitive> referrers = new HashSet<>();
         for (RelationMember member : members) {
             referrers.add(member.getMember());
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java	(revision 8338)
@@ -233,5 +233,5 @@
     private Integer popBackwardOnewayPart(int way){
         if (lastOnewayNode != null) {
-            TreeSet<Node> nodes = new TreeSet<>();
+            Set<Node> nodes = new TreeSet<>();
             if (onewayReverseMap.ways.containsKey(way)) {
                 nodes.addAll(onewayReverseMap.ways.get(way));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorter.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorter.java	(revision 8338)
@@ -175,5 +175,5 @@
         }
 
-        for (LinkedList<Integer> tmpGroup : allGroups) {
+        for (List<Integer> tmpGroup : allGroups) {
             for (Integer p : tmpGroup) {
                 newMembers.add(defaultMembers.get(p));
Index: trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 8338)
@@ -158,5 +158,5 @@
         Collection<Collection<String>> args = Main.pref.getArray("bookmarks", null);
         if(args != null) {
-            LinkedList<Bookmark> bookmarks = new LinkedList<>();
+            List<Bookmark> bookmarks = new LinkedList<>();
             for(Collection<String> entry : args) {
                 try {
@@ -178,5 +178,5 @@
      */
     public final void save() {
-        LinkedList<Collection<String>> coll = new LinkedList<>();
+        List<Collection<String>> coll = new LinkedList<>();
         for (Object o : ((DefaultListModel<Bookmark>)getModel()).toArray()) {
             String[] array = new String[5];
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 8338)
@@ -10,4 +10,5 @@
 import java.util.List;
 import java.util.Observable;
+import java.util.Set;
 
 import javax.swing.JTable;
@@ -535,5 +536,5 @@
 
         protected void initKeyList() {
-            HashSet<String> keySet = new HashSet<>();
+            Set<String> keySet = new HashSet<>();
             if (current != null) {
                 keySet.addAll(current.getTags().keySet());
Index: trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java	(revision 8338)
@@ -190,5 +190,5 @@
                 return null;
         }
-        ArrayList<PrimitiveId> downloaded = new ArrayList<>(ids);
+        List<PrimitiveId> downloaded = new ArrayList<>(ids);
         downloaded.removeAll(mainTask.getMissingPrimitives());
         return downloaded;
Index: trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 8338)
@@ -27,4 +27,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.Callable;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -548,5 +549,5 @@
         GpxData gpxData = new GpxData();
         gpxData.storageFile = file;
-        HashSet<Node> doneNodes = new HashSet<>();
+        Set<Node> doneNodes = new HashSet<>();
         waysToGpxData(data.getWays(), gpxData, doneNodes);
         nodesToGpxData(data.getNodes(), gpxData, doneNodes);
@@ -554,5 +555,5 @@
     }
 
-    private static void waysToGpxData(Collection<Way> ways, GpxData gpxData, HashSet<Node> doneNodes) {
+    private static void waysToGpxData(Collection<Way> ways, GpxData gpxData, Set<Node> doneNodes) {
         for (Way w : ways) {
             if (!w.isUsable()) {
@@ -632,5 +633,5 @@
     }
 
-    private static void nodesToGpxData(Collection<Node> nodes, GpxData gpxData, HashSet<Node> doneNodes) {
+    private static void nodesToGpxData(Collection<Node> nodes, GpxData gpxData, Set<Node> doneNodes) {
         List<Node> sortedNodes = new ArrayList<>(nodes);
         sortedNodes.removeAll(doneNodes);
@@ -645,5 +646,5 @@
 
     private static void addIntegerIfPresent(WayPoint wpt, OsmPrimitive p, String gpxKey, String ... osmKeys) {
-        ArrayList<String> possibleKeys = new ArrayList<>(Arrays.asList(osmKeys));
+        List<String> possibleKeys = new ArrayList<>(Arrays.asList(osmKeys));
         possibleKeys.add(0, gpxKey);
         for (String key : possibleKeys) {
@@ -668,5 +669,5 @@
 
     private static void addDoubleIfPresent(WayPoint wpt, OsmPrimitive p, String gpxKey, String ... osmKeys) {
-        ArrayList<String> possibleKeys = new ArrayList<>(Arrays.asList(osmKeys));
+        List<String> possibleKeys = new ArrayList<>(Arrays.asList(osmKeys));
         possibleKeys.add(0, gpxKey);
         for (String key : possibleKeys) {
@@ -690,5 +691,5 @@
 
     private static void addStringIfPresent(WayPoint wpt, OsmPrimitive p, String gpxKey, String ... osmKeys) {
-        ArrayList<String> possibleKeys = new ArrayList<>(Arrays.asList(osmKeys));
+        List<String> possibleKeys = new ArrayList<>(Arrays.asList(osmKeys));
         possibleKeys.add(0, gpxKey);
         for (String key : possibleKeys) {
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java	(revision 8338)
@@ -59,5 +59,5 @@
             File[] sel = fc.getSelectedFiles();
             if (sel != null && sel.length > 0) {
-                LinkedList<File> files = new LinkedList<>();
+                List<File> files = new LinkedList<>();
                 addRecursiveFiles(files, sel);
                 importer.importDataHandleExceptions(files, NullProgressMonitor.INSTANCE);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 8338)
@@ -196,5 +196,5 @@
     public Cascade clone() {
         @SuppressWarnings("unchecked")
-        HashMap<String, Object> clonedProp = (HashMap<String, Object>) ((HashMap) this.prop).clone();
+        Map<String, Object> clonedProp = (Map<String, Object>) ((HashMap) this.prop).clone();
         Cascade c = new Cascade();
         c.prop = clonedProp;
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java	(revision 8338)
@@ -188,5 +188,5 @@
                 nameTags = Collections.emptyList();
             }
-            ArrayList<String> result = new ArrayList<>();
+            List<String> result = new ArrayList<>();
             for(String tag: nameTags) {
                 if (tag == null) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 8338)
@@ -146,7 +146,4 @@
     }
 
-    public static final EnumSet<Op> COMPARISON_OPERATERS =
-        EnumSet.of(Op.GREATER_OR_EQUAL, Op.GREATER, Op.LESS_OR_EQUAL, Op.LESS);
-
     /**
      * Most common case of a KeyValueCondition.
@@ -223,5 +220,5 @@
 
         public final Pattern pattern;
-        public static final EnumSet<Op> SUPPORTED_OPS = EnumSet.of(Op.REGEX, Op.NREGEX);
+        public static final Set<Op> SUPPORTED_OPS = EnumSet.of(Op.REGEX, Op.NREGEX);
 
         public KeyValueRegexpCondition(String k, String v, Op op, boolean considerValAsKey) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 8338)
@@ -185,5 +185,5 @@
              * primitive. This includes all key=* rules.
              */
-            HashMap<String, BitSet> specialRules = new HashMap<>();
+            Map<String, BitSet> specialRules = new HashMap<>();
 
             public void addForKey(int ruleIndex) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 8338)
@@ -186,5 +186,5 @@
     private void get(OsmPrimitive primitive, boolean closed, WayPrototypesRecord p, Double scale, MultiCascade mc) {
         String lineIdx = null;
-        HashMap<String, LinemodPrototype> overlayMap = new HashMap<>();
+        Map<String, LinemodPrototype> overlayMap = new HashMap<>();
         boolean isNotArea = primitive.isKeyFalse("area");
         for (String key : primitive.keySet()) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 8338)
@@ -1071,5 +1071,5 @@
      */
     public void addCustomButton(String definitionText, int preferredIndex, boolean removeIfExists) {
-        LinkedList<String> t = new LinkedList<>(getToolString());
+        List<String> t = new LinkedList<>(getToolString());
         if (t.contains(definitionText)) {
             if (!removeIfExists) return; // do nothing
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java	(revision 8338)
@@ -286,5 +286,5 @@
         pnlPluginUpdatePolicy.rememberInPreferences();
         if (model.isActivePluginsChanged()) {
-            LinkedList<String> l = new LinkedList<>(model.getSelectedPluginNames());
+            List<String> l = new LinkedList<>(model.getSelectedPluginNames());
             Collections.sort(l);
             Main.pref.putCollection("plugins", l);
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java	(revision 8338)
@@ -310,5 +310,5 @@
         if (tags == null)
             return;
-        ArrayList<TagModel> toDelete = new ArrayList<>();
+        List<TagModel> toDelete = new ArrayList<>();
         for (int tagIdx : tagIndices) {
             TagModel tag = tags.get(tagIdx);
@@ -488,5 +488,5 @@
 
         List<String> currentkeys = getKeys();
-        ArrayList<Command> commands = new ArrayList<>();
+        List<Command> commands = new ArrayList<>();
 
         for (OsmPrimitive primitive : primitives) {
@@ -512,5 +512,5 @@
      */
     public List<String> getKeys() {
-        ArrayList<String> keys = new ArrayList<>();
+        List<String> keys = new ArrayList<>();
         for (TagModel tag: tags) {
             if (!tag.getName().trim().isEmpty()) {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 8338)
@@ -20,4 +20,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import javax.swing.AbstractAction;
@@ -85,5 +86,5 @@
      * The types as preparsed collection.
      */
-    public EnumSet<TaggingPresetType> types;
+    public Set<TaggingPresetType> types;
     public transient List<TaggingPresetItem> data = new LinkedList<>();
     public transient Roles roles;
@@ -502,5 +503,5 @@
             super("", ImageProvider.get("dialogs", "pin"));
             putValue(SHORT_DESCRIPTION, tr("Add or remove toolbar button"));
-            LinkedList<String> t = new LinkedList<>(ToolbarPreferences.getToolString());
+            List<String> t = new LinkedList<>(ToolbarPreferences.getToolString());
             toolbarIndex = t.indexOf(getToolbarString());
             putValue(SELECTED_KEY, toolbarIndex >= 0);
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 8338)
@@ -30,4 +30,6 @@
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Set;
+import java.util.SortedSet;
 import java.util.TreeSet;
 
@@ -81,5 +83,5 @@
 
     // cache the parsing of types using a LRU cache (http://java-planet.blogspot.com/2005/08/how-to-set-up-simple-lru-cache-using.html)
-    private static final Map<String,EnumSet<TaggingPresetType>> TYPE_CACHE = new LinkedHashMap<>(16, 1.1f, true);
+    private static final Map<String,Set<TaggingPresetType>> TYPE_CACHE = new LinkedHashMap<>(16, 1.1f, true);
 
     /**
@@ -167,5 +169,5 @@
 
     public static class Role {
-        public EnumSet<TaggingPresetType> types;
+        public Set<TaggingPresetType> types;
         public String key;
         /** The text to display */
@@ -290,5 +292,5 @@
 
     public static class Usage {
-        private TreeSet<String> values;
+        private SortedSet<String> values;
         private boolean hadKeys = false;
         private boolean hadEmpty = false;
@@ -1396,5 +1398,5 @@
             } else {
                 String s = o.toString();
-                TreeSet<String> parts = new TreeSet<>(Arrays.asList(s.split(delimiter)));
+                Set<String> parts = new TreeSet<>(Arrays.asList(s.split(delimiter)));
                 ListModel<PresetListEntry> lm = getModel();
                 int[] intParts = new int[lm.getSize()];
@@ -1429,8 +1431,8 @@
     }
 
-    public static EnumSet<TaggingPresetType> getType(String types) throws SAXException {
+    public static Set<TaggingPresetType> getType(String types) throws SAXException {
         if (TYPE_CACHE.containsKey(types))
             return TYPE_CACHE.get(types);
-        EnumSet<TaggingPresetType> result = EnumSet.noneOf(TaggingPresetType.class);
+        Set<TaggingPresetType> result = EnumSet.noneOf(TaggingPresetType.class);
         for (String type : Arrays.asList(types.split(","))) {
             try {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java	(revision 8338)
@@ -287,5 +287,5 @@
      */
     public static Collection<TaggingPreset> readAll(Collection<String> sources, boolean validate, boolean displayErrMsg) {
-        LinkedList<TaggingPreset> allPresets = new LinkedList<>();
+        List<TaggingPreset> allPresets = new LinkedList<>();
         for(String source : sources)  {
             try {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchPrimitiveDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchPrimitiveDialog.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchPrimitiveDialog.java	(revision 8338)
@@ -7,4 +7,5 @@
 import java.awt.event.KeyEvent;
 import java.util.HashSet;
+import java.util.Set;
 
 import org.openstreetmap.josm.Main;
@@ -62,5 +63,5 @@
             TaggingPreset preset = selector.getSelectedPreset();
             if (preset != null) {
-                final HashSet<OsmPrimitive> matching = new HashSet<>(Utils.filter(Main.main.getCurrentDataSet().allPrimitives(), preset));
+                final Set<OsmPrimitive> matching = new HashSet<>(Utils.filter(Main.main.getCurrentDataSet().allPrimitives(), preset));
                 Main.main.getCurrentDataSet().setSelected(matching);
             }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java	(revision 8338)
@@ -23,4 +23,5 @@
 import java.util.List;
 import java.util.Objects;
+import java.util.Set;
 
 import javax.swing.AbstractAction;
@@ -74,5 +75,5 @@
     private final JCheckBox ckOnlyApplicable;
     private final JCheckBox ckSearchInTags;
-    private final EnumSet<TaggingPresetType> typesInSelection = EnumSet.noneOf(TaggingPresetType.class);
+    private final Set<TaggingPresetType> typesInSelection = EnumSet.noneOf(TaggingPresetType.class);
     private boolean typesInSelectionDirty = true;
     private final transient PresetClassifications classifications = new PresetClassifications();
@@ -356,5 +357,6 @@
         private final List<PresetClassification> classifications = new ArrayList<>();
 
-        public List<PresetClassification> getMatchingPresets(String searchText, boolean onlyApplicable, boolean inTags, EnumSet<TaggingPresetType> presetTypes, final Collection<? extends OsmPrimitive> selectedPrimitives) {
+        public List<PresetClassification> getMatchingPresets(String searchText, boolean onlyApplicable, boolean inTags,
+                Set<TaggingPresetType> presetTypes, final Collection<? extends OsmPrimitive> selectedPrimitives) {
             final String[] groupWords;
             final String[] nameWords;
@@ -371,5 +373,6 @@
         }
 
-        public List<PresetClassification> getMatchingPresets(String[] groupWords, String[] nameWords, boolean onlyApplicable, boolean inTags, EnumSet<TaggingPresetType> presetTypes, final Collection<? extends OsmPrimitive> selectedPrimitives) {
+        public List<PresetClassification> getMatchingPresets(String[] groupWords, String[] nameWords, boolean onlyApplicable,
+                boolean inTags, Set<TaggingPresetType> presetTypes, final Collection<? extends OsmPrimitive> selectedPrimitives) {
 
             final List<PresetClassification> result = new ArrayList<>();
@@ -451,5 +454,5 @@
     }
 
-    private EnumSet<TaggingPresetType> getTypesInSelection() {
+    private Set<TaggingPresetType> getTypesInSelection() {
         if (typesInSelectionDirty) {
             synchronized (typesInSelection) {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresets.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresets.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresets.java	(revision 8338)
@@ -5,4 +5,5 @@
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.Map;
 
 import javax.swing.JMenu;
@@ -51,5 +52,5 @@
         } else {
             AutoCompletionManager.cachePresets(taggingPresets);
-            HashMap<TaggingPresetMenu,JMenu> submenus = new HashMap<>();
+            Map<TaggingPresetMenu,JMenu> submenus = new HashMap<>();
             for (final TaggingPreset p : taggingPresets) {
                 JMenu m = p.group != null ? submenus.get(p.group) : Main.main.menu.presetsMenu;
Index: trunk/src/org/openstreetmap/josm/gui/util/AdvancedKeyPressDetector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/AdvancedKeyPressDetector.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/gui/util/AdvancedKeyPressDetector.java	(revision 8338)
@@ -13,4 +13,5 @@
 import java.awt.event.KeyEvent;
 import java.util.ArrayList;
+import java.util.List;
 import java.util.Set;
 import java.util.TreeSet;
@@ -35,6 +36,6 @@
     private Timer timer;
 
-    private final ArrayList<KeyPressReleaseListener> keyListeners = new ArrayList<>();
-    private final ArrayList<ModifierListener> modifierListeners = new ArrayList<>();
+    private final List<KeyPressReleaseListener> keyListeners = new ArrayList<>();
+    private final List<ModifierListener> modifierListeners = new ArrayList<>();
     private int previousModifiers;
 
Index: trunk/src/org/openstreetmap/josm/io/CacheFiles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CacheFiles.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/io/CacheFiles.java	(revision 8338)
@@ -10,4 +10,5 @@
 import java.util.Iterator;
 import java.util.Set;
+import java.util.SortedMap;
 import java.util.TreeMap;
 
@@ -245,5 +246,5 @@
         if(!this.enabled || maxsize == -1) return;
 
-        TreeMap<Long, File> modtime = new TreeMap<>();
+        SortedMap<Long, File> modtime = new TreeMap<>();
         long dirsize = 0;
 
Index: trunk/src/org/openstreetmap/josm/io/Capabilities.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 8338)
@@ -51,5 +51,5 @@
 public class Capabilities {
 
-    private final Map<String, HashMap<String,String>> capabilities;
+    private final Map<String, Map<String,String>> capabilities;
     private final List<String> imageryBlacklist;
 
@@ -71,5 +71,5 @@
     public boolean isDefined(String element, String attribute) {
         if (! capabilities.containsKey(element)) return false;
-        HashMap<String, String> e = capabilities.get(element);
+        Map<String, String> e = capabilities.get(element);
         if (e == null) return false;
         return (e.get(attribute) != null);
@@ -85,5 +85,5 @@
     public String get(String element, String attribute) {
         if (! capabilities.containsKey(element)) return null;
-        HashMap<String, String> e = capabilities.get(element);
+        Map<String, String> e = capabilities.get(element);
         if (e == null) return null;
         return e.get(attribute);
@@ -132,8 +132,8 @@
         } else {
             if (! capabilities.containsKey(element))  {
-                HashMap<String,String> h = new HashMap<>();
+                Map<String,String> h = new HashMap<>();
                 capabilities.put(element, h);
             }
-            HashMap<String, String> e = capabilities.get(element);
+            Map<String, String> e = capabilities.get(element);
             e.put(attribute, value);
         }
Index: trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 8338)
@@ -239,5 +239,5 @@
      */
     protected Set<Long> extractIdPackage(Set<Long> ids) {
-        HashSet<Long> pkg = new HashSet<>();
+        Set<Long> pkg = new HashSet<>();
         if (ids.isEmpty())
             return pkg;
Index: trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 8338)
@@ -233,5 +233,5 @@
         ImageryInfo i = new ImageryInfo(name, buildGetMapUrl(selectedLayers));
         if (selectedLayers != null) {
-            HashSet<String> proj = new HashSet<>();
+            Set<String> proj = new HashSet<>();
             for (WMSImagery.LayerDetails l : selectedLayers) {
                 proj.addAll(l.getProjections());
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 8338)
@@ -13,4 +13,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import javax.swing.JLabel;
@@ -228,5 +229,5 @@
             }
         }
-        HashSet<String> knownParams = new HashSet<>();
+        Set<String> knownParams = new HashSet<>();
         if (mandatory != null) Collections.addAll(knownParams, mandatory);
         if (optional != null) Collections.addAll(knownParams, optional);
@@ -316,5 +317,5 @@
         @Override
         protected void parseArgs() {
-            HashMap<String, String> args = new HashMap<>();
+            Map<String, String> args = new HashMap<>();
             if (request.indexOf('?') != -1) {
                 String query = request.substring(request.indexOf('?') + 1);
Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8338)
@@ -745,5 +745,5 @@
                 return null;
             }
-            HashMap<String, PluginInformation> ret = new HashMap<>();
+            Map<String, PluginInformation> ret = new HashMap<>();
             for (PluginInformation pi: task.getAvailablePlugins()) {
                 ret.put(pi.name, pi);
@@ -1319,5 +1319,5 @@
     public static String getBugReportText() {
         StringBuilder text = new StringBuilder();
-        LinkedList <String> pl = new LinkedList<>(Main.pref.getCollection("plugins", new LinkedList<String>()));
+        List <String> pl = new LinkedList<>(Main.pref.getCollection("plugins", new LinkedList<String>()));
         for (final PluginProxy pp : pluginList) {
             PluginInformation pi = pp.getPluginInformation();
Index: trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 8338)
@@ -27,4 +27,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Set;
 
 import javax.swing.JLabel;
@@ -276,5 +277,5 @@
     protected List<PluginInformation> filterDeprecatedPlugins(List<PluginInformation> plugins) {
         List<PluginInformation> ret = new ArrayList<>(plugins.size());
-        HashSet<String> deprecatedPluginNames = new HashSet<>();
+        Set<String> deprecatedPluginNames = new HashSet<>();
         for (PluginHandler.DeprecatedPlugin p : PluginHandler.DEPRECATED_PLUGINS) {
             deprecatedPluginNames.add(p.name);
Index: trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 8338)
@@ -42,5 +42,5 @@
         }
         String[] args = url.substring(i+1).split("&");
-        HashMap<String, String> map = new HashMap<>();
+        Map<String, String> map = new HashMap<>();
         for (String arg : args) {
             int eq = arg.indexOf('=');
Index: trunk/src/org/openstreetmap/josm/tools/Pair.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Pair.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/tools/Pair.java	(revision 8338)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.tools;
 import java.util.ArrayList;
+import java.util.List;
 
 /**
@@ -31,9 +32,11 @@
     }
 
-    @Override public int hashCode() {
+    @Override
+    public int hashCode() {
         return a.hashCode() + b.hashCode();
     }
 
-    @Override public boolean equals(Object other) {
+    @Override
+    public boolean equals(Object other) {
         if (other instanceof Pair<?, ?>) {
             Pair<?, ?> o = (Pair<?, ?>)other;
@@ -43,6 +46,6 @@
     }
 
-    public static <T> ArrayList<T> toArrayList(Pair<T, T> p) {
-        ArrayList<T> l = new ArrayList<>(2);
+    public static <T> List<T> toList(Pair<T, T> p) {
+        List<T> l = new ArrayList<>(2);
         l.add(p.a);
         l.add(p.b);
Index: trunk/src/org/openstreetmap/josm/tools/Shortcut.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 8337)
+++ trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 8338)
@@ -310,5 +310,5 @@
         Main.platform.initSystemShortcuts();
         // (2) User defined shortcuts
-        LinkedList<Shortcut> newshortcuts = new LinkedList<>();
+        List<Shortcut> newshortcuts = new LinkedList<>();
         for(String s : Main.pref.getAllPrefixCollectionKeys("shortcut.entry.")) {
             newshortcuts.add(new Shortcut(s));
