Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 7005)
@@ -209,7 +209,7 @@
     private GettingStarted gettingStarted = new GettingStarted();
 
-    private static final Collection<MapFrameListener> mapFrameListeners = new ArrayList<MapFrameListener>();
-
-    protected static final Map<String, Throwable> NETWORK_ERRORS = new HashMap<String, Throwable>();
+    private static final Collection<MapFrameListener> mapFrameListeners = new ArrayList<>();
+
+    protected static final Map<String, Throwable> NETWORK_ERRORS = new HashMap<>();
 
     /**
@@ -519,5 +519,5 @@
 
         // contains several initialization tasks to be executed (in parallel) by a ExecutorService
-        List<Callable<Void>> tasks = new ArrayList<Callable<Void>>();
+        List<Callable<Void>> tasks = new ArrayList<>();
 
         tasks.add(new InitializationTask(tr("Initializing OSM API")) {
@@ -835,5 +835,5 @@
     protected static void postConstructorProcessCmdLine(Map<Option, Collection<String>> args) {
         if (args.containsKey(Option.DOWNLOAD)) {
-            List<File> fileList = new ArrayList<File>();
+            List<File> fileList = new ArrayList<>();
             for (String s : args.get(Option.DOWNLOAD)) {
                 File f = null;
@@ -918,5 +918,5 @@
     public static boolean saveUnsavedModifications(Iterable<? extends Layer> selectedLayers, boolean exit) {
         SaveLayersDialog dialog = new SaveLayersDialog(parent);
-        List<OsmDataLayer> layersWithUnmodifiedChanges = new ArrayList<OsmDataLayer>();
+        List<OsmDataLayer> layersWithUnmodifiedChanges = new ArrayList<>();
         for (Layer l: selectedLayers) {
             if (!(l instanceof OsmDataLayer)) {
@@ -962,5 +962,5 @@
             // Remove all layers because somebody may rely on layerRemoved events (like AutosaveTask)
             if (Main.isDisplayingMapView()) {
-                Collection<Layer> layers = new ArrayList<Layer>(Main.map.mapView.getAllLayers());
+                Collection<Layer> layers = new ArrayList<>(Main.map.mapView.getAllLayers());
                 for (Layer l: layers) {
                     Main.main.removeLayer(l);
@@ -1189,5 +1189,5 @@
      * created dataset as projection change listener.
      */
-    private static final List<WeakReference<ProjectionChangeListener>> listeners = new ArrayList<WeakReference<ProjectionChangeListener>>();
+    private static final List<WeakReference<ProjectionChangeListener>> listeners = new ArrayList<>();
 
     private static void fireProjectionChanged(Projection oldValue, Projection newValue, Bounds oldBounds) {
@@ -1226,5 +1226,5 @@
                 if (wr.get() == listener) return;
             }
-            listeners.add(new WeakReference<ProjectionChangeListener>(listener));
+            listeners.add(new WeakReference<>(listener));
         }
     }
@@ -1269,5 +1269,5 @@
     }
 
-    private static final List<WeakReference<WindowSwitchListener>> windowSwitchListeners = new ArrayList<WeakReference<WindowSwitchListener>>();
+    private static final List<WeakReference<WindowSwitchListener>> windowSwitchListeners = new ArrayList<>();
 
     /**
@@ -1284,5 +1284,5 @@
             }
             boolean wasEmpty = windowSwitchListeners.isEmpty();
-            windowSwitchListeners.add(new WeakReference<WindowSwitchListener>(listener));
+            windowSwitchListeners.add(new WeakReference<>(listener));
             if (wasEmpty) {
                 // The following call will have no effect, when there is no window
@@ -1480,5 +1480,5 @@
      */
     public static Map<String, Throwable> getNetworkErrors() {
-        return new HashMap<String, Throwable>(NETWORK_ERRORS);
+        return new HashMap<>(NETWORK_ERRORS);
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java	(revision 7005)
@@ -113,5 +113,5 @@
 
     protected void launchInfoBrowsersForSelectedPrimitives() {
-        List<OsmPrimitive> primitivesToShow = new ArrayList<OsmPrimitive>(getCurrentDataSet().getAllSelected());
+        List<OsmPrimitive> primitivesToShow = new ArrayList<>(getCurrentDataSet().getAllSelected());
 
         // filter out new primitives which are not yet uploaded to the server
Index: trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 7005)
@@ -131,8 +131,8 @@
 
         Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
-        List<Node> nodes = new LinkedList<Node>();
+        List<Node> nodes = new LinkedList<>();
         // fixNodes: All nodes for which the angle relative to center should not be modified
-        HashSet<Node> fixNodes = new HashSet<Node>();
-        List<Way> ways = new LinkedList<Way>();
+        HashSet<Node> fixNodes = new HashSet<>();
+        List<Way> ways = new LinkedList<>();
         EastNorth center = null;
         double radius = 0;
@@ -156,11 +156,11 @@
             Way closedWay = new Way(w);
             closedWay.addNode(w.firstNode());
-            ArrayList<Way> usedWays = new ArrayList<Way>(1);
+            ArrayList<Way> usedWays = new ArrayList<>(1);
             usedWays.add(closedWay);
             nodes = collectNodesAnticlockwise(usedWays);
         } else if (!ways.isEmpty() && checkWaysArePolygon(ways)) {
             // Case 2
-            ArrayList<Node> inside = new ArrayList<Node>();
-            ArrayList<Node> outside = new ArrayList<Node>();
+            ArrayList<Node> inside = new ArrayList<>();
+            ArrayList<Node> outside = new ArrayList<>();
             
             for(Node n: nodes) {
@@ -240,5 +240,5 @@
         if(!actionAllowed(nodes)) return;
 
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
 
         // Move each node to that distance from the center.
@@ -287,5 +287,5 @@
      */
     private List<Node> collectNodesWithExternReferers(List<Way> ways) {
-        ArrayList<Node> withReferrers = new ArrayList<Node>();
+        ArrayList<Node> withReferrers = new ArrayList<>();
         for(Way w: ways)
             for(Node n: w.getNodes())
@@ -301,5 +301,5 @@
      */
     private List<Node> collectNodesAnticlockwise(List<Way> ways) {
-        ArrayList<Node> nodes = new ArrayList<Node>();
+        ArrayList<Node> nodes = new ArrayList<>();
         Node firstNode = ways.get(0).firstNode();
         Node lastNode = null;
Index: trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 7005)
@@ -89,5 +89,5 @@
             Collection<Way> ref = OsmPrimitive.getFilteredList(n.getReferrers(), Way.class);
             if(waysRef == null)
-                waysRef = new HashSet<Way>(ref);
+                waysRef = new HashSet<>(ref);
             else
                 waysRef.retainAll(ref);
@@ -95,5 +95,5 @@
         if(waysRef.size() == 1) {
             // All nodes are part of the same way. See #9605
-            HashSet<Node> remainNodes = new HashSet<Node>(nodes);
+            HashSet<Node> remainNodes = new HashSet<>(nodes);
             Way way = waysRef.iterator().next();
             for(Node n: way.getNodes()) {
@@ -135,6 +135,6 @@
             return;
 
-        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());
 
         try {
@@ -196,5 +196,5 @@
         // use the nodes furthest apart as anchors
         nodePairFurthestApart(nodes, anchors);
-        Collection<Command> cmds = new ArrayList<Command>(nodes.size());
+        Collection<Command> cmds = new ArrayList<>(nodes.size());
         Line line = new Line(anchors[0], anchors[1]);
         for(Node node: nodes)
@@ -212,6 +212,6 @@
     private Command alignMultiWay(Collection<Way> ways) throws InvalidSelection {
         // Collect all nodes and compute line equation
-        HashSet<Node> nodes = new HashSet<Node>();
-        HashMap<Way, Line> lines = new HashMap<Way, Line>();
+        HashSet<Node> nodes = new HashSet<>();
+        HashMap<Way, Line> lines = new HashMap<>();
         for(Way w: ways) {
             if(w.firstNode() == w.lastNode())
@@ -220,6 +220,6 @@
             lines.put(w, new Line(w));
         }
-        Collection<Command> cmds = new ArrayList<Command>(nodes.size());
-        List<Way> referers = new ArrayList<Way>(ways.size());
+        Collection<Command> cmds = new ArrayList<>(nodes.size());
+        List<Way> referers = new ArrayList<>(ways.size());
         for(Node n: nodes) {
             referers.clear();
@@ -250,6 +250,6 @@
      */
     private List<Line> getInvolvedLines(Node node, List<Way> refWays) throws InvalidSelection {
-        ArrayList<Line> lines = new ArrayList<Line>();
-        ArrayList<Node> neighbors = new ArrayList<Node>();
+        ArrayList<Line> lines = new ArrayList<>();
+        ArrayList<Node> neighbors = new ArrayList<>();
         for(Way way: refWays) {
             List<Node> nodes = way.getNodes();
Index: trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 7005)
@@ -207,5 +207,5 @@
             l.visitBoundingBox(v);
         } else if (mode.equals("selection") || mode.equals("conflict")) {
-            Collection<OsmPrimitive> sel = new HashSet<OsmPrimitive>();
+            Collection<OsmPrimitive> sel = new HashSet<>();
             if (mode.equals("selection")) {
                 sel = getCurrentDataSet().getSelected();
Index: trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 7005)
@@ -109,5 +109,5 @@
 
         // remove duplicates, preserving order
-        ways = new LinkedHashSet<Way>(ways);
+        ways = new LinkedHashSet<>(ways);
 
         // try to build a new way which includes all the combined
@@ -125,6 +125,6 @@
         TagCollection wayTags = TagCollection.unionOfAllPrimitives(ways);
 
-        List<Way> reversedWays = new LinkedList<Way>();
-        List<Way> unreversedWays = new LinkedList<Way>();
+        List<Way> reversedWays = new LinkedList<>();
+        List<Way> unreversedWays = new LinkedList<>();
         for (Way w: ways) {
             // Treat zero or one-node ways as unreversed as Combine action action is a good way to fix them (see #8971)
@@ -155,8 +155,8 @@
             // if there are still reversed ways with direction-dependent tags, reverse their tags
             if (!reversedWays.isEmpty() && PROP_REVERSE_WAY.get()) {
-                List<Way> unreversedTagWays = new ArrayList<Way>(ways);
+                List<Way> unreversedTagWays = new ArrayList<>(ways);
                 unreversedTagWays.removeAll(reversedWays);
                 ReverseWayTagCorrector reverseWayTagCorrector = new ReverseWayTagCorrector();
-                List<Way> reversedTagWays = new ArrayList<Way>(reversedWays.size());
+                List<Way> reversedTagWays = new ArrayList<>(reversedWays.size());
                 Collection<Command> changePropertyCommands =  null;
                 for (Way w : reversedWays) {
@@ -183,6 +183,6 @@
         List<Command> resolution = CombinePrimitiveResolverDialog.launchIfNecessary(wayTags, ways, Collections.singleton(targetWay));
 
-        LinkedList<Command> cmds = new LinkedList<Command>();
-        LinkedList<Way> deletedWays = new LinkedList<Way>(ways);
+        LinkedList<Command> cmds = new LinkedList<>();
+        LinkedList<Way> deletedWays = new LinkedList<>(ways);
         deletedWays.remove(targetWay);
 
@@ -377,5 +377,5 @@
     public static class NodeGraph {
         public static List<NodePair> buildNodePairs(Way way, boolean directed) {
-            List<NodePair> pairs = new ArrayList<NodePair>();
+            List<NodePair> pairs = new ArrayList<>();
             for (Pair<Node,Node> pair: way.getNodePairs(false /* don't sort */)) {
                 pairs.add(new NodePair(pair));
@@ -388,5 +388,5 @@
 
         public static List<NodePair> buildNodePairs(List<Way> ways, boolean directed) {
-            List<NodePair> pairs = new ArrayList<NodePair>();
+            List<NodePair> pairs = new ArrayList<>();
             for (Way w: ways) {
                 pairs.addAll(buildNodePairs(w, directed));
@@ -396,5 +396,5 @@
 
         public static List<NodePair> eliminateDuplicateNodePairs(List<NodePair> pairs) {
-            List<NodePair> cleaned = new ArrayList<NodePair>();
+            List<NodePair> cleaned = new ArrayList<>();
             for(NodePair p: pairs) {
                 if (!cleaned.contains(p) && !cleaned.contains(p.swap())) {
@@ -449,5 +449,5 @@
                 }
             } else {
-                List<NodePair> l = new ArrayList<NodePair>();
+                List<NodePair> l = new ArrayList<>();
                 l.add(pair);
                 successors.put(pair.getA(), l);
@@ -461,5 +461,5 @@
                 }
             } else {
-                List<NodePair> l = new ArrayList<NodePair>();
+                List<NodePair> l = new ArrayList<>();
                 l.add(pair);
                 predecessors.put(pair.getB(), l);
@@ -480,7 +480,7 @@
 
         protected void prepare() {
-            Set<NodePair> undirectedEdges = new LinkedHashSet<NodePair>();
-            successors = new LinkedHashMap<Node, List<NodePair>>();
-            predecessors = new LinkedHashMap<Node, List<NodePair>>();
+            Set<NodePair> undirectedEdges = new LinkedHashSet<>();
+            successors = new LinkedHashMap<>();
+            predecessors = new LinkedHashMap<>();
 
             for (NodePair pair: edges) {
@@ -498,5 +498,5 @@
          */
         public NodeGraph() {
-            edges = new LinkedHashSet<NodePair>();
+            edges = new LinkedHashSet<>();
         }
 
@@ -523,5 +523,5 @@
 
         protected Set<Node> getTerminalNodes() {
-            Set<Node> ret = new LinkedHashSet<Node>();
+            Set<Node> ret = new LinkedHashSet<>();
             for (Node n: getNodes()) {
                 if (isTerminalNode(n)) {
@@ -533,5 +533,5 @@
 
         protected Set<Node> getNodes(Stack<NodePair> pairs) {
-            HashSet<Node> nodes = new LinkedHashSet<Node>(2*pairs.size());
+            HashSet<Node> nodes = new LinkedHashSet<>(2*pairs.size());
             for (NodePair pair: pairs) {
                 nodes.add(pair.getA());
@@ -553,5 +553,5 @@
 
         protected Set<Node> getNodes() {
-            Set<Node> nodes = new LinkedHashSet<Node>(2 * edges.size());
+            Set<Node> nodes = new LinkedHashSet<>(2 * edges.size());
             for (NodePair pair: edges) {
                 nodes.add(pair.getA());
@@ -566,5 +566,5 @@
 
         protected List<Node> buildPathFromNodePairs(Stack<NodePair> path) {
-            LinkedList<Node> ret = new LinkedList<Node>();
+            LinkedList<Node> ret = new LinkedList<>();
             for (NodePair pair: path) {
                 ret.add(pair.getA());
@@ -585,6 +585,6 @@
             if (startNode == null)
                 return null;
-            Stack<NodePair> path = new Stack<NodePair>();
-            Stack<NodePair> nextPairs  = new Stack<NodePair>();
+            Stack<NodePair> path = new Stack<>();
+            Stack<NodePair> nextPairs  = new Stack<>();
             nextPairs.addAll(getOutboundPairs(startNode));
             while(!nextPairs.isEmpty()) {
Index: trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java	(revision 7005)
@@ -137,5 +137,5 @@
 
         Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
-        List<Node> nodes = new LinkedList<Node>();
+        List<Node> nodes = new LinkedList<>();
         Way existingWay = null;
 
@@ -170,5 +170,5 @@
 
         // now we can start doing things to OSM data
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
         EastNorth center = null;
         
@@ -210,5 +210,5 @@
 
         // build a way for the circle
-        List<Node> wayToAdd = new ArrayList<Node>();
+        List<Node> wayToAdd = new ArrayList<>();
         for(int i = 0; i < nodes.size(); i++) {
             wayToAdd.add(angles[i].node);
Index: trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java	(revision 7005)
@@ -174,5 +174,5 @@
             return selectedRelations.iterator().next();
         } else {
-            final HashSet<Relation> relatedRelations = new HashSet<Relation>();
+            final HashSet<Relation> relatedRelations = new HashSet<>();
             for (final Way w : selectedWays) {
                 relatedRelations.addAll(Utils.filteredCollection(w.getReferrers(), Relation.class));
@@ -188,5 +188,5 @@
 
         // add ways of existing relation to include them in polygon analysis
-        Set<Way> ways = new HashSet<Way>(selectedWays);
+        Set<Way> ways = new HashSet<>(selectedWays);
         ways.addAll(selectedMultipolygonRelation.getMemberPrimitives(Way.class));
 
@@ -303,5 +303,5 @@
     private static void addMembers(JoinedPolygon polygon, Relation rel, String role) {
         final int count = rel.getMembersCount();
-        final HashSet<Way> ways = new HashSet<Way>(polygon.ways);
+        final HashSet<Way> ways = new HashSet<>(polygon.ways);
         for (int i = 0; i < count; i++) {
             final RelationMember m = rel.getMember(i);
@@ -325,10 +325,10 @@
      */
     public static List<Command> removeTagsFromWaysIfNeeded( Relation relation ) {
-        Map<String, String> values = new HashMap<String, String>(relation.getKeys());
-
-        List<Way> innerWays = new ArrayList<Way>();
-        List<Way> outerWays = new ArrayList<Way>();
-
-        Set<String> conflictingKeys = new TreeSet<String>();
+        Map<String, String> values = new HashMap<>(relation.getKeys());
+
+        List<Way> innerWays = new ArrayList<>();
+        List<Way> outerWays = new ArrayList<>();
+
+        Set<String> conflictingKeys = new TreeSet<>();
 
         for( RelationMember m : relation.getMembers() ) {
@@ -371,9 +371,9 @@
         values.put("area", "yes");
 
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
         boolean moveTags = Main.pref.getBoolean("multipoly.movetags", true);
 
         for (Entry<String, String> entry : values.entrySet()) {
-            List<OsmPrimitive> affectedWays = new ArrayList<OsmPrimitive>();
+            List<OsmPrimitive> affectedWays = new ArrayList<>();
             String key = entry.getKey();
             String value = entry.getValue();
Index: trunk/src/org/openstreetmap/josm/actions/DistributeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DistributeAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/DistributeAction.java	(revision 7005)
@@ -52,6 +52,6 @@
             return;
         Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
-        Collection<Node> nodes = new LinkedList<Node>();
-        Collection<Node> itnodes = new LinkedList<Node>();
+        Collection<Node> nodes = new LinkedList<>();
+        Collection<Node> itnodes = new LinkedList<>();
         for (OsmPrimitive osm : sel)
             if (osm instanceof Node) {
@@ -115,5 +115,5 @@
 
         // A list of commands to do
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
 
         // Amount of nodes between A and B plus 1
@@ -152,5 +152,5 @@
 
     private Set<Node> removeNodesWithoutCoordinates(Collection<Node> col) {
-        Set<Node> result = new HashSet<Node>();
+        Set<Node> result = new HashSet<>();
         for (Iterator<Node> it = col.iterator(); it.hasNext();) {
             Node n = it.next();
Index: trunk/src/org/openstreetmap/josm/actions/DownloadAlongAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DownloadAlongAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/DownloadAlongAction.java	(revision 7005)
@@ -93,5 +93,5 @@
      */
     protected static void confirmAndDownloadAreas(Area a, double maxArea, boolean osmDownload, boolean gpxDownload, String title, ProgressMonitor progressMonitor) {
-        List<Rectangle2D> toDownload = new ArrayList<Rectangle2D>();
+        List<Rectangle2D> toDownload = new ArrayList<>();
         addToDownload(a, a.getBounds(), toDownload, maxArea);
         if (toDownload.isEmpty()) {
Index: trunk/src/org/openstreetmap/josm/actions/ExpertToggleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ExpertToggleAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/ExpertToggleAction.java	(revision 7005)
@@ -23,6 +23,6 @@
     }
 
-    private static final List<WeakReference<ExpertModeChangeListener>> listeners = new ArrayList<WeakReference<ExpertModeChangeListener>>();
-    private static final List<WeakReference<Component>> visibilityToggleListeners = new ArrayList<WeakReference<Component>>();
+    private static final List<WeakReference<ExpertModeChangeListener>> listeners = new ArrayList<>();
+    private static final List<WeakReference<Component>> visibilityToggleListeners = new ArrayList<>();
 
     private static final ExpertToggleAction INSTANCE = new ExpertToggleAction();
@@ -70,5 +70,5 @@
             if (wr.get() == listener) return;
         }
-        listeners.add(new WeakReference<ExpertModeChangeListener>(listener));
+        listeners.add(new WeakReference<>(listener));
         if (fireWhenAdding) {
             listener.expertChanged(isExpert());
@@ -100,5 +100,5 @@
             if (wr.get() == c) return;
         }
-        visibilityToggleListeners.add(new WeakReference<Component>(c));
+        visibilityToggleListeners.add(new WeakReference<>(c));
         c.setVisible(isExpert());
     }
Index: trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 7005)
@@ -43,5 +43,5 @@
     static {
 
-        importers = new ArrayList<FileImporter>();
+        importers = new ArrayList<>();
 
         String[] importerNames = {
@@ -69,5 +69,5 @@
         }
 
-        exporters = new ArrayList<FileExporter>();
+        exporters = new ArrayList<>();
 
         String[] exporterNames = {
@@ -138,5 +138,5 @@
     public static List<ExtensionFileFilter> getImportExtensionFileFilters() {
         updateAllFormatsImporter();
-        LinkedList<ExtensionFileFilter> filters = new LinkedList<ExtensionFileFilter>();
+        LinkedList<ExtensionFileFilter> filters = new LinkedList<>();
         for (FileImporter importer : importers) {
             filters.add(importer.filter);
@@ -155,5 +155,5 @@
      */
     public static List<ExtensionFileFilter> getExportExtensionFileFilters() {
-        LinkedList<ExtensionFileFilter> filters = new LinkedList<ExtensionFileFilter>();
+        LinkedList<ExtensionFileFilter> filters = new LinkedList<>();
         for (FileExporter exporter : exporters) {
             if (filters.contains(exporter.filter) || !exporter.isEnabled()) {
Index: trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java	(revision 7005)
@@ -70,5 +70,5 @@
         JFrame frame = (JFrame) Main.parent;
 
-        List<Window> visibleWindows = new ArrayList<Window>();
+        List<Window> visibleWindows = new ArrayList<>();
         visibleWindows.add(frame);
         for (Window w : Frame.getWindows()) {
Index: trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 7005)
@@ -52,7 +52,7 @@
 public class JoinAreasAction extends JosmAction {
     // This will be used to commit commands and unite them into one large command sequence at the end
-    private final LinkedList<Command> cmds = new LinkedList<Command>();
+    private final LinkedList<Command> cmds = new LinkedList<>();
     private int cmdsCount = 0;
-    private final List<Relation> addedRelations = new LinkedList<Relation>();
+    private final List<Relation> addedRelations = new LinkedList<>();
 
     /**
@@ -74,5 +74,5 @@
         public Multipolygon(Way way) {
             outerWay = way;
-            innerWays = new ArrayList<Way>();
+            innerWays = new ArrayList<>();
         }
     }
@@ -143,5 +143,5 @@
 
         public List<Node> getNodes() {
-            List<Node> nodes = new ArrayList<Node>();
+            List<Node> nodes = new ArrayList<>();
             for (WayInPolygon way : this.ways) {
                 //do not add the last node as it will be repeated in the next way
@@ -177,5 +177,5 @@
         public AssembledMultipolygon(AssembledPolygon way) {
             outerWay = way;
-            innerWays = new ArrayList<AssembledPolygon>();
+            innerWays = new ArrayList<>();
         }
     }
@@ -195,5 +195,5 @@
         public WayTraverser(Collection<WayInPolygon> ways) {
 
-            availableWays = new HashSet<WayInPolygon>(ways);
+            availableWays = new HashSet<>(ways);
             lastWay = null;
         }
@@ -310,5 +310,5 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        LinkedList<Way> ways = new LinkedList<Way>(Main.main.getCurrentDataSet().getSelectedWays());
+        LinkedList<Way> ways = new LinkedList<>(Main.main.getCurrentDataSet().getSelectedWays());
         addedRelations.clear();
 
@@ -321,5 +321,5 @@
         }
 
-        List<Node> allNodes = new ArrayList<Node>();
+        List<Node> allNodes = new ArrayList<>();
         for (Way way : ways) {
             if (!way.isClosed()) {
@@ -376,5 +376,5 @@
                 commitCommands(tr("Move tags from ways to relations"));
 
-                List<Way> allWays = new ArrayList<Way>();
+                List<Way> allWays = new ArrayList<>();
                 for (Multipolygon pol : result.polygons) {
                     allWays.add(pol.outerWay);
@@ -406,5 +406,5 @@
      */
     private boolean testJoin(List<Multipolygon> areas) {
-        List<Way> allStartingWays = new ArrayList<Way>();
+        List<Way> allStartingWays = new ArrayList<>();
 
         for (Multipolygon area : areas) {
@@ -428,7 +428,7 @@
         result.hasChanges = false;
 
-        List<Way> allStartingWays = new ArrayList<Way>();
-        List<Way> innerStartingWays = new ArrayList<Way>();
-        List<Way> outerStartingWays = new ArrayList<Way>();
+        List<Way> allStartingWays = new ArrayList<>();
+        List<Way> innerStartingWays = new ArrayList<>();
+        List<Way> outerStartingWays = new ArrayList<>();
 
         for (Multipolygon area : areas) {
@@ -457,5 +457,5 @@
         commitCommands(marktr("Added node on all intersections"));
 
-        List<RelationRole> relations = new ArrayList<RelationRole>();
+        List<RelationRole> relations = new ArrayList<>();
 
         // Remove ways from all relations so ways can be combined/split quietly
@@ -467,5 +467,5 @@
         boolean warnAboutRelations = !relations.isEmpty() && allStartingWays.size() > 1;
 
-        List<WayInPolygon> preparedWays = new ArrayList<WayInPolygon>();
+        List<WayInPolygon> preparedWays = new ArrayList<>();
 
         for (Way way : outerStartingWays) {
@@ -480,5 +480,5 @@
 
         // Find boundary ways
-        List<Way> discardedWays = new ArrayList<Way>();
+        List<Way> discardedWays = new ArrayList<>();
         List<AssembledPolygon> bounadries = findBoundaryPolygons(preparedWays, discardedWays);
 
@@ -488,6 +488,6 @@
 
         //assemble final polygons
-        List<Multipolygon> polygons = new ArrayList<Multipolygon>();
-        Set<Relation> relationsToDelete = new LinkedHashSet<Relation>();
+        List<Multipolygon> polygons = new ArrayList<>();
+        Set<Relation> relationsToDelete = new LinkedHashSet<>();
 
         for (AssembledMultipolygon pol : preparedPolygons) {
@@ -548,5 +548,5 @@
     private boolean resolveTagConflicts(List<Multipolygon> polygons) {
 
-        List<Way> ways = new ArrayList<Way>();
+        List<Way> ways = new ArrayList<>();
 
         for (Multipolygon pol : polygons) {
@@ -577,5 +577,5 @@
         //TODO: maybe join nodes with JoinNodesAction, rather than reconnect the ways.
 
-        Map<Node, Node> nodeMap = new TreeMap<Node, Node>(new NodePositionComparator());
+        Map<Node, Node> nodeMap = new TreeMap<>(new NodePositionComparator());
         int totalNodesRemoved = 0;
 
@@ -586,5 +586,5 @@
 
             int nodesRemoved = 0;
-            List<Node> newNodes = new ArrayList<Node>();
+            List<Node> newNodes = new ArrayList<>();
             Node prevNode = null;
 
@@ -661,9 +661,9 @@
     private List<WayInPolygon> markWayInsideSide(List<Way> parts, boolean isInner) {
 
-        List<WayInPolygon> result = new ArrayList<WayInPolygon>();
+        List<WayInPolygon> result = new ArrayList<>();
 
         //prepare prev and next maps
-        Map<Way, Way> nextWayMap = new HashMap<Way, Way>();
-        Map<Way, Way> prevWayMap = new HashMap<Way, Way>();
+        Map<Way, Way> nextWayMap = new HashMap<>();
+        Map<Way, Way> prevWayMap = new HashMap<>();
 
         for (int pos = 0; pos < parts.size(); pos ++) {
@@ -831,5 +831,5 @@
     private List<Way> splitWayOnNodes(Way way, Set<Node> nodes) {
 
-        List<Way> result = new ArrayList<Way>();
+        List<Way> result = new ArrayList<>();
         List<List<Node>> chunks = buildNodeChunks(way, nodes);
 
@@ -859,6 +859,6 @@
      */
     private List<List<Node>> buildNodeChunks(Way way, Collection<Node> splitNodes) {
-        List<List<Node>> result = new ArrayList<List<Node>>();
-        List<Node> curList = new ArrayList<Node>();
+        List<List<Node>> result = new ArrayList<>();
+        List<Node> curList = new ArrayList<>();
 
         for (Node node : way.getNodes()) {
@@ -866,5 +866,5 @@
             if (curList.size() > 1 && splitNodes.contains(node)) {
                 result.add(curList);
-                curList = new ArrayList<Node>();
+                curList = new ArrayList<>();
                 curList.add(node);
             }
@@ -877,5 +877,4 @@
         return result;
     }
-
 
     /**
@@ -887,5 +886,5 @@
 
         List<PolygonLevel> list = findOuterWaysImpl(0, boundaries);
-        List<AssembledMultipolygon> result = new ArrayList<AssembledMultipolygon>();
+        List<AssembledMultipolygon> result = new ArrayList<>();
 
         //take every other level
@@ -908,10 +907,10 @@
 
         //TODO: bad performance for deep nestings...
-        List<PolygonLevel> result = new ArrayList<PolygonLevel>();
+        List<PolygonLevel> result = new ArrayList<>();
 
         for (AssembledPolygon outerWay : boundaryWays) {
 
             boolean outerGood = true;
-            List<AssembledPolygon> innerCandidates = new ArrayList<AssembledPolygon>();
+            List<AssembledPolygon> innerCandidates = new ArrayList<>();
 
             for (AssembledPolygon innerWay : boundaryWays) {
@@ -963,10 +962,10 @@
         //first find all discardable ways, by getting outer shells.
         //this will produce incorrect boundaries in some cases, but second pass will fix it.
-        List<WayInPolygon> discardedWays = new ArrayList<WayInPolygon>();
+        List<WayInPolygon> discardedWays = new ArrayList<>();
 
         // In multigonWays collection, some way are just a point (i.e. way like nodeA-nodeA)
         // 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<WayInPolygon>();
+        ArrayList<WayInPolygon> cleanMultigonWays = new ArrayList<>();
         for(WayInPolygon way: multigonWays)
             if(way.way.getNodesCount() == 2 && way.way.firstNode() == way.way.lastNode())
@@ -976,9 +975,9 @@
 
         WayTraverser traverser = new WayTraverser(cleanMultigonWays);
-        List<AssembledPolygon> result = new ArrayList<AssembledPolygon>();
+        List<AssembledPolygon> result = new ArrayList<>();
 
         WayInPolygon startWay;
         while((startWay = traverser.startNewWay()) != null) {
-            ArrayList<WayInPolygon> path = new ArrayList<WayInPolygon>();
+            ArrayList<WayInPolygon> path = new ArrayList<>();
             path.add(startWay);
             while(true) {
@@ -1024,5 +1023,5 @@
      */
     public static List<AssembledPolygon> fixTouchingPolygons(List<AssembledPolygon> polygons) {
-        List<AssembledPolygon> newPolygons = new ArrayList<AssembledPolygon>();
+        List<AssembledPolygon> newPolygons = new ArrayList<>();
 
         for (AssembledPolygon ring : polygons) {
@@ -1032,5 +1031,5 @@
 
             while((startWay = traverser.startNewWay()) != null) {
-                List<WayInPolygon> simpleRingWays = new ArrayList<WayInPolygon>();
+                List<WayInPolygon> simpleRingWays = new ArrayList<>();
                 simpleRingWays.add(startWay);
                 WayInPolygon nextWay;
@@ -1057,5 +1056,5 @@
      */
     public static boolean wayInsideWay(AssembledPolygon inside, AssembledPolygon outside) {
-        Set<Node> outsideNodes = new HashSet<Node>(outside.getNodes());
+        Set<Node> outsideNodes = new HashSet<>(outside.getNodes());
         List<Node> insideNodes = inside.getNodes();
 
@@ -1127,5 +1126,5 @@
 
         //TODO: ReverseWay and Combine way are really slow and we use them a lot here. This slows down large joins.
-        List<Way> actionWays = new ArrayList<Way>(ways.size());
+        List<Way> actionWays = new ArrayList<>(ways.size());
 
         for (WayInPolygon way : ways) {
@@ -1154,12 +1153,12 @@
     private List<Multipolygon> collectMultipolygons(List<Way> selectedWays) {
 
-        List<Multipolygon> result = new ArrayList<Multipolygon>();
+        List<Multipolygon> result = new ArrayList<>();
 
         //prepare the lists, to minimize memory allocation.
-        List<Way> outerWays = new ArrayList<Way>();
-        List<Way> innerWays = new ArrayList<Way>();
-
-        Set<Way> processedOuterWays = new LinkedHashSet<Way>();
-        Set<Way> processedInnerWays = new LinkedHashSet<Way>();
+        List<Way> outerWays = new ArrayList<>();
+        List<Way> innerWays = new ArrayList<>();
+
+        Set<Way> processedOuterWays = new LinkedHashSet<>();
+        Set<Way> processedInnerWays = new LinkedHashSet<>();
 
         for (Relation r : OsmPrimitive.getParentRelations(selectedWays)) {
@@ -1283,5 +1282,5 @@
      */
     private List<RelationRole> removeFromAllRelations(OsmPrimitive osm) {
-        List<RelationRole> result = new ArrayList<RelationRole>();
+        List<RelationRole> result = new ArrayList<>();
 
         for (Relation r : Main.main.getCurrentDataSet().getRelations()) {
@@ -1322,5 +1321,5 @@
      */
     private void fixRelations(List<RelationRole> rels, Way outer, RelationRole ownMultipol, Set<Relation> relationsToDelete) {
-        List<RelationRole> multiouters = new ArrayList<RelationRole>();
+        List<RelationRole> multiouters = new ArrayList<>();
 
         if (ownMultipol != null) {
Index: trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java	(revision 7005)
@@ -47,5 +47,5 @@
         Node node = selectedNodes.iterator().next();
 
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
 
         // If the user has selected some ways, only join the node to these.
@@ -55,5 +55,5 @@
             List<WaySegment> wss = Main.map.mapView.getNearestWaySegments(
                     Main.map.mapView.getPoint(node), OsmPrimitive.isSelectablePredicate);
-            HashMap<Way, List<Integer>> insertPoints = new HashMap<Way, List<Integer>>();
+            HashMap<Way, List<Integer>> insertPoints = new HashMap<>();
             for (WaySegment ws : wss) {
                 // Maybe cleaner to pass a "isSelected" predicate to getNearestWaySegments, but this is less invasive.
@@ -66,5 +66,5 @@
                     is = insertPoints.get(ws.way);
                 } else {
-                    is = new ArrayList<Integer>();
+                    is = new ArrayList<>();
                     insertPoints.put(ws.way, is);
                 }
@@ -98,5 +98,5 @@
 
     private static void pruneSuccsAndReverse(List<Integer> is) {
-        HashSet<Integer> is2 = new HashSet<Integer>();
+        HashSet<Integer> is2 = new HashSet<>();
         for (int i : is) {
             if (!is2.contains(i - 1) && !is2.contains(i + 1)) {
Index: trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java	(revision 7005)
@@ -64,5 +64,5 @@
      * List of available rectifier services. May be extended from the outside
      */
-    public List<RectifierService> services = new ArrayList<RectifierService>();
+    public List<RectifierService> services = new ArrayList<>();
 
     public MapRectifierWMSmenuAction() {
Index: trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 7005)
@@ -195,9 +195,9 @@
      */
     protected static List<Command> fixParentWays(Collection<Node> nodesToDelete, Node targetNode) {
-        List<Command> cmds = new ArrayList<Command>();
-        Set<Way> waysToDelete = new HashSet<Way>();
+        List<Command> cmds = new ArrayList<>();
+        Set<Way> waysToDelete = new HashSet<>();
 
         for (Way w: OsmPrimitive.getFilteredList(OsmPrimitive.getReferrer(nodesToDelete), Way.class)) {
-            List<Node> newNodes = new ArrayList<Node>(w.getNodesCount());
+            List<Node> newNodes = new ArrayList<>(w.getNodesCount());
             for (Node n: w.getNodes()) {
                 if (! nodesToDelete.contains(n) && n != targetNode) {
@@ -264,5 +264,5 @@
             return;
         }
-        Set<Node> allNodes = new HashSet<Node>(nodes);
+        Set<Node> allNodes = new HashSet<>(nodes);
         allNodes.add(targetLocationNode);
         Node target;
@@ -294,5 +294,5 @@
             return null;
         }
-        Set<Node> allNodes = new HashSet<Node>(nodes);
+        Set<Node> allNodes = new HashSet<>(nodes);
         allNodes.add(targetLocationNode);
         return mergeNodes(layer, nodes, selectTargetNode(allNodes), targetLocationNode);
@@ -320,14 +320,14 @@
             TagCollection nodeTags = TagCollection.unionOfAllPrimitives(nodes);
             List<Command> resultion = CombinePrimitiveResolverDialog.launchIfNecessary(nodeTags, nodes, Collections.singleton(targetNode));
-            LinkedList<Command> cmds = new LinkedList<Command>();
+            LinkedList<Command> cmds = new LinkedList<>();
 
             // the nodes we will have to delete
             //
-            Collection<Node> nodesToDelete = new HashSet<Node>(nodes);
+            Collection<Node> nodesToDelete = new HashSet<>(nodes);
             nodesToDelete.remove(targetNode);
 
             // fix the ways referring to at least one of the merged nodes
             //
-            Collection<Way> waysToDelete = new HashSet<Way>();
+            Collection<Way> waysToDelete = new HashSet<>();
             List<Command> wayFixCommands = fixParentWays(
                     nodesToDelete,
Index: trunk/src/org/openstreetmap/josm/actions/MirrorAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MirrorAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/MirrorAction.java	(revision 7005)
@@ -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<>();
 
         for (OsmPrimitive osm : sel) {
@@ -73,5 +73,5 @@
         double middle = (minEast + maxEast) / 2;
 
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
 
         for (Node n : nodes) {
Index: trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 7005)
@@ -96,5 +96,5 @@
     public static class OpenFileTask extends PleaseWaitRunnable {
         private List<File> files;
-        private List<File> successfullyOpenedFiles = new ArrayList<File>();
+        private List<File> successfullyOpenedFiles = new ArrayList<>();
         private FileFilter fileFilter;
         private boolean canceled;
@@ -103,5 +103,5 @@
         public OpenFileTask(List<File> files, FileFilter fileFilter, String title) {
             super(title, false /* don't ignore exception */);
-            this.files = new ArrayList<File>(files);
+            this.files = new ArrayList<>(files);
             this.fileFilter = fileFilter;
         }
@@ -214,6 +214,6 @@
             if (chosenImporter != null) {
                 // The importer was explicitly chosen, so use it.
-                List<File> filesNotMatchingWithImporter = new LinkedList<File>();
-                List<File> filesMatchingWithImporter = new LinkedList<File>();
+                List<File> filesNotMatchingWithImporter = new LinkedList<>();
+                List<File> filesMatchingWithImporter = new LinkedList<>();
                 for (final File f : files) {
                     if (!chosenImporter.acceptFile(f)) {
@@ -247,7 +247,7 @@
             } else {
                 // find appropriate importer
-                MultiMap<FileImporter, File> importerMap = new MultiMap<FileImporter, File>();
-                List<File> filesWithUnknownImporter = new LinkedList<File>();
-                List<File> urlFiles = new LinkedList<File>();
+                MultiMap<FileImporter, File> importerMap = new MultiMap<>();
+                List<File> filesWithUnknownImporter = new LinkedList<>();
+                List<File> urlFiles = new LinkedList<>();
                 FILES: for (File f : files) {
                     for (FileImporter importer : ExtensionFileFilter.importers) {
@@ -266,16 +266,16 @@
                     alertFilesWithUnknownImporter(filesWithUnknownImporter);
                 }
-                List<FileImporter> importers = new ArrayList<FileImporter>(importerMap.keySet());
+                List<FileImporter> importers = new ArrayList<>(importerMap.keySet());
                 Collections.sort(importers);
                 Collections.reverse(importers);
 
-                Set<String> fileHistory = new LinkedHashSet<String>();
-                Set<String> failedAll = new HashSet<String>();
+                Set<String> fileHistory = new LinkedHashSet<>();
+                Set<String> failedAll = new HashSet<>();
 
                 for (FileImporter importer : importers) {
-                    List<File> files = new ArrayList<File>(importerMap.get(importer));
+                    List<File> files = new ArrayList<>(importerMap.get(importer));
                     importData(importer, files);
                     // suppose all files will fail to load
-                    List<File> failedFiles = new ArrayList<File>(files);
+                    List<File> failedFiles = new ArrayList<>(files);
 
                     if (recordHistory && !importer.isBatchImporter()) {
Index: trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java	(revision 7005)
@@ -56,5 +56,5 @@
                 Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")), KeyEvent.VK_L, Shortcut.CTRL), true);
         putValue("help", ht("/Action/OpenLocation"));
-        this.downloadTasks = new ArrayList<Class<? extends DownloadTask>>();
+        this.downloadTasks = new ArrayList<>();
         addDownloadTaskClass(DownloadOsmTask.class);
         addDownloadTaskClass(DownloadGpsTask.class);
@@ -72,5 +72,5 @@
      */
     protected void restoreUploadAddressHistory(HistoryComboBox cbHistory) {
-        List<String> cmtHistory = new LinkedList<String>(Main.pref.getCollection(getClass().getName() + ".uploadAddressHistory", new LinkedList<String>()));
+        List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(getClass().getName() + ".uploadAddressHistory", new LinkedList<String>()));
         // we have to reverse the history, because ComboBoxHistory will reverse it again
         // in addElement()
@@ -134,5 +134,5 @@
      */
     public Collection<DownloadTask> findDownloadTasks(final String url) {
-        List<DownloadTask> result = new ArrayList<DownloadTask>();
+        List<DownloadTask> result = new ArrayList<>();
         for (Class<? extends DownloadTask> taskClass : downloadTasks) {
             if (taskClass != null) {
Index: trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 7005)
@@ -72,5 +72,5 @@
      * Remember movements, so the user can later undo it for certain nodes
      */
-    private static final Map<Node, EastNorth> rememberMovements = new HashMap<Node, EastNorth>();
+    private static final Map<Node, EastNorth> rememberMovements = new HashMap<>();
 
     /**
@@ -98,5 +98,5 @@
             if (!isEnabled())
                 return;
-            final Collection<Command> commands = new LinkedList<Command>();
+            final Collection<Command> commands = new LinkedList<>();
             final Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
             try {
@@ -145,6 +145,6 @@
         }
 
-        final List<Node> nodeList = new ArrayList<Node>();
-        final List<WayData> wayDataList = new ArrayList<WayData>();
+        final List<Node> nodeList = new ArrayList<>();
+        final List<WayData> wayDataList = new ArrayList<>();
         final Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
 
@@ -165,5 +165,5 @@
                 if (nodeList.size() == 2 || nodeList.isEmpty()) {
                     OrthogonalizeAction.rememberMovements.clear();
-                    final Collection<Command> commands = new LinkedList<Command>();
+                    final Collection<Command> commands = new LinkedList<>();
 
                     if (nodeList.size() == 2) {  // fixed direction
@@ -202,13 +202,13 @@
      */
     private static List<List<WayData>> buildGroups(List<WayData> wayDataList) {
-        List<List<WayData>> groups = new ArrayList<List<WayData>>();
-        Set<WayData> remaining = new HashSet<WayData>(wayDataList);
+        List<List<WayData>> groups = new ArrayList<>();
+        Set<WayData> remaining = new HashSet<>(wayDataList);
         while (!remaining.isEmpty()) {
-            List<WayData> group = new ArrayList<WayData>();
+            List<WayData> group = new ArrayList<>();
             groups.add(group);
             Iterator<WayData> it = remaining.iterator();
             WayData next = it.next();
             it.remove();
-            extendGroupRec(group, next, new ArrayList<WayData>(remaining));
+            extendGroupRec(group, next, new ArrayList<>(remaining));
             remaining.removeAll(group);
         }
@@ -283,5 +283,5 @@
 
         // put the nodes of all ways in a set
-        final HashSet<Node> allNodes = new HashSet<Node>();
+        final HashSet<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<Node, Double>();
-        final HashMap<Node, Double> nY = new HashMap<Node, Double>();
+        final HashMap<Node, Double> nX = new HashMap<>();
+        final HashMap<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<Node>(allNodes);
+            final HashSet<Node> s = new HashSet<>(allNodes);
             int s_size = s.size();
             for (int dummy = 0; dummy < s_size; ++dummy) {
@@ -322,5 +322,5 @@
                 final Node dummy_n = s.iterator().next();     // pick arbitrary element of s
 
-                final HashSet<Node> cs = new HashSet<Node>(); // will contain each node that can be reached from dummy_n
+                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
 
@@ -381,5 +381,5 @@
 
         // rotate back and log the change
-        final Collection<Command> commands = new LinkedList<Command>();
+        final Collection<Command> commands = new LinkedList<>();
         for (Node n: allNodes) {
             EastNorth tmp = new EastNorth(nX.get(n), nY.get(n));
Index: trunk/src/org/openstreetmap/josm/actions/ParameterizedActionDecorator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ParameterizedActionDecorator.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/ParameterizedActionDecorator.java	(revision 7005)
@@ -16,5 +16,5 @@
     public ParameterizedActionDecorator(ParameterizedAction action, Map<String, Object> parameters) {
         this.action = action;
-        this.parameters = new HashMap<String, Object>(parameters);
+        this.parameters = new HashMap<>(parameters);
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/PasteAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PasteAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/PasteAction.java	(revision 7005)
@@ -106,9 +106,9 @@
 
         // Make a copy of pasteBuffer and map from old id to copied data id
-        List<PrimitiveData> bufferCopy = new ArrayList<PrimitiveData>();
-        List<PrimitiveData> toSelect = new ArrayList<PrimitiveData>();
-        Map<Long, Long> newNodeIds = new HashMap<Long, Long>();
-        Map<Long, Long> newWayIds = new HashMap<Long, Long>();
-        Map<Long, Long> newRelationIds = new HashMap<Long, Long>();
+        List<PrimitiveData> bufferCopy = new ArrayList<>();
+        List<PrimitiveData> toSelect = new ArrayList<>();
+        Map<Long, Long> newNodeIds = new HashMap<>();
+        Map<Long, Long> newWayIds = new HashMap<>();
+        Map<Long, Long> newRelationIds = new HashMap<>();
         for (PrimitiveData data: pasteBuffer.getAll()) {
             if (data.isIncomplete()) {
@@ -138,5 +138,5 @@
                 }
             } else if (data instanceof WayData) {
-                List<Long> newNodes = new ArrayList<Long>();
+                List<Long> newNodes = new ArrayList<>();
                 for (Long oldNodeId: ((WayData)data).getNodes()) {
                     Long newNodeId = newNodeIds.get(oldNodeId);
@@ -147,5 +147,5 @@
                 ((WayData)data).setNodes(newNodes);
             } else if (data instanceof RelationData) {
-                List<RelationMemberData> newMembers = new ArrayList<RelationMemberData>();
+                List<RelationMemberData> newMembers = new ArrayList<>();
                 for (RelationMemberData member: ((RelationData)data).getMembers()) {
                     OsmPrimitiveType memberType = member.getMemberType();
Index: trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 7005)
@@ -56,5 +56,5 @@
         private final Collection<PrimitiveData> source;
         private final Collection<OsmPrimitive> target;
-        private final List<Tag> commands = new ArrayList<Tag>();
+        private final List<Tag> commands = new ArrayList<>();
 
         public TagPaster(Collection<PrimitiveData> source, Collection<OsmPrimitive> target) {
@@ -119,5 +119,5 @@
 
         protected Map<OsmPrimitiveType, Integer> getSourceStatistics() {
-            HashMap<OsmPrimitiveType, Integer> ret = new HashMap<OsmPrimitiveType, Integer>();
+            HashMap<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<OsmPrimitiveType, Integer>();
+            HashMap<OsmPrimitiveType, Integer> ret = new HashMap<>();
             for (OsmPrimitiveType type: OsmPrimitiveType.dataValues()) {
                 int count = OsmPrimitive.getFilteredList(target, type.getOsmClass()).size();
@@ -273,5 +273,5 @@
         if (!TextTagParser.validateTags(tags)) return false;
 
-        List<Command> commands = new ArrayList<Command>(tags.size());
+        List<Command> commands = new ArrayList<>(tags.size());
         for (Entry<String, String> entry: tags.entrySet()) {
             String v = entry.getValue();
@@ -291,5 +291,5 @@
 
         PasteTagsAction.TagPaster tagPaster = new PasteTagsAction.TagPaster(directlyAdded, selection);
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
         for (Tag tag : tagPaster.execute()) {
             commands.add(new ChangePropertyCommand(selection, tag.getKey(), "".equals(tag.getValue()) ? null : tag.getValue()));
Index: trunk/src/org/openstreetmap/josm/actions/PurgeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PurgeAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/PurgeAction.java	(revision 7005)
@@ -95,11 +95,11 @@
         layer = Main.main.getEditLayer();
 
-        toPurge = new HashSet<OsmPrimitive>(sel);
-        toPurgeAdditionally = new ArrayList<OsmPrimitive>();
-        toPurgeChecked = new HashSet<OsmPrimitive>();
+        toPurge = new HashSet<>(sel);
+        toPurgeAdditionally = new ArrayList<>();
+        toPurgeChecked = new HashSet<>();
 
         // Add referrer, unless the object to purge is not new
         // and the parent is a relation
-        HashSet<OsmPrimitive> toPurgeRecursive = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> toPurgeRecursive = new HashSet<>();
         while (!toPurge.isEmpty()) {
 
@@ -117,8 +117,8 @@
             }
             toPurge = toPurgeRecursive;
-            toPurgeRecursive = new HashSet<OsmPrimitive>();
-        }
-
-        makeIncomplete = new HashSet<OsmPrimitive>();
+            toPurgeRecursive = new HashSet<>();
+        }
+
+        makeIncomplete = new HashSet<>();
 
         // Find the objects that will be incomplete after purging.
@@ -143,5 +143,5 @@
         // referrers not yet to-be-purged.
         if (Main.pref.getBoolean("purge.add_untagged_waynodes", true)) {
-            Set<OsmPrimitive> wayNodes = new HashSet<OsmPrimitive>();
+            Set<OsmPrimitive> wayNodes = new HashSet<>();
             for (OsmPrimitive osm : toPurgeChecked) {
                 if (osm instanceof Way) {
@@ -166,5 +166,5 @@
 
         if (Main.pref.getBoolean("purge.add_relations_with_only_incomplete_members", true)) {
-            Set<Relation> relSet = new HashSet<Relation>();
+            Set<Relation> relSet = new HashSet<>();
             for (OsmPrimitive osm : toPurgeChecked) {
                 for (OsmPrimitive parent : osm.getReferrers()) {
@@ -180,5 +180,5 @@
              * Add higher level relations (list gets extended while looping over it)
              */
-            List<Relation> relLst = new ArrayList<Relation>(relSet);
+            List<Relation> relLst = new ArrayList<>(relSet);
             for (int i=0; i<relLst.size(); ++i) {
                 for (OsmPrimitive parent : relLst.get(i).getReferrers()) {
@@ -189,5 +189,5 @@
                 }
             }
-            relSet = new HashSet<Relation>(relLst);
+            relSet = new HashSet<>(relLst);
             toPurgeChecked.addAll(relSet);
             toPurgeAdditionally.addAll(relSet);
@@ -248,5 +248,5 @@
                 }
             });
-            JList<OsmPrimitive> list = new JList<OsmPrimitive>(toPurgeAdditionally.toArray(new OsmPrimitive[toPurgeAdditionally.size()]));
+            JList<OsmPrimitive> list = new JList<>(toPurgeAdditionally.toArray(new OsmPrimitive[toPurgeAdditionally.size()]));
             /* force selection to be active for all entries */
             list.setCellRenderer(new OsmPrimitivRenderer() {
Index: trunk/src/org/openstreetmap/josm/actions/RestartAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/RestartAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/RestartAction.java	(revision 7005)
@@ -80,5 +80,5 @@
                 throw new IOException("Unable to find suitable java runtime at "+java);
             }
-            final List<String> cmd = new ArrayList<String>(Collections.singleton(java));
+            final List<String> cmd = new ArrayList<>(Collections.singleton(java));
             // vm arguments
             for (String arg : ManagementFactory.getRuntimeMXBean().getInputArguments()) {
Index: trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java	(revision 7005)
@@ -47,5 +47,5 @@
 
         public Collection<Command> getCommands() {
-            List<Command> c = new ArrayList<Command>();
+            List<Command> c = new ArrayList<>();
             c.addAll(tagCorrectionCommands);
             c.add(reverseCommand);
@@ -90,5 +90,5 @@
 
         boolean propertiesUpdated = false;
-        Collection<Command> c = new LinkedList<Command>();
+        Collection<Command> c = new LinkedList<>();
         for (Way w : sel) {
             ReverseWayResult revResult;
Index: trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java	(revision 7005)
@@ -200,5 +200,5 @@
         int maxsize = Math.max(0, Main.pref.getInteger("file-open.history.max-size", 15));
         Collection<String> oldHistory = Main.pref.getCollection("file-open.history");
-        List<String> history = new LinkedList<String>(oldHistory);
+        List<String> history = new LinkedList<>(oldHistory);
         history.remove(filepath);
         history.add(0, filepath);
Index: trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java	(revision 7005)
@@ -38,6 +38,6 @@
             nodes = null;
         } else {
-            nodes = new TreeSet<Node>();
-            outerNodes = new TreeSet<Node>();
+            nodes = new TreeSet<>();
+            outerNodes = new TreeSet<>();
 
             for (Way way : ways)
@@ -149,5 +149,5 @@
             return;
 
-        selection = new LinkedList<OsmPrimitive>();
+        selection = new LinkedList<>();
         for (OsmPrimitive primitive : currentSelection)
             selection.add(primitive);
Index: trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java	(revision 7005)
@@ -117,5 +117,5 @@
         }
 
-        List<Layer> layersOut = new ArrayList<Layer>();
+        List<Layer> layersOut = new ArrayList<>();
         for (Layer layer : layers) {
             if (exporters.get(layer) == null || !exporters.get(layer).shallExport()) continue;
@@ -167,9 +167,9 @@
          */
         public final void initialize() {
-            layers = new ArrayList<Layer>(Main.map.mapView.getAllLayersAsList());
-            exporters = new HashMap<Layer, SessionLayerExporter>();
-            dependencies = new MultiMap<Layer, Layer>();
-
-            Set<Layer> noExporter = new HashSet<Layer>();
+            layers = new ArrayList<>(Main.map.mapView.getAllLayersAsList());
+            exporters = new HashMap<>();
+            dependencies = new MultiMap<>();
+
+            Set<Layer> noExporter = new HashSet<>();
 
             for (Layer layer : layers) {
Index: trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java	(revision 7005)
@@ -109,5 +109,5 @@
             final String propJavaHomeAlt = "<java.home>";
             // Build a new list of VM parameters to modify it below if needed (default implementation returns an UnmodifiableList instance)
-            List<String> vmArguments = new ArrayList<String>(ManagementFactory.getRuntimeMXBean().getInputArguments());
+            List<String> vmArguments = new ArrayList<>(ManagementFactory.getRuntimeMXBean().getInputArguments());
             for (ListIterator<String> it = vmArguments.listIterator(); it.hasNext(); ) {
                 String value = it.next();
@@ -164,5 +164,5 @@
             settings.remove("oauth.access-token.key");
             settings.remove("oauth.access-token.secret");
-            Set<String> keys = new HashSet<String>(settings.keySet());
+            Set<String> keys = new HashSet<>(settings.keySet());
             for (String key : keys) {
                 if (key.startsWith("marker.show")) {
Index: trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 7005)
@@ -107,5 +107,5 @@
             }
 
-            Collection<Command> allCommands = new LinkedList<Command>();
+            Collection<Command> allCommands = new LinkedList<>();
             for (Way way: ways) {
                 SequenceCommand simplifyCommand = simplifyWay(way);
@@ -139,5 +139,5 @@
         boolean isRequired =  Collections.frequency(way.getNodes(), node) > 1;
         if (! isRequired) {
-            List<OsmPrimitive> parents = new LinkedList<OsmPrimitive>();
+            List<OsmPrimitive> parents = new LinkedList<>();
             parents.addAll(node.getReferrers());
             parents.remove(way);
@@ -171,5 +171,5 @@
         int lower = 0;
         int i = 0;
-        List<Node> newNodes = new ArrayList<Node>(w.getNodesCount());
+        List<Node> newNodes = new ArrayList<>(w.getNodesCount());
         while(i < w.getNodesCount()){
             if (isRequiredNode(w,w.getNode(i))) {
@@ -191,5 +191,5 @@
         }
 
-        HashSet<Node> delNodes = new HashSet<Node>();
+        HashSet<Node> delNodes = new HashSet<>();
         delNodes.addAll(w.getNodes());
         delNodes.removeAll(newNodes);
@@ -197,5 +197,5 @@
         if (delNodes.isEmpty()) return null;
 
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
         Way newWay = new Way(w);
         newWay.setNodes(newNodes);
Index: trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 7005)
@@ -179,5 +179,5 @@
         List<List<Node>> wayChunks = buildSplitChunks(selectedWay, selectedNodes);
         if (wayChunks != null) {
-            List<OsmPrimitive> sel = new ArrayList<OsmPrimitive>(selectedWays.size() + selectedRelations.size());
+            List<OsmPrimitive> sel = new ArrayList<>(selectedWays.size() + selectedRelations.size());
             sel.addAll(selectedWays);
             sel.addAll(selectedRelations);
@@ -216,5 +216,5 @@
 
         // List of ways shared by all nodes
-        List<Way> result = new ArrayList<Way>(OsmPrimitive.getFilteredList(selectedNodes.get(0).getReferrers(), Way.class));
+        List<Way> result = new ArrayList<>(OsmPrimitive.getFilteredList(selectedNodes.get(0).getReferrers(), Way.class));
         for (int i=1; i<selectedNodes.size(); i++) {
             List<OsmPrimitive> ref = selectedNodes.get(i).getReferrers();
@@ -263,7 +263,7 @@
         CheckParameterUtil.ensureParameterNotNull(splitPoints, "splitPoints");
 
-        Set<Node> nodeSet = new HashSet<Node>(splitPoints);
-        List<List<Node>> wayChunks = new LinkedList<List<Node>>();
-        List<Node> currentWayChunk = new ArrayList<Node>();
+        Set<Node> nodeSet = new HashSet<>(splitPoints);
+        List<List<Node>> wayChunks = new LinkedList<>();
+        List<Node> currentWayChunk = new ArrayList<>();
         wayChunks.add(currentWayChunk);
 
@@ -274,5 +274,5 @@
             currentWayChunk.add(currentNode);
             if (nodeSet.contains(currentNode) && !atEndOfWay) {
-                currentWayChunk = new ArrayList<Node>();
+                currentWayChunk = new ArrayList<>();
                 currentWayChunk.add(currentNode);
                 wayChunks.add(currentWayChunk);
@@ -335,6 +335,6 @@
     public static SplitWayResult splitWay(OsmDataLayer layer, Way way, List<List<Node>> wayChunks, Collection<? extends OsmPrimitive> selection) {
         // build a list of commands, and also a new selection list
-        Collection<Command> commandList = new ArrayList<Command>(wayChunks.size());
-        List<OsmPrimitive> newSelection = new ArrayList<OsmPrimitive>(selection.size() + wayChunks.size());
+        Collection<Command> commandList = new ArrayList<>(wayChunks.size());
+        List<OsmPrimitive> newSelection = new ArrayList<>(selection.size() + wayChunks.size());
         newSelection.addAll(selection);
 
@@ -351,5 +351,5 @@
         }
 
-        List<Way> newWays = new ArrayList<Way>();
+        List<Way> newWays = new ArrayList<>();
         // Second, create new ways
         while (chunkIt.hasNext()) {
@@ -393,5 +393,5 @@
                                 }
                             }
-                            List<Node> nodes = new ArrayList<Node>();
+                            List<Node> nodes = new ArrayList<>();
                             if(via != null) {
                                 if(via instanceof Node) {
Index: trunk/src/org/openstreetmap/josm/actions/ToggleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ToggleAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/ToggleAction.java	(revision 7005)
@@ -23,5 +23,5 @@
 public abstract class ToggleAction extends JosmAction {
 
-    private final List<ButtonModel> buttonModels = new ArrayList<ButtonModel>();
+    private final List<ButtonModel> buttonModels = new ArrayList<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 7005)
@@ -106,5 +106,5 @@
                 return;
             }
-            Set<Node> tmpNodes = new HashSet<Node>();
+            Set<Node> tmpNodes = new HashSet<>();
             for (Node n : selectedNodes) {
                 int count = 0;
@@ -165,5 +165,5 @@
      */
     private void unglueNode(ActionEvent e) {
-        LinkedList<Command> cmds = new LinkedList<Command>();
+        LinkedList<Command> cmds = new LinkedList<>();
 
         Node c = new Node(selectedNode);
@@ -274,5 +274,5 @@
             return false;
 
-        selectedNodes = new HashSet<Node>();
+        selectedNodes = new HashSet<>();
         for (OsmPrimitive p : selection) {
             if (p instanceof Node) {
@@ -307,5 +307,5 @@
         cmds.add(new AddCommand(newNode));
 
-        List<Node> nn = new ArrayList<Node>();
+        List<Node> nn = new ArrayList<>();
         for (Node pushNode : w.getNodes()) {
             if (originalNode == pushNode) {
@@ -337,5 +337,5 @@
                     if (newRel == null) {
                         newRel = new Relation(r);
-                        rolesToReAdd = new HashSet<String>();
+                        rolesToReAdd = new HashSet<>();
                     }
                     rolesToReAdd.add(rm.getRole());
@@ -359,10 +359,10 @@
      */
     private void unglueWays() {
-        LinkedList<Command> cmds = new LinkedList<Command>();
-        LinkedList<Node> newNodes = new LinkedList<Node>();
+        LinkedList<Command> cmds = new LinkedList<>();
+        LinkedList<Node> newNodes = new LinkedList<>();
 
         if (selectedWay == null) {
             Way wayWithSelectedNode = null;
-            LinkedList<Way> parentWays = new LinkedList<Way>();
+            LinkedList<Way> parentWays = new LinkedList<>();
             for (OsmPrimitive osm : selectedNode.getReferrers()) {
                 if (osm.isUsable() && osm instanceof Way) {
@@ -407,5 +407,5 @@
     private boolean unglueSelfCrossingWay() {
         // According to previous check, only one valid way through that node
-        LinkedList<Command> cmds = new LinkedList<Command>();
+        LinkedList<Command> cmds = new LinkedList<>();
         Way way = null;
         for (Way w: OsmPrimitive.getFilteredList(selectedNode.getReferrers(), Way.class))
@@ -414,6 +414,6 @@
             }
         List<Node> oldNodes = way.getNodes();
-        ArrayList<Node> newNodes = new ArrayList<Node>(oldNodes.size());
-        ArrayList<Node> addNodes = new ArrayList<Node>();
+        ArrayList<Node> newNodes = new ArrayList<>(oldNodes.size());
+        ArrayList<Node> addNodes = new ArrayList<>();
         boolean seen = false;
         for (Node n: oldNodes) {
@@ -449,10 +449,10 @@
      */
     private void unglueWays2() {
-        LinkedList<Command> cmds = new LinkedList<Command>();
-        List<Node> allNewNodes = new LinkedList<Node>();
+        LinkedList<Command> cmds = new LinkedList<>();
+        List<Node> allNewNodes = new LinkedList<>();
         Way tmpWay = selectedWay;
 
         for (Node n : selectedNodes) {
-            List<Node> newNodes = new LinkedList<Node>();
+            List<Node> newNodes = new LinkedList<>();
             tmpWay = modifyWay(n, tmpWay, cmds, newNodes);
             fixRelations(n, cmds, newNodes);
@@ -481,5 +481,5 @@
 
     protected boolean checkAndConfirmOutlyingUnglue() {
-        List<OsmPrimitive> primitives = new ArrayList<OsmPrimitive>(2 + (selectedNodes == null ? 0 : selectedNodes.size()));
+        List<OsmPrimitive> primitives = new ArrayList<>(2 + (selectedNodes == null ? 0 : selectedNodes.size()));
         if (selectedNodes != null)
             primitives.addAll(selectedNodes);
Index: trunk/src/org/openstreetmap/josm/actions/UnJoinNodeWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UnJoinNodeWayAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/UnJoinNodeWayAction.java	(revision 7005)
@@ -99,5 +99,5 @@
 
         // List of ways shared by all nodes
-        List<Way> result = new ArrayList<Way>(OsmPrimitive.getFilteredList(selectedNodes.get(0).getReferrers(), Way.class));
+        List<Way> result = new ArrayList<>(OsmPrimitive.getFilteredList(selectedNodes.get(0).getReferrers(), Way.class));
         for (int i=1; i<selectedNodes.size(); i++) {
             List<OsmPrimitive> ref = selectedNodes.get(i).getReferrers();
Index: trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java	(revision 7005)
@@ -51,5 +51,5 @@
             return;
 
-        List<Area> areas = new ArrayList<Area>();
+        List<Area> areas = new ArrayList<>();
         for(DataSource ds : getEditLayer().data.dataSources) {
             areas.add(new Area(ds.bounds.asRect()));
@@ -72,5 +72,5 @@
         }
 
-        List<Area> areasToDownload = new ArrayList<Area>();
+        List<Area> areasToDownload = new ArrayList<>();
         for(Area a : areas) {
             if(a.isEmpty()) {
Index: trunk/src/org/openstreetmap/josm/actions/UploadAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UploadAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/UploadAction.java	(revision 7005)
@@ -53,6 +53,6 @@
      * however, a plugin might also want to insert something after that.
      */
-    private static final List<UploadHook> uploadHooks = new LinkedList<UploadHook>();
-    private static final List<UploadHook> lateUploadHooks = new LinkedList<UploadHook>();
+    private static final List<UploadHook> uploadHooks = new LinkedList<>();
+    private static final List<UploadHook> lateUploadHooks = new LinkedList<>();
     static {
         /**
@@ -232,5 +232,5 @@
             @Override
             public void run() {
-                final HashMap<String, String> tags = new HashMap<String, String>(layer.data.getChangeSetTags());
+                final HashMap<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 7004)
+++ trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 7005)
@@ -66,5 +66,5 @@
 
     protected Set<OsmPrimitive> getDeletedPrimitives(DataSet ds) {
-        HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> ret = new HashSet<>();
         for (OsmPrimitive p: ds.allPrimitives()) {
             if (p.isDeleted() && !p.isNew() && p.isVisible() && p.isModified()) {
@@ -76,5 +76,5 @@
 
     protected Set<OsmPrimitive> getModifiedPrimitives(Collection<OsmPrimitive> primitives) {
-        HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> ret = new HashSet<>();
         for (OsmPrimitive p: primitives) {
             if (p.isNewOrUndeleted()) {
@@ -188,5 +188,5 @@
 
         public UploadHullBuilder(){
-            hull = new HashSet<OsmPrimitive>();
+            hull = new HashSet<>();
         }
 
@@ -243,5 +243,5 @@
         public Set<OsmPrimitive> build(Collection<OsmPrimitive> base) throws IllegalArgumentException{
             CheckParameterUtil.ensureParameterNotNull(base, "base");
-            hull = new HashSet<OsmPrimitive>();
+            hull = new HashSet<>();
             for (OsmPrimitive p: base) {
                 p.accept(this);
@@ -303,5 +303,5 @@
          */
         protected Set<OsmPrimitive> getPrimitivesToCheckForParents() {
-            HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+            HashSet<OsmPrimitive> ret = new HashSet<>();
             for (OsmPrimitive p: toUpload) {
                 if (p.isDeleted() && !p.isNewOrUndeleted()) {
@@ -315,7 +315,7 @@
         protected void realRun() throws SAXException, IOException, OsmTransferException {
             try {
-                Stack<OsmPrimitive> toCheck = new Stack<OsmPrimitive>();
+                Stack<OsmPrimitive> toCheck = new Stack<>();
                 toCheck.addAll(getPrimitivesToCheckForParents());
-                Set<OsmPrimitive> checked = new HashSet<OsmPrimitive>();
+                Set<OsmPrimitive> checked = new HashSet<>();
                 while(!toCheck.isEmpty()) {
                     if (canceled) return;
Index: trunk/src/org/openstreetmap/josm/actions/ValidateAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ValidateAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/ValidateAction.java	(revision 7005)
@@ -160,5 +160,5 @@
             if (tests == null || tests.isEmpty())
                 return;
-            errors = new ArrayList<TestError>(200);
+            errors = new ArrayList<>(200);
             getProgressMonitor().setTicksCount(tests.size() * validatedPrimitives.size());
             int testCounter = 0;
@@ -179,5 +179,5 @@
                 for (TestError error : errors) {
                     if (canceled) return;
-                    List<String> s = new ArrayList<String>();
+                    List<String> s = new ArrayList<>();
                     s.add(error.getIgnoreState());
                     s.add(error.getIgnoreGroup());
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java	(revision 7005)
@@ -16,5 +16,5 @@
 
     public AbstractDownloadTask() {
-        errorMessages = new ArrayList<Object>();
+        errorMessages = new ArrayList<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java	(revision 7005)
@@ -103,5 +103,5 @@
                 // A changeset does not contain all referred primitives, this is the map of incomplete ones
                 // For each incomplete primitive, we'll have to get its state at date it was referred
-                Map<OsmPrimitive, Date> toLoad = new HashMap<OsmPrimitive, Date>();
+                Map<OsmPrimitive, Date> toLoad = new HashMap<>();
                 for (OsmPrimitive p : downloadedData.allNonDeletedPrimitives()) {
                     if (p.isIncomplete()) {
@@ -142,5 +142,5 @@
         @Override
         public void historyUpdated(HistoryDataSet source, PrimitiveId id) {
-            Map<OsmPrimitive, Date> toLoadNext = new HashMap<OsmPrimitive, Date>();
+            Map<OsmPrimitive, Date> toLoadNext = new HashMap<>();
             for (Iterator<OsmPrimitive> it = toLoad.keySet().iterator(); it.hasNext();) {
                 OsmPrimitive p = it.next();
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 7005)
@@ -309,5 +309,5 @@
             if (urlString.matches(PATTERN_OSM_API_URL)) {
                 // TODO: proper i18n after stabilization
-                Collection<String> items = new ArrayList<String>();
+                Collection<String> items = new ArrayList<>();
                 items.add(tr("OSM Server URL:") + " " + url.getHost());
                 items.add(tr("Command")+": "+url.getPath());
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java	(revision 7005)
@@ -62,5 +62,5 @@
         CheckParameterUtil.ensureParameterNotNull(targetLayer, "targetLayer");
         canceled = false;
-        this.children = new HashMap<Long, OsmPrimitiveType>();
+        this.children = new HashMap<>();
         if (children != null) {
             for (OsmPrimitive p: children) {
@@ -85,5 +85,5 @@
         CheckParameterUtil.ensureParameterNotNull(targetLayer, "targetLayer");
         canceled = false;
-        this.children = new HashMap<Long, OsmPrimitiveType>();
+        this.children = new HashMap<>();
         if (children != null) {
             for (Entry<Long, OsmPrimitiveType> entry : children.entrySet()) {
@@ -115,5 +115,5 @@
         CheckParameterUtil.ensureParameterNotNull(type, "type");
         canceled = false;
-        this.children = new HashMap<Long, OsmPrimitiveType>();
+        this.children = new HashMap<>();
         this.children.put(id, type);
         this.targetLayer = targetLayer;
@@ -151,5 +151,5 @@
             throw new IllegalArgumentException(MessageFormat.format("Cannot download referrers for new primitives (ID {0})", primitiveId.getUniqueId()));
         canceled = false;
-        this.children = new HashMap<Long, OsmPrimitiveType>();
+        this.children = new HashMap<>();
         this.children.put(primitiveId.getUniqueId(), primitiveId.getType());
         this.targetLayer = targetLayer;
@@ -215,5 +215,5 @@
         DataSetMerger merger;
         if (!ways.isEmpty()) {
-            Set<Node> nodes = new HashSet<Node>();
+            Set<Node> nodes = new HashSet<>();
             for (Way w: ways) {
                 // Ensure each node is only listed once
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java	(revision 7005)
@@ -44,6 +44,6 @@
  */
 public class DownloadTaskList {
-    private List<DownloadTask> tasks = new LinkedList<DownloadTask>();
-    private List<Future<?>> taskFutures = new LinkedList<Future<?>>();
+    private List<DownloadTask> tasks = new LinkedList<>();
+    private List<Future<?>> taskFutures = new LinkedList<>();
     private ProgressMonitor progressMonitor;
 
@@ -108,5 +108,5 @@
         progressMonitor.beginTask(tr("Updating data"));
         try {
-            List<Rectangle2D> rects = new ArrayList<Rectangle2D>(areas.size());
+            List<Rectangle2D> rects = new ArrayList<>(areas.size());
             for (Area a : areas) {
                 rects.add(a.getBounds2D());
@@ -126,5 +126,5 @@
      */
     protected Set<OsmPrimitive> getCompletePrimitives(DataSet ds) {
-        HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> ret = new HashSet<>();
         for (OsmPrimitive primitive : ds.allPrimitives()) {
             if (!primitive.isIncomplete() && !primitive.isNew()) {
@@ -142,5 +142,5 @@
      */
     protected void updatePotentiallyDeletedPrimitives(Set<OsmPrimitive> potentiallyDeleted) {
-        final List<OsmPrimitive> toSelect = new ArrayList<OsmPrimitive>();
+        final List<OsmPrimitive> toSelect = new ArrayList<>();
         for (OsmPrimitive primitive : potentiallyDeleted) {
             if (primitive != null) {
@@ -216,5 +216,5 @@
      */
     public Set<OsmPrimitive> getDownloadedPrimitives() {
-        HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> ret = new HashSet<>();
         for (DownloadTask task : tasks) {
             if (task instanceof DownloadOsmTask) {
@@ -253,10 +253,10 @@
                 }
             }
-            LinkedHashSet<Object> errors = new LinkedHashSet<Object>();
+            LinkedHashSet<Object> errors = new LinkedHashSet<>();
             for (DownloadTask dt : tasks) {
                 errors.addAll(dt.getErrorObjects());
             }
             if (!errors.isEmpty()) {
-                final Collection<String> items = new ArrayList<String>();
+                final Collection<String> items = new ArrayList<>();
                 for (Object error : errors) {
                     if (error instanceof String) {
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 7005)
@@ -29,5 +29,5 @@
     public PostDownloadHandler(DownloadTask task, Future<?> future) {
         this.task = task;
-        this.futures = new ArrayList<Future<?>>();
+        this.futures = new ArrayList<>();
         if (future != null) {
             this.futures.add(future);
@@ -42,5 +42,5 @@
     public PostDownloadHandler(DownloadTask task, Future<?> ... futures) {
         this.task = task;
-        this.futures = new ArrayList<Future<?>>();
+        this.futures = new ArrayList<>();
         if (futures == null) return;
         for (Future<?> future: futures) {
@@ -56,5 +56,5 @@
     public PostDownloadHandler(DownloadTask task, List<Future<?>> futures) {
         this.task = task;
-        this.futures = new ArrayList<Future<?>>();
+        this.futures = new ArrayList<>();
         if (futures == null) return;
         this.futures.addAll(futures);
@@ -77,5 +77,5 @@
         // make sure errors are reported only once
         //
-        LinkedHashSet<Object> errors = new LinkedHashSet<Object>();
+        LinkedHashSet<Object> errors = new LinkedHashSet<>();
         errors.addAll(task.getErrorObjects());
         if (errors.isEmpty())
@@ -106,5 +106,5 @@
         //
         if (!errors.isEmpty()) {
-            final Collection<String> items = new ArrayList<String>();
+            final Collection<String> items = new ArrayList<>();
             for (Object error:errors) {
                 if (error instanceof String) {
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java	(revision 7005)
@@ -194,5 +194,5 @@
             return;
 
-        Set<OsmPrimitive> newHighlights = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> newHighlights = new HashSet<>();
         DeleteParameters parameters = getDeleteParameters(e, modifiers);
 
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 7005)
@@ -90,13 +90,13 @@
 
     private Node mouseOnExistingNode;
-    private Set<Way> mouseOnExistingWays = new HashSet<Way>();
+    private Set<Way> mouseOnExistingWays = new HashSet<>();
     // old highlights store which primitives are currently highlighted. This
     // is true, even if target highlighting is disabled since the status bar
     // derives its information from this list as well.
-    private Set<OsmPrimitive> oldHighlights = new HashSet<OsmPrimitive>();
+    private Set<OsmPrimitive> oldHighlights = new HashSet<>();
     // new highlights contains a list of primitives that should be highlighted
     // but haven’t been so far. The idea is to compare old and new and only
     // repaint if there are changes.
-    private Set<OsmPrimitive> newHighlights = new HashSet<OsmPrimitive>();
+    private Set<OsmPrimitive> newHighlights = new HashSet<>();
     private boolean drawHelperLine;
     private boolean wayIsFinished = false;
@@ -306,5 +306,5 @@
 
     // events for crossplatform key holding processing
-    private final Set<Integer> set = new TreeSet<Integer>();
+    private final Set<Integer> set = new TreeSet<>();
     private KeyEvent releaseEvent;
     private Timer timer;
@@ -425,10 +425,10 @@
 
         DataSet ds = getCurrentDataSet();
-        Collection<OsmPrimitive> selection = new ArrayList<OsmPrimitive>(ds.getSelected());
-        Collection<Command> cmds = new LinkedList<Command>();
-        Collection<OsmPrimitive> newSelection = new LinkedList<OsmPrimitive>(ds.getSelected());
-
-        List<Way> reuseWays = new ArrayList<Way>(),
-                replacedWays = new ArrayList<Way>();
+        Collection<OsmPrimitive> selection = new ArrayList<>(ds.getSelected());
+        Collection<Command> cmds = new LinkedList<>();
+        Collection<OsmPrimitive> newSelection = new LinkedList<>(ds.getSelected());
+
+        List<Way> reuseWays = new ArrayList<>(),
+                replacedWays = new ArrayList<>();
         boolean newNode = false;
         Node n = null;
@@ -658,5 +658,5 @@
 
     private void insertNodeIntoAllNearbySegments(List<WaySegment> wss, Node n, Collection<OsmPrimitive> newSelection, Collection<Command> cmds, List<Way> replacedWays, List<Way> reuseWays) {
-        Map<Way, List<Integer>> insertPoints = new HashMap<Way, List<Integer>>();
+        Map<Way, List<Integer>> insertPoints = new HashMap<>();
         for (WaySegment ws : wss) {
             List<Integer> is;
@@ -664,5 +664,5 @@
                 is = insertPoints.get(ws.way);
             } else {
-                is = new ArrayList<Integer>();
+                is = new ArrayList<>();
                 insertPoints.put(ws.way, is);
             }
@@ -671,5 +671,5 @@
         }
 
-        Set<Pair<Node,Node>> segSet = new HashSet<Pair<Node,Node>>();
+        Set<Pair<Node,Node>> segSet = new HashSet<>();
 
         for (Map.Entry<Way, List<Integer>> insertPoint : insertPoints.entrySet()) {
@@ -681,5 +681,5 @@
             pruneSuccsAndReverse(is);
             for (int i : is) {
-                segSet.add(Pair.sort(new Pair<Node,Node>(w.getNode(i), w.getNode(i+1))));
+                segSet.add(Pair.sort(new Pair<>(w.getNode(i), w.getNode(i+1))));
             }
             for (int i : is) {
@@ -814,5 +814,5 @@
         Node currentMouseNode = null;
         mouseOnExistingNode = null;
-        mouseOnExistingWays = new HashSet<Way>();
+        mouseOnExistingWays = new HashSet<>();
 
         showStatusInfo(-1, -1, -1, snapHelper.isSnapOn());
@@ -980,5 +980,5 @@
 
     private static void pruneSuccsAndReverse(List<Integer> is) {
-        HashSet<Integer> is2 = new HashSet<Integer>();
+        HashSet<Integer> is2 = new HashSet<>();
         for (int i : is) {
             if (!is2.contains(i - 1) && !is2.contains(i + 1)) {
@@ -1093,5 +1093,5 @@
      */
     private void addHighlighting() {
-        newHighlights = new HashSet<OsmPrimitive>();
+        newHighlights = new HashSet<>();
 
         // if ctrl key is held ("no join"), don't highlight anything
@@ -1132,5 +1132,5 @@
      */
     private boolean removeHighlighting() {
-        newHighlights = new HashSet<OsmPrimitive>();
+        newHighlights = new HashSet<>();
         return redrawIfRequired();
     }
@@ -1570,5 +1570,5 @@
                 if (selectedWays.size()==1) {
                     Way w = selectedWays.iterator().next();
-                    Collection <EastNorth> pointsToProject = new ArrayList<EastNorth>();
+                    Collection <EastNorth> pointsToProject = new ArrayList<>();
                     if (w.getNodesCount()<1000) {
                         for (Node n: w.getNodes()) {
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 7005)
@@ -257,5 +257,5 @@
         if (selectedNode != null) {
             if (ctrl || nodeDragWithoutCtrl) {
-                movingNodeList = new ArrayList<OsmPrimitive>();
+                movingNodeList = new ArrayList<>();
                 movingNodeList.add(selectedNode);
                 calculatePossibleDirectionsByNode();
@@ -270,5 +270,5 @@
             if (ctrl) {
                 mode = Mode.translate;
-                movingNodeList = new ArrayList<OsmPrimitive>();
+                movingNodeList = new ArrayList<>();
                 movingNodeList.add(selectedSegment.getFirstNode());
                 movingNodeList.add(selectedSegment.getSecondNode());
@@ -417,5 +417,5 @@
         if (selectedSegment == null) return;
         // crete a new rectangle
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
         Node third = new Node(newN2en);
         Node fourth = new Node(newN1en);
@@ -441,5 +441,5 @@
     private void performExtrusion() {
         // create extrusion
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
         Way wnew = new Way(selectedSegment.way);
         boolean wayWasModified = false;
@@ -593,5 +593,5 @@
 
         //add direction perpendicular to the selected segment
-        possibleMoveDirections = new ArrayList<ReferenceSegment>();
+        possibleMoveDirections = new ArrayList<>();
         possibleMoveDirections.add(new ReferenceSegment(new EastNorth(
                 initialN1en.getY() - initialN2en.getY(),
@@ -627,5 +627,5 @@
         initialN1en = selectedNode.getEastNorth();
         initialN2en = initialN1en;
-        possibleMoveDirections = new ArrayList<ReferenceSegment>();
+        possibleMoveDirections = new ArrayList<>();
         for (OsmPrimitive p: selectedNode.getReferrers()) {
             if (p instanceof Way  && p.isUsable()) {
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java	(revision 7005)
@@ -389,5 +389,5 @@
                 // Important: If there are other ways containing the same
                 // segment, a node must added to all of that ways.
-                Collection<Command> virtualCmds = new LinkedList<Command>();
+                Collection<Command> virtualCmds = new LinkedList<>();
 
                 // Creating a new node
@@ -406,5 +406,5 @@
                         Way.class);
 
-                Collection<WaySegment> virtualSegments = new LinkedList<WaySegment>();
+                Collection<WaySegment> virtualSegments = new LinkedList<>();
                 for (Way w : firstNodeWays) {
                     List<Pair<Node, Node>> wpps = w.getNodePairs(true);
@@ -456,5 +456,5 @@
                             tr("Error"), JOptionPane.ERROR_MESSAGE);
                 } else {
-                    List<Node> nodeList = new ArrayList<Node>();
+                    List<Node> nodeList = new ArrayList<>();
                     nodeList.add(candidateNode);
                     Command deleteCmd = DeleteCommand.delete(getEditLayer(), nodeList, true);
@@ -600,6 +600,6 @@
      */
     private void updateStateByCurrentSelection() {
-        final List<Node> nodeList = new ArrayList<Node>();
-        final List<Way> wayList = new ArrayList<Way>();
+        final List<Node> nodeList = new ArrayList<>();
+        final List<Way> wayList = new ArrayList<>();
         final Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
 
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java	(revision 7005)
@@ -166,5 +166,5 @@
             Main.warn(ex);
         }
-        sourceWays = new LinkedHashSet<Way>(getCurrentDataSet().getSelectedWays());
+        sourceWays = new LinkedHashSet<>(getCurrentDataSet().getSelectedWays());
         for (Way w : sourceWays) {
             w.setHighlighted(true);
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java	(revision 7005)
@@ -40,5 +40,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<Node, Node>(sourceWays.size());
+        HashMap<Node, Node> splitNodeMap = new HashMap<>(sourceWays.size());
         for (Way w : sourceWays) {
             if (!splitNodeMap.containsKey(w.firstNode())) {
@@ -49,5 +49,5 @@
             }
         }
-        ways = new ArrayList<Way>(sourceWays.size());
+        ways = new ArrayList<>(sourceWays.size());
         for (Way w : sourceWays) {
             Way wCopy = new Way();
@@ -71,6 +71,6 @@
 
         // Fix #8631 - Remove duplicated nodes from graph to be robust with self-intersecting ways
-        Set<Node> removedNodes = new HashSet<Node>();
-        sortedNodes = new ArrayList<Node>();
+        Set<Node> removedNodes = new HashSet<>();
+        sortedNodes = new ArrayList<>();
         for (int i = 0; i < sortedNodesPath.size(); i++) {
             Node n = sortedNodesPath.get(i);
@@ -178,5 +178,5 @@
 
     private List<Command> makeAddWayAndNodesCommandList() {
-        List<Command> commands = new ArrayList<Command>(sortedNodes.size() + ways.size());
+        List<Command> commands = new ArrayList<>(sortedNodes.size() + ways.size());
         for (int i = 0; i < sortedNodes.size() - (isClosedPath() ? 1 : 0); i++) {
             commands.add(new AddCommand(sortedNodes.get(i)));
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 7005)
@@ -160,5 +160,5 @@
      * set would have to be checked.
      */
-    private Set<OsmPrimitive> oldHighlights = new HashSet<OsmPrimitive>();
+    private Set<OsmPrimitive> oldHighlights = new HashSet<>();
 
     /**
@@ -254,5 +254,5 @@
         determineMapMode(!c.isEmpty());
 
-        HashSet<OsmPrimitive> newHighlights = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> newHighlights = new HashSet<>();
 
         virtualManager.clear();
@@ -362,5 +362,5 @@
             prim.setHighlighted(false);
         }
-        oldHighlights = new HashSet<OsmPrimitive>();
+        oldHighlights = new HashSet<>();
         return true;
     }
@@ -846,5 +846,5 @@
             return;
 
-        Collection<Node> nodesToMerge = new LinkedList<Node>(selNodes);
+        Collection<Node> nodesToMerge = new LinkedList<>(selNodes);
         nodesToMerge.add(target);
         MergeNodesAction.doMergeNodes(Main.main.getEditLayer(), nodesToMerge, target);
@@ -1074,5 +1074,5 @@
 
         private Node virtualNode = null;
-        private Collection<WaySegment> virtualWays = new LinkedList<WaySegment>();
+        private Collection<WaySegment> virtualWays = new LinkedList<>();
         private int nodeVirtualSize;
         private int virtualSnapDistSq2;
@@ -1100,6 +1100,6 @@
             if (nodeVirtualSize > 0) {
 
-                Collection<WaySegment> selVirtualWays = new LinkedList<WaySegment>();
-                Pair<Node, Node> vnp = null, wnp = new Pair<Node, Node>(null, null);
+                Collection<WaySegment> selVirtualWays = new LinkedList<>();
+                Pair<Node, Node> vnp = null, wnp = new Pair<>(null, null);
 
                 Way w = null;
@@ -1117,5 +1117,5 @@
                             Pair.sort(wnp);
                             if (vnp == null) {
-                                vnp = new Pair<Node, Node>(wnp.a, wnp.b);
+                                vnp = new Pair<>(wnp.a, wnp.b);
                                 virtualNode = new Node(mv.getLatLon(pc.getX(), pc.getY()));
                             }
@@ -1139,5 +1139,5 @@
 
         private void createMiddleNodeFromVirtual(EastNorth currentEN) {
-            Collection<Command> virtualCmds = new LinkedList<Command>();
+            Collection<Command> virtualCmds = new LinkedList<>();
             virtualCmds.add(new AddCommand(virtualNode));
             for (WaySegment virtualWay : virtualWays) {
Index: trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java	(revision 7005)
@@ -24,12 +24,9 @@
             return Collections.<Relation>emptySet();
         } else {
-            return new SubclassFilteredCollection<OsmPrimitive, Relation>(
+            return new SubclassFilteredCollection<>(
                     primitives, OsmPrimitive.relationPredicate);
         }
     }
     
-    /* (non-Javadoc)
-     * @see org.openstreetmap.josm.actions.relation.RelationAction#setPrimitives
-     */
     @Override
     public void setPrimitives(Collection<? extends OsmPrimitive> primitives) {
Index: trunk/src/org/openstreetmap/josm/actions/relation/AddSelectionToRelations.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/AddSelectionToRelations.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/relation/AddSelectionToRelations.java	(revision 7005)
@@ -31,5 +31,5 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
         for (Relation orig : relations) {
             Command c = GenericRelationEditor.addPrimitivesToRelation(orig, Main.main.getCurrentDataSet().getSelected());
Index: trunk/src/org/openstreetmap/josm/actions/relation/DownloadSelectedIncompleteMembersAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/DownloadSelectedIncompleteMembersAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/relation/DownloadSelectedIncompleteMembersAction.java	(revision 7005)
@@ -38,5 +38,5 @@
      */
     public Set<OsmPrimitive> buildSetOfIncompleteMembers(Collection<Relation> rels) {
-        Set<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         for (Relation r : rels) {
             ret.addAll(r.getIncompleteMembers());
Index: trunk/src/org/openstreetmap/josm/actions/relation/EditRelationAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/EditRelationAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/relation/EditRelationAction.java	(revision 7005)
@@ -41,5 +41,5 @@
      */
     public static Set<RelationMember> getMembersForCurrentSelection(Relation r) {
-        Set<RelationMember> members = new HashSet<RelationMember>();
+        Set<RelationMember> members = new HashSet<>();
         if (Main.isDisplayingMapView()) {
             OsmDataLayer editLayer = Main.main.getEditLayer();
Index: trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java	(revision 7005)
@@ -36,5 +36,5 @@
         if (!isEnabled() || relations.isEmpty() || !Main.isDisplayingMapView()) return;
         
-        HashSet<OsmPrimitive> members = new HashSet<OsmPrimitive>();
+        HashSet<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 7004)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 7005)
@@ -84,5 +84,5 @@
     }
 
-    private static final LinkedList<SearchSetting> searchHistory = new LinkedList<SearchSetting>();
+    private static final LinkedList<SearchSetting> searchHistory = new LinkedList<>();
     static {
         for (String s: Main.pref.getCollection("search.history", Collections.<String>emptyList())) {
@@ -110,5 +110,5 @@
             searchHistory.removeLast();
         }
-        LinkedHashSet<String> savedHistory = new LinkedHashSet<String>(searchHistory.size());
+        LinkedHashSet<String> savedHistory = new LinkedHashSet<>(searchHistory.size());
         for (SearchSetting item: searchHistory) {
             savedHistory.add(item.writeToString());
@@ -118,5 +118,5 @@
 
     public static List<String> getSearchExpressionHistory() {
-        List<String> ret = new ArrayList<String>(getSearchHistory().size());
+        List<String> ret = new ArrayList<>(getSearchHistory().size());
         for (SearchSetting ss: getSearchHistory()) {
             ret.add(ss.text);
@@ -582,5 +582,5 @@
 
         final DataSet ds = Main.main.getCurrentDataSet();
-        Collection<OsmPrimitive> sel = new HashSet<OsmPrimitive>(ds.getAllSelected());
+        Collection<OsmPrimitive> sel = new HashSet<>(ds.getAllSelected());
         int foundMatches = getSelection(s, sel, new Predicate<OsmPrimitive>(){
             @Override
Index: trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 7005)
@@ -59,7 +59,7 @@
     private static String  rxErrorMsgNoPos = marktr("The regex \"{0}\" had a parse error, full error:\n\n{1}");
     private PushbackTokenizer tokenizer;
-    private static Map<String, SimpleMatchFactory> simpleMatchFactoryMap = new HashMap<String, SimpleMatchFactory>();
-    private static Map<String, UnaryMatchFactory> unaryMatchFactoryMap = new HashMap<String, UnaryMatchFactory>();
-    private static Map<String, BinaryMatchFactory> binaryMatchFactoryMap = new HashMap<String, BinaryMatchFactory>();
+    private static Map<String, SimpleMatchFactory> simpleMatchFactoryMap = new HashMap<>();
+    private static Map<String, UnaryMatchFactory> unaryMatchFactoryMap = new HashMap<>();
+    private static Map<String, BinaryMatchFactory> binaryMatchFactoryMap = new HashMap<>();
 
     public SearchCompiler(boolean caseSensitive, boolean regexSearch, PushbackTokenizer tokenizer) {
Index: trunk/src/org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java	(revision 7005)
@@ -45,5 +45,5 @@
 
     public List<Relation> getCyclicUploadDependency() {
-        return new ArrayList<Relation>(cycle);
+        return new ArrayList<>(cycle);
     }
 }
Index: trunk/src/org/openstreetmap/josm/actions/upload/DiscardTagsHook.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/upload/DiscardTagsHook.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/upload/DiscardTagsHook.java	(revision 7005)
@@ -24,5 +24,5 @@
     public boolean checkUpload(APIDataSet apiDataSet) {
         List<OsmPrimitive> objectsToUpload = apiDataSet.getPrimitives();
-        Collection<String> discardableKeys = new HashSet<String>(OsmPrimitive.getDiscardableKeys());
+        Collection<String> discardableKeys = new HashSet<>(OsmPrimitive.getDiscardableKeys());
 
         boolean needsChange = false;
@@ -37,5 +37,5 @@
 
         if (needsChange) {
-            AbstractMap<String, String> map = new HashMap<String, String>();
+            AbstractMap<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 7004)
+++ trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java	(revision 7005)
@@ -30,5 +30,5 @@
      * List of checks to run on data
      */
-    private List<FixData> deprecated = new LinkedList<FixData>();
+    private List<FixData> deprecated = new LinkedList<>();
 
     /**
@@ -76,5 +76,5 @@
         @Override
         public boolean fixKeys(Map<String, String> keys, OsmPrimitive osm) {
-            Map<String, String> newKeys = new HashMap<String, String>(keys);
+            Map<String, String> newKeys = new HashMap<>(keys);
             for (Entry<String, String> e : keys.entrySet()) {
                 String v = Tag.removeWhiteSpaces(e.getValue());
@@ -184,5 +184,5 @@
 
         List<OsmPrimitive> objectsToUpload = apiDataSet.getPrimitives();
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
 
         for (OsmPrimitive osm : objectsToUpload) {
@@ -195,5 +195,5 @@
                 }
                 if(modified)
-                    cmds.add(new ChangePropertyCommand(Collections.singleton(osm), new HashMap<String, String>(keys)));
+                    cmds.add(new ChangePropertyCommand(Collections.singleton(osm), new HashMap<>(keys)));
             }
         }
Index: trunk/src/org/openstreetmap/josm/actions/upload/ValidateUploadHook.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/upload/ValidateUploadHook.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/actions/upload/ValidateUploadHook.java	(revision 7005)
@@ -54,5 +54,5 @@
         Collection<OsmPrimitive> selection = v.visit(apiDataSet.getPrimitivesToUpdate());
 
-        List<TestError> errors = new ArrayList<TestError>(30);
+        List<TestError> errors = new ArrayList<>(30);
         for (Test test : tests) {
             test.setBeforeUpload(true);
@@ -83,5 +83,5 @@
             int nume = 0;
             for (TestError error : errors) {
-                List<String> s = new ArrayList<String>();
+                List<String> s = new ArrayList<>();
                 s.add(error.getIgnoreState());
                 s.add(error.getIgnoreGroup());
Index: trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java	(revision 7005)
@@ -24,6 +24,6 @@
 public class AddPrimitivesCommand extends Command {
 
-    private List<PrimitiveData> data = new ArrayList<PrimitiveData>();
-    private Collection<PrimitiveData> toSelect = new ArrayList<PrimitiveData>();
+    private List<PrimitiveData> data = new ArrayList<>();
+    private Collection<PrimitiveData> toSelect = new ArrayList<>();
 
     // only filled on undo
@@ -71,6 +71,6 @@
         Collection<OsmPrimitive> primitivesToSelect;
         if (createdPrimitives == null) { // first time execution
-            List<OsmPrimitive> newPrimitives = new ArrayList<OsmPrimitive>(data.size());
-            primitivesToSelect = new ArrayList<OsmPrimitive>(toSelect.size());
+            List<OsmPrimitive> newPrimitives = new ArrayList<>(data.size());
+            primitivesToSelect = new ArrayList<>(toSelect.size());
 
             for (PrimitiveData pd : data) {
@@ -115,6 +115,6 @@
 
         if (createdPrimitives == null) {
-            createdPrimitives = new ArrayList<OsmPrimitive>(data.size());
-            createdPrimitivesToSelect = new ArrayList<OsmPrimitive>(toSelect.size());
+            createdPrimitives = new ArrayList<>(data.size());
+            createdPrimitivesToSelect = new ArrayList<>(toSelect.size());
 
             for (PrimitiveData pd : data) {
@@ -162,5 +162,5 @@
             return createdPrimitives;
 
-        Collection<OsmPrimitive> prims = new HashSet<OsmPrimitive>();
+        Collection<OsmPrimitive> prims = new HashSet<>();
         for (PrimitiveData d : data) {
             OsmPrimitive osm = getLayer().data.getPrimitiveById(d);
Index: trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 7005)
@@ -49,5 +49,5 @@
      */
     public ChangePropertyCommand(Collection<? extends OsmPrimitive> objects, AbstractMap<String, String> tags) {
-        this.objects = new LinkedList<OsmPrimitive>();
+        this.objects = new LinkedList<>();
         this.tags = tags;
         init(objects);
@@ -62,6 +62,6 @@
      */
     public ChangePropertyCommand(Collection<? extends OsmPrimitive> objects, String key, String value) {
-        this.objects = new LinkedList<OsmPrimitive>();
-        this.tags = new HashMap<String, String>(1);
+        this.objects = new LinkedList<>();
+        this.tags = new HashMap<>(1);
         this.tags.put(key, value);
         init(objects);
@@ -201,5 +201,5 @@
         if (objects.size() == 1)
             return null;
-        List<PseudoCommand> children = new ArrayList<PseudoCommand>();
+        List<PseudoCommand> children = new ArrayList<>();
         for (final OsmPrimitive osm : objects) {
             children.add(new PseudoCommand() {
Index: trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java	(revision 7005)
@@ -54,5 +54,5 @@
      */
     public ChangePropertyKeyCommand(Collection<? extends OsmPrimitive> objects, String key, String newKey) {
-        this.objects = new LinkedList<OsmPrimitive>(objects);
+        this.objects = new LinkedList<>(objects);
         this.key = key;
         this.newKey = newKey;
@@ -101,5 +101,5 @@
         if (objects.size() == 1)
             return null;
-        List<PseudoCommand> children = new ArrayList<PseudoCommand>();
+        List<PseudoCommand> children = new ArrayList<>();
 
         final NameVisitor v = new NameVisitor();
Index: trunk/src/org/openstreetmap/josm/command/Command.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/Command.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/command/Command.java	(revision 7005)
@@ -39,5 +39,5 @@
 
     private static final class CloneVisitor extends AbstractVisitor {
-        public final Map<OsmPrimitive, PrimitiveData> orig = new LinkedHashMap<OsmPrimitive, PrimitiveData>();
+        public final Map<OsmPrimitive, PrimitiveData> orig = new LinkedHashMap<>();
 
         @Override
@@ -76,5 +76,5 @@
 
     /** the map of OsmPrimitives in the original state to OsmPrimitives in cloned state */
-    private Map<OsmPrimitive, PrimitiveData> cloneMap = new HashMap<OsmPrimitive, PrimitiveData>();
+    private Map<OsmPrimitive, PrimitiveData> cloneMap = new HashMap<>();
 
     /** the layer which this command is applied to */
@@ -106,5 +106,5 @@
     public boolean executeCommand() {
         CloneVisitor visitor = new CloneVisitor();
-        Collection<OsmPrimitive> all = new ArrayList<OsmPrimitive>();
+        Collection<OsmPrimitive> all = new ArrayList<>();
         fillModifiedData(all, all, all);
         for (OsmPrimitive osm : all) {
Index: trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 7005)
@@ -51,5 +51,5 @@
      */
     private final Collection<? extends OsmPrimitive> toDelete;
-    private final Map<OsmPrimitive, PrimitiveData> clonedPrimitives = new HashMap<OsmPrimitive, PrimitiveData>();
+    private final Map<OsmPrimitive, PrimitiveData> clonedPrimitives = new HashMap<>();
 
     /**
@@ -150,5 +150,5 @@
 
     private Set<OsmPrimitiveType> getTypesToDelete() {
-        Set<OsmPrimitiveType> typesToDelete = new HashSet<OsmPrimitiveType>();
+        Set<OsmPrimitiveType> typesToDelete = new HashSet<>();
         for (OsmPrimitive osm : toDelete) {
             typesToDelete.add(OsmPrimitiveType.from(osm));
@@ -201,5 +201,5 @@
             return null;
         else {
-            List<PseudoCommand> children = new ArrayList<PseudoCommand>(toDelete.size());
+            List<PseudoCommand> children = new ArrayList<>(toDelete.size());
             for (final OsmPrimitive osm : toDelete) {
                 children.add(new PseudoCommand() {
@@ -278,5 +278,5 @@
      */
     protected static Collection<Node> computeNodesToDelete(OsmDataLayer layer, Collection<OsmPrimitive> primitivesToDelete) {
-        Collection<Node> nodesToDelete = new HashSet<Node>();
+        Collection<Node> nodesToDelete = new HashSet<>();
         for (Way way : OsmPrimitive.getFilteredList(primitivesToDelete, Way.class)) {
             for (Node n : way.getNodes()) {
@@ -339,5 +339,5 @@
             return null;
 
-        Set<OsmPrimitive> primitivesToDelete = new HashSet<OsmPrimitive>(selection);
+        Set<OsmPrimitive> primitivesToDelete = new HashSet<>(selection);
 
         Collection<Relation> relationsToDelete = Utils.filteredCollection(primitivesToDelete, Relation.class);
@@ -345,5 +345,5 @@
             return null;
 
-        Collection<Way> waysToBeChanged = new HashSet<Way>();
+        Collection<Way> waysToBeChanged = new HashSet<>();
 
         if (alsoDeleteNodesInWay) {
@@ -359,5 +359,5 @@
         waysToBeChanged.addAll(OsmPrimitive.getFilteredSet(OsmPrimitive.getReferrer(primitivesToDelete), Way.class));
 
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
         for (Way w : waysToBeChanged) {
             Way wnew = new Way(w);
@@ -415,5 +415,5 @@
             // the way shouldn't be splitted
 
-            List<Node> n = new ArrayList<Node>();
+            List<Node> n = new ArrayList<>();
 
             n.addAll(ws.way.getNodes().subList(ws.lowerIndex + 1, ws.way.getNodesCount() - 1));
@@ -426,5 +426,5 @@
         }
 
-        List<Node> n1 = new ArrayList<Node>(), n2 = new ArrayList<Node>();
+        List<Node> n1 = new ArrayList<>(), n2 = new ArrayList<>();
 
         n1.addAll(ws.way.getNodes().subList(0, ws.lowerIndex + 1));
@@ -440,5 +440,5 @@
             return new ChangeCommand(ws.way, wnew);
         } else {
-            List<List<Node>> chunks = new ArrayList<List<Node>>(2);
+            List<List<Node>> chunks = new ArrayList<>(2);
             chunks.add(n1);
             chunks.add(n2);
Index: trunk/src/org/openstreetmap/josm/command/MoveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/MoveCommand.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/command/MoveCommand.java	(revision 7005)
@@ -30,5 +30,5 @@
      * The objects that should be moved.
      */
-    private Collection<Node> nodes = new LinkedList<Node>();
+    private Collection<Node> nodes = new LinkedList<>();
     /**
      * Starting position, base command point, current (mouse-drag) position = startEN + (x,y) =
@@ -51,5 +51,5 @@
      * List of all old states of the objects.
      */
-    private List<OldNodeState> oldState = new LinkedList<OldNodeState>();
+    private List<OldNodeState> oldState = new LinkedList<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/command/PurgeCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/PurgeCommand.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/command/PurgeCommand.java	(revision 7005)
@@ -68,5 +68,5 @@
 
     protected final void saveIncomplete(Collection<OsmPrimitive> makeIncomplete) {
-        makeIncompleteData = new Storage<PrimitiveData>(new Storage.PrimitiveIdHash());
+        makeIncompleteData = new Storage<>(new Storage.PrimitiveIdHash());
         makeIncompleteData_byPrimId = makeIncompleteData.foreignKey(new Storage.PrimitiveIdHash());
 
@@ -143,10 +143,10 @@
      */
     public static List<OsmPrimitive> topoSort(Collection<OsmPrimitive> sel) {
-        Set<OsmPrimitive> in = new HashSet<OsmPrimitive>(sel);
-
-        List<OsmPrimitive> out = new ArrayList<OsmPrimitive>(in.size());
+        Set<OsmPrimitive> in = new HashSet<>(sel);
+
+        List<OsmPrimitive> out = new ArrayList<>(in.size());
 
         // Nodes not deleted in the first pass
-        Set<OsmPrimitive> remainingNodes = new HashSet<OsmPrimitive>(in.size());
+        Set<OsmPrimitive> remainingNodes = new HashSet<>(in.size());
 
         /**
@@ -198,8 +198,8 @@
         @SuppressWarnings({ "unchecked", "rawtypes" })
         Set<Relation> inR = (Set) in;
-        Set<Relation> childlessR = new HashSet<Relation>();
-        List<Relation> outR = new ArrayList<Relation>(inR.size());
-
-        HashMap<Relation, Integer> numChilds = new HashMap<Relation, Integer>();
+        Set<Relation> childlessR = new HashSet<>();
+        List<Relation> outR = new ArrayList<>(inR.size());
+
+        HashMap<Relation, Integer> numChilds = new HashMap<>();
 
         // calculate initial number of childs
Index: trunk/src/org/openstreetmap/josm/command/RemoveNodesCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/RemoveNodesCommand.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/command/RemoveNodesCommand.java	(revision 7005)
@@ -37,5 +37,5 @@
     public RemoveNodesCommand(Way way, List<Node> rmNodes) {
         this.way = way;
-        this.rmNodes = new HashSet<Node>(rmNodes);
+        this.rmNodes = new HashSet<>(rmNodes);
     }
 
Index: trunk/src/org/openstreetmap/josm/command/SequenceCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/SequenceCommand.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/command/SequenceCommand.java	(revision 7005)
@@ -108,5 +108,5 @@
     @Override
     public Collection<? extends OsmPrimitive> getParticipatingPrimitives() {
-        Collection<OsmPrimitive> prims = new HashSet<OsmPrimitive>();
+        Collection<OsmPrimitive> prims = new HashSet<>();
         for (Command c : sequence) {
             prims.addAll(c.getParticipatingPrimitives());
Index: trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java	(revision 7005)
@@ -27,5 +27,5 @@
      * The nodes to transform.
      */
-    protected Collection<Node> nodes = new LinkedList<Node>();
+    protected Collection<Node> nodes = new LinkedList<>();
 
 
@@ -33,5 +33,5 @@
      * List of all old states of the nodes.
      */
-    protected Map<Node, OldNodeState> oldStates = new HashMap<Node, OldNodeState>();
+    protected Map<Node, OldNodeState> oldStates = new HashMap<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java	(revision 7005)
@@ -46,5 +46,5 @@
     }
 
-    private static final Collection<Pattern> ignoredKeys = new ArrayList<Pattern>();
+    private static final Collection<Pattern> ignoredKeys = new ArrayList<>();
     static {
         for (String s : OsmPrimitive.getUninterestingKeys()) {
@@ -176,5 +176,5 @@
 
     public static List<Way> irreversibleWays(List<Way> ways) {
-        List<Way> newWays = new ArrayList<Way>(ways);
+        List<Way> newWays = new ArrayList<>(ways);
         for (Way way : ways) {
             if (isReversible(way)) {
@@ -197,8 +197,7 @@
     @Override
     public Collection<Command> execute(Way oldway, Way way) throws UserCancelException {
-        Map<OsmPrimitive, List<TagCorrection>> tagCorrectionsMap =
-            new HashMap<OsmPrimitive, List<TagCorrection>>();
-
-        List<TagCorrection> tagCorrections = new ArrayList<TagCorrection>();
+        Map<OsmPrimitive, List<TagCorrection>> tagCorrectionsMap = new HashMap<>();
+
+        List<TagCorrection> tagCorrections = new ArrayList<>();
         for (String key : way.keySet()) {
             String value = way.get(key);
@@ -223,7 +222,6 @@
         }
 
-        Map<OsmPrimitive, List<RoleCorrection>> roleCorrectionMap =
-            new HashMap<OsmPrimitive, List<RoleCorrection>>();
-        List<RoleCorrection> roleCorrections = new ArrayList<RoleCorrection>();
+        Map<OsmPrimitive, List<RoleCorrection>> roleCorrectionMap = new HashMap<>();
+        List<RoleCorrection> roleCorrections = new ArrayList<>();
 
         Collection<OsmPrimitive> referrers = oldway.getReferrers();
Index: trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java	(revision 7005)
@@ -57,9 +57,7 @@
 
         if (!tagCorrectionsMap.isEmpty() || !roleCorrectionMap.isEmpty()) {
-            Collection<Command> commands = new ArrayList<Command>();
-            Map<OsmPrimitive, TagCorrectionTable> tagTableMap =
-                new HashMap<OsmPrimitive, TagCorrectionTable>();
-            Map<OsmPrimitive, RoleCorrectionTable> roleTableMap =
-                new HashMap<OsmPrimitive, RoleCorrectionTable>();
+            Collection<Command> commands = new ArrayList<>();
+            Map<OsmPrimitive, TagCorrectionTable> tagTableMap = new HashMap<>();
+            Map<OsmPrimitive, RoleCorrectionTable> roleTableMap = new HashMap<>();
 
             final JPanel p = new JPanel(new GridBagLayout());
@@ -108,6 +106,5 @@
                 }
 
-                final JLabel rolesLabel = new JLabel(
-                        tr("Roles in relations referring to"));
+                final JLabel rolesLabel = new JLabel(tr("Roles in relations referring to"));
                 p.add(rolesLabel, GBC.std());
 
@@ -119,6 +116,5 @@
                 p.add(primitiveLabel, GBC.eol());
 
-                final RoleCorrectionTable table = new RoleCorrectionTable(
-                        roleCorrections);
+                final RoleCorrectionTable table = new RoleCorrectionTable(roleCorrections);
                 final JScrollPane scrollPane = new JScrollPane(table);
                 p.add(scrollPane, GBC.eop().fill(GBC.HORIZONTAL));
@@ -156,5 +152,5 @@
                     // use this structure to remember keys that have been set already so that
                     // they're not dropped by a later step
-                    Set<String> keysChanged = new HashSet<String>();
+                    Set<String> keysChanged = new HashSet<>();
 
                     // apply all changes to this clone
Index: trunk/src/org/openstreetmap/josm/data/APIDataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/APIDataSet.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/APIDataSet.java	(revision 7005)
@@ -44,7 +44,7 @@
      */
     public APIDataSet() {
-        toAdd = new LinkedList<OsmPrimitive>();
-        toUpdate = new LinkedList<OsmPrimitive>();
-        toDelete = new LinkedList<OsmPrimitive>();
+        toAdd = new LinkedList<>();
+        toUpdate = new LinkedList<>();
+        toDelete = new LinkedList<>();
     }
 
@@ -122,5 +122,5 @@
     public boolean participatesInConflict(ConflictCollection conflicts) {
         if (conflicts == null || conflicts.isEmpty()) return false;
-        Set<PrimitiveId> idsParticipatingInConflicts = new HashSet<PrimitiveId>();
+        Set<PrimitiveId> idsParticipatingInConflicts = new HashSet<>();
         for (OsmPrimitive p: conflicts.getMyConflictParties()) {
             idsParticipatingInConflicts.add(p.getPrimitiveId());
@@ -190,5 +190,5 @@
      */
     public List<OsmPrimitive> getPrimitives() {
-        LinkedList<OsmPrimitive> ret = new LinkedList<OsmPrimitive>();
+        LinkedList<OsmPrimitive> ret = new LinkedList<>();
         ret.addAll(toAdd);
         ret.addAll(toUpdate);
@@ -223,9 +223,9 @@
      */
     public void adjustRelationUploadOrder() throws CyclicUploadDependencyException{
-        LinkedList<OsmPrimitive> newToAdd = new LinkedList<OsmPrimitive>();
+        LinkedList<OsmPrimitive> newToAdd = new LinkedList<>();
         newToAdd.addAll(Utils.filteredCollection(toAdd, Node.class));
         newToAdd.addAll(Utils.filteredCollection(toAdd, Way.class));
 
-        List<Relation> relationsToAdd = new ArrayList<Relation>(Utils.filteredCollection(toAdd, Relation.class));
+        List<Relation> relationsToAdd = new ArrayList<>(Utils.filteredCollection(toAdd, Relation.class));
         List<Relation> noProblemRelations = filterRelationsNotReferringToNewRelations(relationsToAdd);
         newToAdd.addAll(noProblemRelations);
@@ -236,5 +236,5 @@
         toAdd = newToAdd;
 
-        LinkedList<OsmPrimitive> newToDelete = new LinkedList<OsmPrimitive>();
+        LinkedList<OsmPrimitive> newToDelete = new LinkedList<>();
         graph = new RelationUploadDependencyGraph(Utils.filteredCollection(toDelete, Relation.class), false);
         newToDelete.addAll(graph.computeUploadOrder());
@@ -253,5 +253,5 @@
      */
     protected List<Relation> filterRelationsNotReferringToNewRelations(Collection<Relation> relations) {
-        List<Relation> ret = new LinkedList<Relation>();
+        List<Relation> ret = new LinkedList<>();
         for (Relation relation: relations) {
             boolean refersToNewRelation = false;
@@ -275,7 +275,7 @@
      */
     private static class RelationUploadDependencyGraph {
-        private Map<Relation, Set<Relation>> children = new HashMap<Relation, Set<Relation>>();
+        private Map<Relation, Set<Relation>> children = new HashMap<>();
         private Collection<Relation> relations;
-        private Set<Relation> visited = new HashSet<Relation>();
+        private Set<Relation> visited = new HashSet<>();
         private List<Relation> uploadOrder;
         private final boolean newOrUndeleted;
@@ -287,5 +287,5 @@
 
         public final void build(Collection<Relation> relations) {
-            this.relations = new HashSet<Relation>();
+            this.relations = new HashSet<>();
             for(Relation relation: relations) {
                 if (newOrUndeleted ? !relation.isNewOrUndeleted() : !relation.isDeleted()) {
@@ -304,5 +304,5 @@
             Set<Relation> p = children.get(relation);
             if (p == null) {
-                p = new HashSet<Relation>();
+                p = new HashSet<>();
                 children.put(relation, p);
             }
@@ -331,11 +331,11 @@
 
         public List<Relation> computeUploadOrder() throws CyclicUploadDependencyException {
-            visited = new HashSet<Relation>();
-            uploadOrder = new LinkedList<Relation>();
-            Stack<Relation> path = new Stack<Relation>();
+            visited = new HashSet<>();
+            uploadOrder = new LinkedList<>();
+            Stack<Relation> path = new Stack<>();
             for (Relation relation: relations) {
                 visit(path, relation);
             }
-            List<Relation> ret = new ArrayList<Relation>(relations);
+            List<Relation> ret = new ArrayList<>(relations);
             Collections.sort(
                     ret,
Index: trunk/src/org/openstreetmap/josm/data/AutosaveTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/AutosaveTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/AutosaveTask.java	(revision 7005)
@@ -76,13 +76,13 @@
         String layerName;
         String layerFileName;
-        final Deque<File> backupFiles = new LinkedList<File>();
+        final Deque<File> backupFiles = new LinkedList<>();
     }
 
     private final DataSetListenerAdapter datasetAdapter = new DataSetListenerAdapter(this);
-    private final Set<DataSet> changedDatasets = new HashSet<DataSet>();
-    private final List<AutosaveLayerInfo> layersInfo = new ArrayList<AutosaveLayerInfo>();
+    private final Set<DataSet> changedDatasets = new HashSet<>();
+    private final List<AutosaveLayerInfo> layersInfo = new ArrayList<>();
     private Timer timer;
     private final Object layersLock = new Object();
-    private final Deque<File> deletedLayers = new LinkedList<File>();
+    private final Deque<File> deletedLayers = new LinkedList<>();
 
     private final File autosaveDir = new File(Main.pref.getPreferencesDir() + AUTOSAVE_DIR);
@@ -300,5 +300,5 @@
      */
     public List<File> getUnsavedLayersFiles() {
-        List<File> result = new ArrayList<File>();
+        List<File> result = new ArrayList<>();
         File[] files = autosaveDir.listFiles(OsmImporter.FILE_FILTER);
         if (files == null)
Index: trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 7005)
@@ -201,5 +201,5 @@
      */
     public static void exportPreferencesKeysToFile(String filename, boolean append, String... keys) {
-        HashSet<String> keySet = new HashSet<String>();
+        HashSet<String> keySet = new HashSet<>();
         Collections.addAll(keySet, keys);
         exportPreferencesKeysToFile(filename, append, keySet);
@@ -215,5 +215,5 @@
      */
     public static void exportPreferencesKeysByPatternToFile(String fileName, boolean append, String pattern) {
-        List<String> keySet = new ArrayList<String>();
+        List<String> keySet = new ArrayList<>();
         Map<String, Setting> allSettings = Main.pref.getAllSettings();
         for (String key: allSettings.keySet()) {
@@ -317,7 +317,7 @@
 
     public static void pluginOperation(String install, String uninstall, String delete)  {
-        final List<String> installList = new ArrayList<String>();
-        final List<String> removeList = new ArrayList<String>();
-        final List<String> deleteList = new ArrayList<String>();
+        final List<String> installList = new ArrayList<>();
+        final List<String> removeList = new ArrayList<>();
+        final List<String> deleteList = new ArrayList<>();
         Collections.addAll(installList, install.toLowerCase().split(";"));
         Collections.addAll(removeList, uninstall.toLowerCase().split(";"));
@@ -351,7 +351,7 @@
                     public void run() {
                         List<PluginInformation> availablePlugins = task.getAvailablePlugins();
-                        List<PluginInformation> toInstallPlugins = new ArrayList<PluginInformation>();
-                        List<PluginInformation> toRemovePlugins = new ArrayList<PluginInformation>();
-                        List<PluginInformation> toDeletePlugins = new ArrayList<PluginInformation>();
+                        List<PluginInformation> toInstallPlugins = new ArrayList<>();
+                        List<PluginInformation> toRemovePlugins = new ArrayList<>();
+                        List<PluginInformation> toDeletePlugins = new ArrayList<>();
                         for (PluginInformation pi: availablePlugins) {
                             String name = pi.name.toLowerCase();
@@ -364,5 +364,5 @@
                             Main.worker.submit(pluginDownloadTask);
                         }
-                        Collection<String> pls = new ArrayList<String>(Main.pref.getCollection("plugins"));
+                        Collection<String> pls = new ArrayList<>(Main.pref.getCollection("plugins"));
                         for (PluginInformation pi: toInstallPlugins) {
                             if (!pls.contains(pi.name)) {
@@ -415,5 +415,5 @@
 
         Preferences mainPrefs;
-        Map<String,Element> tasksMap = new HashMap<String,Element>();
+        Map<String,Element> tasksMap = new HashMap<>();
 
         private boolean lastV; // last If condition result
@@ -888,7 +888,7 @@
         }
         if (existing != null)
-            return new ArrayList<String>(existing.getValue());
+            return new ArrayList<>(existing.getValue());
         else
-            return defaults.getValue() == null ? null : new ArrayList<String>(defaults.getValue());
+            return defaults.getValue() == null ? null : new ArrayList<>(defaults.getValue());
     }
 
@@ -917,7 +917,7 @@
 
         if (existing != null)
-            return new ArrayList<Map<String, String>>(existing.getValue());
+            return new ArrayList<>(existing.getValue());
         else
-            return defaults.getValue() == null ? null : new ArrayList<Map<String, String>>(defaults.getValue());
+            return defaults.getValue() == null ? null : new ArrayList<>(defaults.getValue());
     }
 
@@ -1003,5 +1003,5 @@
         tmpPref.settingsMap.clear();
 
-        Map<String, Setting> tmp = new HashMap<String, Setting>();
+        Map<String, Setting> tmp = new HashMap<>();
         for (Entry<String, String> e : stringMap.entrySet()) {
             tmp.put(e.getKey(), new StringSetting(e.getValue()));
@@ -1033,8 +1033,8 @@
      */
     public static void loadPrefsToJS(ScriptEngine engine, Preferences tmpPref, String whereToPutInJS, boolean includeDefaults) throws ScriptException {
-        Map<String, String> stringMap =  new TreeMap<String, String>();
-        Map<String, List<String>> listMap = new TreeMap<String, List<String>>();
-        Map<String, List<List<String>>> listlistMap = new TreeMap<String, List<List<String>>>();
-        Map<String, List<Map<String, String>>> listmapMap = new TreeMap<String, List<Map<String, String>>>();
+        Map<String, String> stringMap =  new TreeMap<>();
+        Map<String, List<String>> listMap = new TreeMap<>();
+        Map<String, List<List<String>>> listlistMap = new TreeMap<>();
+        Map<String, List<Map<String, String>>> listmapMap = new TreeMap<>();
 
         if (includeDefaults) {
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 7005)
@@ -93,5 +93,5 @@
      * must not have a null value.
      */
-    protected final SortedMap<String, Setting> settingsMap = new TreeMap<String, Setting>();
+    protected final SortedMap<String, Setting> settingsMap = new TreeMap<>();
     /**
      * Map the setting name to the default value of the setting.
@@ -99,7 +99,7 @@
      * setting objects can be null.
      */
-    protected final SortedMap<String, Setting> defaultsMap = new TreeMap<String, Setting>();
+    protected final SortedMap<String, Setting> defaultsMap = new TreeMap<>();
     // maps color keys to human readable color name
-    protected final SortedMap<String, String> colornames = new TreeMap<String, String>();
+    protected final SortedMap<String, String> colornames = new TreeMap<>();
 
     /**
@@ -219,5 +219,5 @@
          */
         public static ListSetting create(Collection<String> value) {
-            return new ListSetting(value == null ? null : Collections.unmodifiableList(new ArrayList<String>(value)));
+            return new ListSetting(value == null ? null : Collections.unmodifiableList(new ArrayList<>(value)));
         }
         @Override public boolean equalVal(List<String> otherVal) {
@@ -276,7 +276,7 @@
         public static ListListSetting create(Collection<Collection<String>> value) {
             if (value != null) {
-                List<List<String>> valueList = new ArrayList<List<String>>(value.size());
+                List<List<String>> valueList = new ArrayList<>(value.size());
                 for (Collection<String> lst : value) {
-                    valueList.add(new ArrayList<String>(lst));
+                    valueList.add(new ArrayList<>(lst));
                 }
                 return new ListListSetting(valueList);
@@ -298,7 +298,7 @@
             if (value == null) return new ListListSetting(null);
 
-            List<List<String>> copy = new ArrayList<List<String>>(value.size());
+            List<List<String>> copy = new ArrayList<>(value.size());
             for (Collection<String> lst : value) {
-                List<String> lstCopy = new ArrayList<String>(lst);
+                List<String> lstCopy = new ArrayList<>(lst);
                 copy.add(Collections.unmodifiableList(lstCopy));
             }
@@ -359,7 +359,7 @@
         @Override public MapListSetting copy() {
             if (value == null) return new MapListSetting(null);
-            List<Map<String, String>> copy = new ArrayList<Map<String, String>>(value.size());
+            List<Map<String, String>> copy = new ArrayList<>(value.size());
             for (Map<String, String> map : value) {
-                Map<String, String> mapCopy = new LinkedHashMap<String,String>(map);
+                Map<String, String> mapCopy = new LinkedHashMap<>(map);
                 copy.add(Collections.unmodifiableMap(mapCopy));
             }
@@ -435,5 +435,5 @@
     }
 
-    private final CopyOnWriteArrayList<PreferenceChangedListener> listeners = new CopyOnWriteArrayList<PreferenceChangedListener>();
+    private final CopyOnWriteArrayList<PreferenceChangedListener> listeners = new CopyOnWriteArrayList<>();
 
     public void addPreferenceChangeListener(PreferenceChangedListener listener) {
@@ -541,5 +541,5 @@
      */
     public Collection<String> getAllPossiblePreferenceDirs() {
-        LinkedList<String> locations = new LinkedList<String>();
+        LinkedList<String> locations = new LinkedList<>();
         locations.add(getPreferencesDir());
         String s;
@@ -594,5 +594,5 @@
 
     public synchronized Map<String, String> getAllPrefix(final String prefix) {
-        final Map<String,String> all = new TreeMap<String,String>();
+        final Map<String,String> all = new TreeMap<>();
         for (final Entry<String,Setting> e : settingsMap.entrySet()) {
             if (e.getKey().startsWith(prefix) && (e.getValue() instanceof StringSetting)) {
@@ -604,5 +604,5 @@
 
     public synchronized List<String> getAllPrefixCollectionKeys(final String prefix) {
-        final List<String> all = new LinkedList<String>();
+        final List<String> all = new LinkedList<>();
         for (Map.Entry<String, Setting> entry : settingsMap.entrySet()) {
             if (entry.getKey().startsWith(prefix) && entry.getValue() instanceof ListSetting) {
@@ -614,5 +614,5 @@
 
     public synchronized Map<String, String> getAllColors() {
-        final Map<String,String> all = new TreeMap<String,String>();
+        final Map<String,String> all = new TreeMap<>();
         for (final Entry<String,Setting> e : defaultsMap.entrySet()) {
             if (e.getKey().startsWith("color.") && e.getValue() instanceof StringSetting) {
@@ -972,5 +972,5 @@
 
     public synchronized void removeFromCollection(String key, String value) {
-        List<String> a = new ArrayList<String>(getCollection(key, Collections.<String>emptyList()));
+        List<String> a = new ArrayList<>(getCollection(key, Collections.<String>emptyList()));
         a.remove(value);
         putCollection(key, a);
@@ -1059,5 +1059,5 @@
      */
     public boolean putCollectionBounded(String key, int maxsize, Collection<String> val) {
-        Collection<String> newCollection = new ArrayList<String>(Math.min(maxsize, val.size()));
+        Collection<String> newCollection = new ArrayList<>(Math.min(maxsize, val.size()));
         for (String i : val) {
             if (newCollection.size() >= maxsize) {
@@ -1089,9 +1089,9 @@
 
     public Collection<Map<String, String>> getListOfStructs(String key, Collection<Map<String, String>> def) {
-        return getSetting(key, new MapListSetting(def == null ? null : new ArrayList<Map<String, String>>(def)), MapListSetting.class).getValue();
+        return getSetting(key, new MapListSetting(def == null ? null : new ArrayList<>(def)), MapListSetting.class).getValue();
     }
 
     public boolean putListOfStructs(String key, Collection<Map<String, String>> value) {
-        return putSetting(key, value == null ? null : new MapListSetting(new ArrayList<Map<String, String>>(value)));
+        return putSetting(key, value == null ? null : new MapListSetting(new ArrayList<>(value)));
     }
 
@@ -1124,6 +1124,6 @@
             getListOfStructs(key, def == null ? null : serializeListOfStructs(def, klass));
         if (prop == null)
-            return def == null ? null : new ArrayList<T>(def);
-        List<T> lst = new ArrayList<T>();
+            return def == null ? null : new ArrayList<>(def);
+        List<T> lst = new ArrayList<>();
         for (Map<String,String> entries : prop) {
             T struct = deserializeStruct(entries, klass);
@@ -1153,5 +1153,5 @@
         if (l == null)
             return null;
-        Collection<Map<String,String>> vals = new ArrayList<Map<String,String>>();
+        Collection<Map<String,String>> vals = new ArrayList<>();
         for (T struct : l) {
             if (struct == null) {
@@ -1171,5 +1171,5 @@
         }
 
-        Map<String,String> hash = new LinkedHashMap<String,String>();
+        Map<String,String> hash = new LinkedHashMap<>();
         for (Field f : klass.getDeclaredFields()) {
             if (f.getAnnotation(pref.class) == null) {
@@ -1244,9 +1244,9 @@
 
     public Map<String, Setting> getAllSettings() {
-        return new TreeMap<String, Setting>(settingsMap);
+        return new TreeMap<>(settingsMap);
     }
 
     public Map<String, Setting> getAllDefaults() {
-        return new TreeMap<String, Setting>(defaultsMap);
+        return new TreeMap<>(defaultsMap);
     }
 
@@ -1402,5 +1402,5 @@
                 if ("entry".equals(localName)) {
                     if (entries == null) {
-                        entries = new ArrayList<String>();
+                        entries = new ArrayList<>();
                     }
                     entries.add(parser.getAttributeValue(null, "value"));
@@ -1408,10 +1408,10 @@
                 } else if ("list".equals(localName)) {
                     if (lists == null) {
-                        lists = new ArrayList<List<String>>();
+                        lists = new ArrayList<>();
                     }
                     lists.add(parseInnerList());
                 } else if ("map".equals(localName)) {
                     if (maps == null) {
-                        maps = new ArrayList<Map<String, String>>();
+                        maps = new ArrayList<>();
                     }
                     maps.add(parseMap());
@@ -1441,5 +1441,5 @@
 
     protected List<String> parseInnerList() throws XMLStreamException {
-        List<String> entries = new ArrayList<String>();
+        List<String> entries = new ArrayList<>();
         while (true) {
             int event = parser.next();
@@ -1459,5 +1459,5 @@
 
     protected Map<String, String> parseMap() throws XMLStreamException {
-        Map<String, String> map = new LinkedHashMap<String, String>();
+        Map<String, String> map = new LinkedHashMap<>();
         while (true) {
             int event = parser.next();
Index: trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java	(revision 7005)
@@ -48,5 +48,5 @@
     public static final Map<String, SystemOfMeasurement> ALL_SYSTEMS;
     static {
-        ALL_SYSTEMS = new LinkedHashMap<String, SystemOfMeasurement>();
+        ALL_SYSTEMS = new LinkedHashMap<>();
         ALL_SYSTEMS.put(marktr("Metric"), METRIC);
         ALL_SYSTEMS.put(marktr("Chinese"), CHINESE);
Index: trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java	(revision 7005)
@@ -20,11 +20,11 @@
      * All commands that were made on the dataset. Don't write from outside!
      */
-    public final LinkedList<Command> commands = new LinkedList<Command>();
+    public final LinkedList<Command> commands = new LinkedList<>();
     /**
      * The stack for redoing commands
      */
-    public final LinkedList<Command> redoCommands = new LinkedList<Command>();
+    public final LinkedList<Command> redoCommands = new LinkedList<>();
 
-    private final LinkedList<CommandQueueListener> listenerCommands = new LinkedList<CommandQueueListener>();
+    private final LinkedList<CommandQueueListener> listenerCommands = new LinkedList<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/Version.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Version.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/Version.java	(revision 7005)
@@ -75,5 +75,5 @@
 
     protected Map<String, String> parseManifestStyleFormattedString(String content) {
-        Map<String, String> properties = new HashMap<String, String>();
+        Map<String, String> properties = new HashMap<>();
         if (content == null) return properties;
         Pattern p = Pattern.compile("^([^:]+):(.*)$");
Index: trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java	(revision 7005)
@@ -64,6 +64,6 @@
      */
     public ConflictCollection() {
-        conflicts = new ArrayList<Conflict<? extends OsmPrimitive>>();
-        listeners = new CopyOnWriteArrayList<IConflictListener>();
+        conflicts = new ArrayList<>();
+        listeners = new CopyOnWriteArrayList<>();
     }
 
@@ -148,5 +148,5 @@
      */
     public void add(OsmPrimitive my, OsmPrimitive their) {
-        addConflict(new Conflict<OsmPrimitive>(my, their));
+        addConflict(new Conflict<>(my, their));
         fireConflictAdded();
     }
@@ -322,5 +322,5 @@
      */
     public Set<OsmPrimitive> getMyConflictParties() {
-        HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> ret = new HashSet<>();
         for (Conflict<?> c: conflicts) {
             ret.add(c.getMy());
@@ -336,5 +336,5 @@
      */
     public Set<OsmPrimitive> getTheirConflictParties() {
-        HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> ret = new HashSet<>();
         for (Conflict<?> c: conflicts) {
             ret.add(c.getTheir());
Index: trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 7005)
@@ -26,7 +26,7 @@
     public String creator;
 
-    public final Collection<GpxTrack> tracks = new LinkedList<GpxTrack>();
-    public final Collection<GpxRoute> routes = new LinkedList<GpxRoute>();
-    public final Collection<WayPoint> waypoints = new LinkedList<WayPoint>();
+    public final Collection<GpxTrack> tracks = new LinkedList<>();
+    public final Collection<GpxRoute> routes = new LinkedList<>();
+    public final Collection<WayPoint> waypoints = new LinkedList<>();
 
     @SuppressWarnings("unchecked")
Index: trunk/src/org/openstreetmap/josm/data/gpx/GpxRoute.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/GpxRoute.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/gpx/GpxRoute.java	(revision 7005)
@@ -6,4 +6,4 @@
 
 public class GpxRoute extends WithAttributes {
-    public Collection<WayPoint> routePoints = new LinkedList<WayPoint>();
+    public Collection<WayPoint> routePoints = new LinkedList<>();
 }
Index: trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrack.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrack.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrack.java	(revision 7005)
@@ -18,5 +18,5 @@
 
     public ImmutableGpxTrack(Collection<Collection<WayPoint>> trackSegs, Map<String, Object> attributes) {
-        List<GpxTrackSegment> newSegments = new ArrayList<GpxTrackSegment>();
+        List<GpxTrackSegment> newSegments = new ArrayList<>();
         for (Collection<WayPoint> trackSeg: trackSegs) {
             if (trackSeg != null && !trackSeg.isEmpty()) {
@@ -24,5 +24,5 @@
             }
         }
-        this.attr = Collections.unmodifiableMap(new HashMap<String, Object>(attributes));
+        this.attr = Collections.unmodifiableMap(new HashMap<>(attributes));
         this.segments = Collections.unmodifiableCollection(newSegments);
         this.length = calculateLength();
Index: trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegment.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegment.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegment.java	(revision 7005)
@@ -15,5 +15,5 @@
 
     public ImmutableGpxTrackSegment(Collection<WayPoint> wayPoints) {
-        this.wayPoints = Collections.unmodifiableCollection(new ArrayList<WayPoint>(wayPoints));
+        this.wayPoints = Collections.unmodifiableCollection(new ArrayList<>(wayPoints));
         this.bounds = calculateBounds();
         this.length = calculateLength();
Index: trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 7005)
@@ -137,5 +137,5 @@
     @Override
     public List<String> getTemplateKeys() {
-        return new ArrayList<String>(attr.keySet());
+        return new ArrayList<>(attr.keySet());
     }
 }
Index: trunk/src/org/openstreetmap/josm/data/gpx/WithAttributes.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/WithAttributes.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/gpx/WithAttributes.java	(revision 7005)
@@ -19,5 +19,5 @@
      * The "attr" hash is used to store the XML payload (not only XML attributes!)
      */
-    public Map<String, Object> attr = new HashMap<String, Object>(0);
+    public Map<String, Object> attr = new HashMap<>(0);
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/imagery/GeorefImage.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/GeorefImage.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/imagery/GeorefImage.java	(revision 7005)
@@ -169,5 +169,5 @@
                 img.getGraphics().dispose();
                 g.drawImage(img, x, y, null);
-                reImg = new SoftReference<BufferedImage>(img);
+                reImg = new SoftReference<>(img);
             }
         } catch(Exception e) {
Index: trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 7005)
@@ -95,5 +95,5 @@
         }
 
-        private List<Shape> shapes = new ArrayList<Shape>();
+        private List<Shape> shapes = new ArrayList<>();
 
         /**
@@ -546,5 +546,5 @@
         if (serverProjections == null || serverProjections.isEmpty()) {
             try {
-                serverProjections = new ArrayList<String>();
+                serverProjections = new ArrayList<>();
                 Matcher m = Pattern.compile(".*\\{PROJ\\(([^)}]+)\\)\\}.*").matcher(url.toUpperCase());
                 if(m.matches()) {
@@ -710,5 +710,5 @@
 
     public void setServerProjections(Collection<String> serverProjections) {
-        this.serverProjections = new ArrayList<String>(serverProjections);
+        this.serverProjections = new ArrayList<>(serverProjections);
     }
 
Index: trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 7005)
@@ -22,6 +22,6 @@
 
     public static final ImageryLayerInfo instance = new ImageryLayerInfo();
-    List<ImageryInfo> layers = new ArrayList<ImageryInfo>();
-    static List<ImageryInfo> defaultLayers = new ArrayList<ImageryInfo>();
+    List<ImageryInfo> layers = new ArrayList<>();
+    static List<ImageryInfo> defaultLayers = new ArrayList<>();
 
     private static final String[] DEFAULT_LAYER_SITES = {
@@ -92,5 +92,5 @@
 
         Collection<String> defaults = Main.pref.getCollection("imagery.layers.default");
-        List<String> defaultsSave = new ArrayList<String>();
+        List<String> defaultsSave = new ArrayList<>();
         for (ImageryInfo def : defaultLayers) {
             if (def.isDefaultEntry()) {
@@ -137,5 +137,5 @@
 
     public void save() {
-        List<ImageryPreferenceEntry> entries = new ArrayList<ImageryPreferenceEntry>();
+        List<ImageryPreferenceEntry> entries = new ArrayList<>();
         for (ImageryInfo info : layers) {
             entries.add(new ImageryPreferenceEntry(info));
Index: trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java	(revision 7005)
@@ -16,5 +16,5 @@
 
 public class OffsetBookmark {
-    public static final List<OffsetBookmark> allBookmarks = new ArrayList<OffsetBookmark>();
+    public static final List<OffsetBookmark> allBookmarks = new ArrayList<>();
 
     public String projectionCode;
@@ -45,5 +45,5 @@
 
     public OffsetBookmark(Collection<String> list) {
-        List<String> array = new ArrayList<String>(list);
+        List<String> array = new ArrayList<>(list);
         this.projectionCode = array.get(0);
         this.layerName = array.get(1);
@@ -61,5 +61,5 @@
 
     public List<String> getInfoArray() {
-        List<String> res = new ArrayList<String>(7);
+        List<String> res = new ArrayList<>(7);
         if (projectionCode != null) {
             res.add(projectionCode);
@@ -86,5 +86,5 @@
 
     public static void saveBookmarks() {
-        LinkedList<Collection<String>> coll = new LinkedList<Collection<String>>();
+        LinkedList<Collection<String>> coll = new LinkedList<>();
         for (OffsetBookmark b : allBookmarks) {
             coll.add(b.getInfoArray());
Index: trunk/src/org/openstreetmap/josm/data/imagery/Shape.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/Shape.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/imagery/Shape.java	(revision 7005)
@@ -20,5 +20,5 @@
 public class Shape {
 
-    private List<Coordinate> coords = new ArrayList<Coordinate>();
+    private List<Coordinate> coords = new ArrayList<>();
 
     public Shape(String asString, String separator) throws IllegalArgumentException {
@@ -53,5 +53,5 @@
         if (latlon == null)
             return false;
-        List<Node> nodes = new ArrayList<Node>(coords.size());
+        List<Node> nodes = new ArrayList<>(coords.size());
         for (Coordinate c : coords) {
             nodes.add(new Node(new LatLon(c.getLat(), c.getLon())));
Index: trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java	(revision 7005)
@@ -76,5 +76,5 @@
         final String projection;
         final String cacheDirectory;
-        final List<CacheEntry> entries = new ArrayList<WmsCache.CacheEntry>();
+        final List<CacheEntry> entries = new ArrayList<>();
 
         ProjectionEntries(String projection, String cacheDirectory) {
@@ -84,5 +84,5 @@
     }
 
-    private final Map<String, ProjectionEntries> entries = new HashMap<String, ProjectionEntries>();
+    private final Map<String, ProjectionEntries> entries = new HashMap<>();
     private final File cacheDir;
     private final int tileSize; // Should be always 500
@@ -90,5 +90,5 @@
     private boolean totalFileSizeDirty; // Some file was missing - size needs to be recalculated
     // No need for hashCode/equals on CacheEntry, object identity is enough. Comparing by values can lead to error - CacheEntry for wrong projection could be found
-    private Map<CacheEntry, SoftReference<BufferedImage>> memoryCache = new HashMap<WmsCache.CacheEntry, SoftReference<BufferedImage>>();
+    private Map<CacheEntry, SoftReference<BufferedImage>> memoryCache = new HashMap<>();
     private Set<ProjectionBounds> areaToCache;
 
@@ -210,5 +210,5 @@
     private void removeNonReferencedFiles() {
 
-        Set<String> usedProjections = new HashSet<String>();
+        Set<String> usedProjections = new HashSet<>();
 
         for (ProjectionEntries projectionEntries: entries.values()) {
@@ -218,5 +218,5 @@
             File projectionDir = new File(cacheDir, projectionEntries.cacheDirectory);
             if (projectionDir.exists()) {
-                Set<String> referencedFiles = new HashSet<String>();
+                Set<String> referencedFiles = new HashSet<>();
 
                 for (CacheEntry ce: projectionEntries.entries) {
@@ -373,5 +373,5 @@
         List<CacheEntry> matches;
         synchronized (this) {
-            matches = new ArrayList<WmsCache.CacheEntry>();
+            matches = new ArrayList<>();
 
             double minPPD = pixelPerDegree / 5;
@@ -410,10 +410,10 @@
 
         boolean drawAtLeastOnce = false;
-        Map<CacheEntry, SoftReference<BufferedImage>> localCache = new HashMap<WmsCache.CacheEntry, SoftReference<BufferedImage>>();
+        Map<CacheEntry, SoftReference<BufferedImage>> localCache = new HashMap<>();
         for (CacheEntry ce: matches) {
             BufferedImage img;
             try {
                 img = loadImage(projectionEntries, ce);
-                localCache.put(ce, new SoftReference<BufferedImage>(img));
+                localCache.put(ce, new SoftReference<>(img));
             } catch (IOException e) {
                 continue;
Index: trunk/src/org/openstreetmap/josm/data/imagery/types/ProjectionType.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/types/ProjectionType.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/imagery/types/ProjectionType.java	(revision 7005)
@@ -71,5 +71,5 @@
     public List<EntryType> getEntry() {
         if (entry == null) {
-            entry = new ArrayList<EntryType>();
+            entry = new ArrayList<>();
         }
         return this.entry;
Index: trunk/src/org/openstreetmap/josm/data/imagery/types/WmsCacheType.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/types/WmsCacheType.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/imagery/types/WmsCacheType.java	(revision 7005)
@@ -73,5 +73,5 @@
     public List<ProjectionType> getProjection() {
         if (projection == null) {
-            projection = new ArrayList<ProjectionType>();
+            projection = new ArrayList<>();
         }
         return this.projection;
Index: trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 7005)
@@ -471,5 +471,5 @@
     @Override
     public Map<String, String> getKeys() {
-        Map<String, String> result = new HashMap<String, String>();
+        Map<String, String> result = new HashMap<>();
         String[] keys = this.keys;
         if (keys != null) {
@@ -638,5 +638,5 @@
         if (keys == null)
             return Collections.emptySet();
-        Set<String> result = new HashSet<String>(keys.length / 2);
+        Set<String> result = new HashSet<>(keys.length / 2);
         for (int i=0; i<keys.length; i+=2) {
             result.add(keys[i]);
Index: trunk/src/org/openstreetmap/josm/data/osm/Changeset.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Changeset.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/Changeset.java	(revision 7005)
@@ -59,5 +59,5 @@
         this.id = id;
         this.incomplete = id > 0;
-        this.tags = new HashMap<String, String>();
+        this.tags = new HashMap<>();
     }
 
@@ -70,9 +70,9 @@
         if (other == null) {
             this.id = 0;
-            this.tags = new HashMap<String, String>();
+            this.tags = new HashMap<>();
         } else if (other.isIncomplete()) {
             setId(other.getId());
             this.incomplete = true;
-            this.tags = new HashMap<String, String>();
+            this.tags = new HashMap<>();
         } else {
             this.id = other.id;
@@ -286,5 +286,5 @@
         this.min = other.min;
         this.max = other.max;
-        this.tags = new HashMap<String, String>(other.tags);
+        this.tags = new HashMap<>(other.tags);
         this.incomplete = other.incomplete;
 
Index: trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java	(revision 7005)
@@ -46,8 +46,8 @@
 
     /** the cached changesets */
-    private final Map<Integer, Changeset> cache  = new HashMap<Integer, Changeset>();
+    private final Map<Integer, Changeset> cache  = new HashMap<>();
 
     private final CopyOnWriteArrayList<ChangesetCacheListener> listeners =
-        new CopyOnWriteArrayList<ChangesetCacheListener>();
+        new CopyOnWriteArrayList<>();
 
     private ChangesetCache() {
@@ -117,5 +117,5 @@
 
     public Set<Changeset> getChangesets() {
-        return new HashSet<Changeset>(cache.values());
+        return new HashSet<>(cache.values());
     }
 
@@ -180,5 +180,5 @@
      */
     public List<Changeset> getOpenChangesets() {
-        List<Changeset> ret = new ArrayList<Changeset>();
+        List<Changeset> ret = new ArrayList<>();
         for (Changeset cs: cache.values()) {
             if (cs.isOpen()) {
Index: trunk/src/org/openstreetmap/josm/data/osm/ChangesetDataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/ChangesetDataSet.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/ChangesetDataSet.java	(revision 7005)
@@ -28,6 +28,6 @@
     }
 
-    private final Map<PrimitiveId, HistoryOsmPrimitive> primitives = new HashMap<PrimitiveId, HistoryOsmPrimitive>();
-    private final Map<PrimitiveId, ChangesetModificationType> modificationTypes = new HashMap<PrimitiveId, ChangesetModificationType>();
+    private final Map<PrimitiveId, HistoryOsmPrimitive> primitives = new HashMap<>();
+    private final Map<PrimitiveId, ChangesetModificationType> modificationTypes = new HashMap<>();
 
     /**
@@ -116,5 +116,5 @@
     public Set<HistoryOsmPrimitive> getPrimitivesByModificationType(ChangesetModificationType cmt) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(cmt,"cmt");
-        HashSet<HistoryOsmPrimitive> ret = new HashSet<HistoryOsmPrimitive>();
+        HashSet<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 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 7005)
@@ -102,16 +102,16 @@
     private static final int MAX_EVENTS = 1000;
 
-    private Storage<OsmPrimitive> allPrimitives = new Storage<OsmPrimitive>(new Storage.PrimitiveIdHash(), true);
+    private Storage<OsmPrimitive> allPrimitives = new Storage<>(new Storage.PrimitiveIdHash(), true);
     private Map<PrimitiveId, OsmPrimitive> primitivesMap = allPrimitives.foreignKey(new Storage.PrimitiveIdHash());
-    private CopyOnWriteArrayList<DataSetListener> listeners = new CopyOnWriteArrayList<DataSetListener>();
+    private CopyOnWriteArrayList<DataSetListener> listeners = new CopyOnWriteArrayList<>();
 
     // provide means to highlight map elements that are not osm primitives
-    private Collection<WaySegment> highlightedVirtualNodes = new LinkedList<WaySegment>();
-    private Collection<WaySegment> highlightedWaySegments = new LinkedList<WaySegment>();
+    private Collection<WaySegment> highlightedVirtualNodes = new LinkedList<>();
+    private Collection<WaySegment> highlightedWaySegments = new LinkedList<>();
 
     // Number of open calls to beginUpdate
     private int updateCount;
     // Events that occurred while dataset was locked but should be fired after write lock is released
-    private final List<AbstractDatasetChangedEvent> cachedEvents = new ArrayList<AbstractDatasetChangedEvent>();
+    private final List<AbstractDatasetChangedEvent> cachedEvents = new ArrayList<>();
 
     private int highlightUpdateCount;
@@ -146,5 +146,5 @@
      * History of selections - shared by plugins and SelectionListDialog
      */
-    private final LinkedList<Collection<? extends OsmPrimitive>> selectionHistory = new LinkedList<Collection<? extends OsmPrimitive>>();
+    private final LinkedList<Collection<? extends OsmPrimitive>> selectionHistory = new LinkedList<>();
 
     /**
@@ -211,5 +211,5 @@
      * Holding bin for changeset tag information, to be applied when or if this is ever uploaded.
      */
-    private Map<String, String> changeSetTags = new HashMap<String, String>();
+    private Map<String, String> changeSetTags = new HashMap<>();
 
     public Map<String, String> getChangeSetTags() {
@@ -225,8 +225,8 @@
      * conversion of the whole DataSet by iterating over this data structure.
      */
-    private QuadBuckets<Node> nodes = new QuadBuckets<Node>();
+    private QuadBuckets<Node> nodes = new QuadBuckets<>();
 
     private <T extends OsmPrimitive> Collection<T> getPrimitives(Predicate<OsmPrimitive> predicate) {
-        return new SubclassFilteredCollection<OsmPrimitive, T>(allPrimitives, predicate);
+        return new SubclassFilteredCollection<>(allPrimitives, predicate);
     }
 
@@ -254,5 +254,5 @@
      * The way nodes are stored only in the way list.
      */
-    private QuadBuckets<Way> ways = new QuadBuckets<Way>();
+    private QuadBuckets<Way> ways = new QuadBuckets<>();
 
     /**
@@ -277,5 +277,5 @@
      * All relations/relationships
      */
-    private Collection<Relation> relations = new ArrayList<Relation>();
+    private Collection<Relation> relations = new ArrayList<>();
 
     /**
@@ -292,5 +292,5 @@
         try {
             // QuadBuckets might be useful here (don't forget to do reindexing after some of rm is changed)
-            List<Relation> result = new ArrayList<Relation>();
+            List<Relation> result = new ArrayList<>();
             for (Relation r: relations) {
                 if (r.getBBox().intersects(bbox)) {
@@ -307,5 +307,5 @@
      * All data sources of this DataSet.
      */
-    public final Collection<DataSource> dataSources = new LinkedList<DataSource>();
+    public final Collection<DataSource> dataSources = new LinkedList<>();
 
     /**
@@ -412,5 +412,5 @@
      * dataset. (However, the selection does only change in the active layer)
      */
-    private static final Collection<SelectionChangedListener> selListeners = new CopyOnWriteArrayList<SelectionChangedListener>();
+    private static final Collection<SelectionChangedListener> selListeners = new CopyOnWriteArrayList<>();
 
     public static void addSelectionListener(SelectionChangedListener listener) {
@@ -434,9 +434,9 @@
     }
 
-    private Set<OsmPrimitive> selectedPrimitives = new LinkedHashSet<OsmPrimitive>();
+    private Set<OsmPrimitive> selectedPrimitives = new LinkedHashSet<>();
     private Collection<OsmPrimitive> selectionSnapshot;
 
     public Collection<OsmPrimitive> getSelectedNodesAndWays() {
-        return new FilteredCollection<OsmPrimitive>(getSelected(), new Predicate<OsmPrimitive>() {
+        return new FilteredCollection<>(getSelected(), new Predicate<OsmPrimitive>() {
             @Override
             public boolean evaluate(OsmPrimitive primitive) {
@@ -474,5 +474,5 @@
      */
     public Collection<OsmPrimitive> getSelected() {
-        return new SubclassFilteredCollection<OsmPrimitive, OsmPrimitive>(getAllSelected(), OsmPrimitive.nonDeletedPredicate);
+        return new SubclassFilteredCollection<>(getAllSelected(), OsmPrimitive.nonDeletedPredicate);
     }
 
@@ -487,5 +487,5 @@
         synchronized (selectionLock) {
             if (selectionSnapshot == null) {
-                selectionSnapshot = Collections.unmodifiableList(new ArrayList<OsmPrimitive>(selectedPrimitives));
+                selectionSnapshot = Collections.unmodifiableList(new ArrayList<>(selectedPrimitives));
             }
             currentList = selectionSnapshot;
@@ -498,5 +498,5 @@
      */
     public Collection<Node> getSelectedNodes() {
-        return new SubclassFilteredCollection<OsmPrimitive, Node>(getSelected(), OsmPrimitive.nodePredicate);
+        return new SubclassFilteredCollection<>(getSelected(), OsmPrimitive.nodePredicate);
     }
 
@@ -505,5 +505,5 @@
      */
     public Collection<Way> getSelectedWays() {
-        return new SubclassFilteredCollection<OsmPrimitive, Way>(getSelected(), OsmPrimitive.wayPredicate);
+        return new SubclassFilteredCollection<>(getSelected(), OsmPrimitive.wayPredicate);
     }
 
@@ -512,5 +512,5 @@
      */
     public Collection<Relation> getSelectedRelations() {
-        return new SubclassFilteredCollection<OsmPrimitive, Relation>(getSelected(), OsmPrimitive.relationPredicate);
+        return new SubclassFilteredCollection<>(getSelected(), OsmPrimitive.relationPredicate);
     }
 
@@ -592,6 +592,6 @@
         boolean changed;
         synchronized (selectionLock) {
-            LinkedHashSet<OsmPrimitive> oldSelection = new LinkedHashSet<OsmPrimitive>(selectedPrimitives);
-            selectedPrimitives = new LinkedHashSet<OsmPrimitive>();
+            LinkedHashSet<OsmPrimitive> oldSelection = new LinkedHashSet<>(selectedPrimitives);
+            selectedPrimitives = new LinkedHashSet<>();
             addSelected(selection, false);
             changed = !oldSelection.equals(selectedPrimitives);
@@ -719,5 +719,5 @@
         try {
             DataSet ds = new DataSet();
-            HashMap<OsmPrimitive, OsmPrimitive> primMap = new HashMap<OsmPrimitive, OsmPrimitive>();
+            HashMap<OsmPrimitive, OsmPrimitive> primMap = new HashMap<>();
             for (Node n : nodes) {
                 Node newNode = new Node(n);
@@ -728,5 +728,5 @@
                 Way newWay = new Way(w);
                 primMap.put(w, newWay);
-                List<Node> newNodes = new ArrayList<Node>();
+                List<Node> newNodes = new ArrayList<>();
                 for (Node n: w.getNodes()) {
                     newNodes.add((Node)primMap.get(n));
@@ -745,5 +745,5 @@
             for (Relation r : relations) {
                 Relation newRelation = (Relation)primMap.get(r);
-                List<RelationMember> newMembers = new ArrayList<RelationMember>();
+                List<RelationMember> newMembers = new ArrayList<>();
                 for (RelationMember rm: r.getMembers()) {
                     newMembers.add(new RelationMember(rm.getRole(), primMap.get(rm.getMember())));
@@ -821,5 +821,5 @@
      */
     public Set<Way> unlinkNodeFromWays(Node node) {
-        Set<Way> result = new HashSet<Way>();
+        Set<Way> result = new HashSet<>();
         beginUpdate();
         try {
@@ -848,5 +848,5 @@
      */
     public Set<Relation> unlinkPrimitiveFromRelations(OsmPrimitive primitive) {
-        Set<Relation> result = new HashSet<Relation>();
+        Set<Relation> result = new HashSet<>();
         beginUpdate();
         try {
@@ -882,5 +882,5 @@
      */
     public Set<OsmPrimitive> unlinkReferencesToPrimitive(OsmPrimitive referencedPrimitive) {
-        Set<OsmPrimitive> result = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> result = new HashSet<>();
         beginUpdate();
         try {
@@ -983,5 +983,5 @@
             updateCount--;
             if (updateCount == 0) {
-                List<AbstractDatasetChangedEvent> eventsCopy = new ArrayList<AbstractDatasetChangedEvent>(cachedEvents);
+                List<AbstractDatasetChangedEvent> eventsCopy = new ArrayList<>(cachedEvents);
                 cachedEvents.clear();
                 lock.writeLock().unlock();
@@ -1159,5 +1159,5 @@
      */
     public List<Bounds> getDataSourceBounds() {
-        List<Bounds> ret = new ArrayList<Bounds>(dataSources.size());
+        List<Bounds> ret = new ArrayList<>(dataSources.size());
         for (DataSource ds : dataSources) {
             if (ds.bounds != null) {
Index: trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 7005)
@@ -59,7 +59,7 @@
         this.sourceDataSet = sourceDataSet;
         conflicts = new ConflictCollection();
-        mergedMap = new HashMap<PrimitiveId, PrimitiveId>();
-        objectsWithChildrenToMerge = new HashSet<PrimitiveId>();
-        objectsToDelete = new HashSet<OsmPrimitive>();
+        mergedMap = new HashMap<>();
+        objectsWithChildrenToMerge = new HashSet<>();
+        objectsToDelete = new HashSet<>();
     }
 
@@ -137,5 +137,5 @@
 
     protected void addConflict(OsmPrimitive my, OsmPrimitive their) {
-        addConflict(new Conflict<OsmPrimitive>(my, their));
+        addConflict(new Conflict<>(my, their));
     }
 
@@ -238,5 +238,5 @@
             throw new IllegalStateException(tr("Missing merge target for way with id {0}", source.getUniqueId()));
 
-        List<Node> newNodes = new ArrayList<Node>(source.getNodesCount());
+        List<Node> newNodes = new ArrayList<>(source.getNodesCount());
         for (Node sourceNode : source.getNodes()) {
             Node targetNode = (Node)getMergeTarget(sourceNode);
@@ -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<RelationMember>();
+        LinkedList<RelationMember> newMembers = new LinkedList<>();
         for (RelationMember sourceMember : source.getMembers()) {
             OsmPrimitive targetMember = getMergeTarget(sourceMember.getMember());
@@ -272,5 +272,5 @@
             newMembers.add(newMember);
             if (targetMember.isDeleted() && !conflicts.hasConflictForMy(targetMember)) {
-                addConflict(new Conflict<OsmPrimitive>(targetMember, sourceMember.getMember(), true));
+                addConflict(new Conflict<>(targetMember, sourceMember.getMember(), true));
                 targetMember.setDeleted(false);
             }
@@ -326,5 +326,5 @@
             for (OsmPrimitive referrer: source.getReferrers()) {
                 if (targetDataSet.getPrimitiveById(referrer.getPrimitiveId()) == null) {
-                    addConflict(new Conflict<OsmPrimitive>(target, source, true));
+                    addConflict(new Conflict<>(target, source, true));
                     target.setDeleted(false);
                     break;
@@ -403,5 +403,5 @@
         targetDataSet.beginUpdate();
         try {
-            List<? extends OsmPrimitive> candidates = new ArrayList<Node>(targetDataSet.getNodes());
+            List<? extends OsmPrimitive> candidates = new ArrayList<>(targetDataSet.getNodes());
             for (Node node: sourceDataSet.getNodes()) {
                 mergePrimitive(node, candidates);
@@ -411,5 +411,5 @@
             }
             candidates.clear();
-            candidates = new ArrayList<Way>(targetDataSet.getWays());
+            candidates = new ArrayList<>(targetDataSet.getWays());
             for (Way way: sourceDataSet.getWays()) {
                 mergePrimitive(way, candidates);
@@ -419,5 +419,5 @@
             }
             candidates.clear();
-            candidates = new ArrayList<Relation>(targetDataSet.getRelations());
+            candidates = new ArrayList<>(targetDataSet.getRelations());
             for (Relation relation: sourceDataSet.getRelations()) {
                 mergePrimitive(relation, candidates);
Index: trunk/src/org/openstreetmap/josm/data/osm/DefaultChangesetCacheEvent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DefaultChangesetCacheEvent.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/DefaultChangesetCacheEvent.java	(revision 7005)
@@ -16,7 +16,7 @@
     public DefaultChangesetCacheEvent(ChangesetCache source) {
         this.source = source;
-        added = new HashSet<Changeset>();
-        modified = new HashSet<Changeset>();
-        removed = new HashSet<Changeset>();
+        added = new HashSet<>();
+        modified = new HashSet<>();
+        removed = new HashSet<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java	(revision 7005)
@@ -90,6 +90,6 @@
     }
 
-    private final List<FilterInfo> hiddenFilters = new ArrayList<FilterInfo>();
-    private final List<FilterInfo> disabledFilters = new ArrayList<FilterInfo>();
+    private final List<FilterInfo> hiddenFilters = new ArrayList<>();
+    private final List<FilterInfo> disabledFilters = new ArrayList<>();
 
     public void update(Collection<Filter> filters) throws ParseError {
Index: trunk/src/org/openstreetmap/josm/data/osm/MultipolygonCreate.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/MultipolygonCreate.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/MultipolygonCreate.java	(revision 7005)
@@ -49,5 +49,5 @@
          */
         private List<Node> getNodes() {
-            List<Node> nodes = new ArrayList<Node>();
+            List<Node> nodes = new ArrayList<>();
 
             for(int waypos = 0; waypos < this.ways.size(); waypos ++) {
@@ -85,5 +85,5 @@
             this.outerWay = _pol;
             this.level = _level;
-            this.innerWays = new ArrayList<JoinedPolygon>();
+            this.innerWays = new ArrayList<>();
         }
     }
@@ -98,6 +98,6 @@
 
     public MultipolygonCreate(){
-        this.outerWays = new ArrayList<JoinedPolygon>(0);
-        this.innerWays = new ArrayList<JoinedPolygon>(0);
+        this.outerWays = new ArrayList<>(0);
+        this.innerWays = new ArrayList<>(0);
     }
 
@@ -109,9 +109,9 @@
      */
     public String makeFromWays(Collection<Way> ways){
-        List<JoinedPolygon> joinedWays = new ArrayList<JoinedPolygon>();
+        List<JoinedPolygon> joinedWays = new ArrayList<>();
 
         //collect ways connecting to each node.
-        MultiMap<Node, Way> nodesWithConnectedWays = new MultiMap<Node, Way>();
-        Set<Way> usedWays = new HashSet<Way>();
+        MultiMap<Node, Way> nodesWithConnectedWays = new MultiMap<>();
+        Set<Way> usedWays = new HashSet<>();
 
         for(Way w: ways) {
@@ -139,6 +139,6 @@
 
             Node startNode = startWay.firstNode();
-            List<Way> collectedWays = new ArrayList<Way>();
-            List<Boolean> collectedWaysReverse = new ArrayList<Boolean>();
+            List<Way> collectedWays = new ArrayList<>();
+            List<Boolean> collectedWaysReverse = new ArrayList<>();
             Way curWay = startWay;
             Node prevNode = startNode;
@@ -197,6 +197,6 @@
         }
 
-        this.outerWays = new ArrayList<JoinedPolygon>(0);
-        this.innerWays = new ArrayList<JoinedPolygon>(0);
+        this.outerWays = new ArrayList<>(0);
+        this.innerWays = new ArrayList<>(0);
 
         //take every other level
@@ -221,10 +221,10 @@
 
         //TODO: bad performance for deep nesting...
-        List<PolygonLevel> result = new ArrayList<PolygonLevel>();
+        List<PolygonLevel> result = new ArrayList<>();
 
         for (JoinedPolygon outerWay : boundaryWays) {
 
             boolean outerGood = true;
-            List<JoinedPolygon> innerCandidates = new ArrayList<JoinedPolygon>();
+            List<JoinedPolygon> innerCandidates = new ArrayList<>();
 
             for (JoinedPolygon innerWay : boundaryWays) {
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 7005)
@@ -121,5 +121,5 @@
     public static <T extends OsmPrimitive>  List<T> getFilteredList(Collection<OsmPrimitive> list, Class<T> type) {
         if (list == null) return Collections.emptyList();
-        List<T> ret = new LinkedList<T>();
+        List<T> ret = new LinkedList<>();
         for(OsmPrimitive p: list) {
             if (type.isInstance(p)) {
@@ -142,5 +142,5 @@
      */
     public static <T extends OsmPrimitive> Set<T> getFilteredSet(Collection<OsmPrimitive> set, Class<T> type) {
-        Set<T> ret = new LinkedHashSet<T>();
+        Set<T> ret = new LinkedHashSet<>();
         if (set != null) {
             for(OsmPrimitive p: set) {
@@ -161,5 +161,5 @@
      */
     public static Set<OsmPrimitive> getReferrer(Collection<? extends OsmPrimitive> primitives) {
-        HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> ret = new HashSet<>();
         if (primitives == null || primitives.isEmpty()) return ret;
         for (OsmPrimitive p: primitives) {
@@ -632,5 +632,5 @@
     public static Collection<String> getUninterestingKeys() {
         if (uninteresting == null) {
-            LinkedList<String> l = new LinkedList<String>(Arrays.asList(
+            LinkedList<String> l = new LinkedList<>(Arrays.asList(
                 "source", "source_ref", "source:", "comment",
                 "converted_by", "watch", "watch:",
@@ -731,5 +731,5 @@
      */
     public Map<String, String> getInterestingTags() {
-        Map<String, String> result = new HashMap<String, String>();
+        Map<String, String> result = new HashMap<>();
         String[] keys = this.keys;
         if (keys != null) {
@@ -997,5 +997,5 @@
         checkDataset();
         Object referrers = this.referrers;
-        List<OsmPrimitive> result = new ArrayList<OsmPrimitive>();
+        List<OsmPrimitive> result = new ArrayList<>();
         if (referrers != null) {
             if (referrers instanceof OsmPrimitive) {
@@ -1298,5 +1298,5 @@
     public Collection<String> getTemplateKeys() {
         Collection<String> keySet = keySet();
-        List<String> result = new ArrayList<String>(keySet.size() + 2);
+        List<String> result = new ArrayList<>(keySet.size() + 2);
         result.add(SPECIAL_VALUE_ID);
         result.add(SPECIAL_VALUE_LOCAL_NAME);
@@ -1331,5 +1331,5 @@
      */
     public static Set<Relation> getParentRelations(Collection<? extends OsmPrimitive> primitives) {
-        HashSet<Relation> ret = new HashSet<Relation>();
+        HashSet<Relation> ret = new HashSet<>();
         for (OsmPrimitive w : primitives) {
             ret.addAll(OsmPrimitive.getFilteredList(w.getReferrers(), Relation.class));
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveComparator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveComparator.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveComparator.java	(revision 7005)
@@ -10,5 +10,5 @@
 /** Comparator, comparing by type and objects display names */
 public class OsmPrimitiveComparator implements Comparator<OsmPrimitive> {
-    private final Map<OsmPrimitive, String> cache= new HashMap<OsmPrimitive, String>();
+    private final Map<OsmPrimitive, String> cache= new HashMap<>();
     private final DefaultNameFormatter df = DefaultNameFormatter.getInstance();
     public boolean relationsFirst = false;
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java	(revision 7005)
@@ -13,9 +13,9 @@
     }
 
-    static final List<String> TRUE_VALUES = new ArrayList<String>(Arrays
+    static final List<String> TRUE_VALUES = new ArrayList<>(Arrays
             .asList(new String[] { "true", "yes", "1", "on" }));
-    static final List<String> FALSE_VALUES = new ArrayList<String>(Arrays
+    static final List<String> FALSE_VALUES = new ArrayList<>(Arrays
             .asList(new String[] { "false", "no", "0", "off" }));
-    static final List<String> REVERSE_VALUES = new ArrayList<String>(Arrays
+    static final List<String> REVERSE_VALUES = new ArrayList<>(Arrays
             .asList(new String[] { "reverse", "-1" }));
 
Index: trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java	(revision 7005)
@@ -55,5 +55,5 @@
     @SuppressWarnings("unchecked")
     public static <T extends PrimitiveData> List<T> getFilteredList(Collection<T> list, OsmPrimitiveType type) {
-        List<T> ret = new ArrayList<T>();
+        List<T> ret = new ArrayList<>();
         for(PrimitiveData p: list) {
             if (type.getDataClass().isInstance(p)) {
Index: trunk/src/org/openstreetmap/josm/data/osm/PrimitiveDeepCopy.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/PrimitiveDeepCopy.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/PrimitiveDeepCopy.java	(revision 7005)
@@ -22,7 +22,7 @@
     }
 
-    private final List<PrimitiveData> directlyAdded = new ArrayList<PrimitiveData>();
-    private final List<PrimitiveData> referenced = new ArrayList<PrimitiveData>();
-    private final CopyOnWriteArrayList<PasteBufferChangedListener> listeners = new CopyOnWriteArrayList<PasteBufferChangedListener>();
+    private final List<PrimitiveData> directlyAdded = new ArrayList<>();
+    private final List<PrimitiveData> referenced = new ArrayList<>();
+    private final CopyOnWriteArrayList<PasteBufferChangedListener> listeners = new CopyOnWriteArrayList<>();
 
     public PrimitiveDeepCopy() {
@@ -42,7 +42,7 @@
         referenced.clear();
 
-        final Set<Long> visitedNodeIds = new HashSet<Long>();
-        final Set<Long> visitedWayIds = new HashSet<Long>();
-        final Set<Long> visitedRelationIds = new HashSet<Long>();
+        final Set<Long> visitedNodeIds = new HashSet<>();
+        final Set<Long> visitedWayIds = new HashSet<>();
+        final Set<Long> visitedRelationIds = new HashSet<>();
 
         new AbstractVisitor() {
@@ -96,5 +96,5 @@
 
     public List<PrimitiveData> getAll() {
-        List<PrimitiveData> result = new ArrayList<PrimitiveData>(directlyAdded.size() + referenced.size());
+        List<PrimitiveData> result = new ArrayList<>(directlyAdded.size() + referenced.size());
         result.addAll(directlyAdded);
         result.addAll(referenced);
Index: trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 7005)
@@ -50,20 +50,20 @@
             case NE_INDEX:
                 if (ne == null) {
-                    ne = new QBLevel<T>(this, index, buckets);
+                    ne = new QBLevel<>(this, index, buckets);
                 }
                 return ne;
             case NW_INDEX:
                 if (nw == null) {
-                    nw = new QBLevel<T>(this, index, buckets);
+                    nw = new QBLevel<>(this, index, buckets);
                 }
                 return nw;
             case SE_INDEX:
                 if (se == null) {
-                    se = new QBLevel<T>(this, index, buckets);
+                    se = new QBLevel<>(this, index, buckets);
                 }
                 return se;
             case SW_INDEX:
                 if (sw == null) {
-                    sw = new QBLevel<T>(this, index, buckets);
+                    sw = new QBLevel<>(this, index, buckets);
                 }
                 return sw;
@@ -174,5 +174,5 @@
             // The split_lock will keep two concurrent calls from overwriting content
             if (content == null) {
-                content = new ArrayList<T>();
+                content = new ArrayList<>();
             }
             ret = content.add(o);
@@ -405,5 +405,5 @@
     @Override
     public final void clear() {
-        root = new QBLevel<T>(this);
+        root = new QBLevel<>(this);
         search_cache = null;
         size = 0;
@@ -478,5 +478,5 @@
 
     public ArrayList<T> toArrayList() {
-        ArrayList<T> a = new ArrayList<T>();
+        ArrayList<T> a = new ArrayList<>();
         for (T n : this) {
             a.add(n);
@@ -581,5 +581,5 @@
 
     public List<T> search(BBox search_bbox) {
-        List<T> ret = new ArrayList<T>();
+        List<T> ret = new ArrayList<>();
         // Doing this cuts down search cost on a real-life data set by about 25%
         boolean cache_searches = true;
Index: trunk/src/org/openstreetmap/josm/data/osm/Relation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Relation.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/Relation.java	(revision 7005)
@@ -35,5 +35,5 @@
      */
     public List<RelationMember> getMembers() {
-        return new CopyList<RelationMember>(members);
+        return new CopyList<>(members);
     }
 
@@ -241,5 +241,5 @@
             RelationData relationData = (RelationData) data;
 
-            List<RelationMember> newMembers = new ArrayList<RelationMember>();
+            List<RelationMember> newMembers = new ArrayList<>();
             for (RelationMemberData member : relationData.getMembers()) {
                 OsmPrimitive primitive = getDataSet().getPrimitiveById(member);
@@ -384,5 +384,5 @@
      */
     public Set<OsmPrimitive> getMemberPrimitives() {
-        HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> ret = new HashSet<>();
         RelationMember[] members = this.members;
         for (RelationMember m: members) {
@@ -521,5 +521,5 @@
      */
     public Collection<OsmPrimitive> getIncompleteMembers() {
-        Set<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         RelationMember[] members = this.members;
         for (RelationMember rm: members) {
Index: trunk/src/org/openstreetmap/josm/data/osm/RelationData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/RelationData.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/RelationData.java	(revision 7005)
@@ -9,5 +9,5 @@
 public class RelationData extends PrimitiveData implements IRelation {
 
-    private List<RelationMemberData> members = new ArrayList<RelationMemberData>();
+    private List<RelationMemberData> members = new ArrayList<>();
 
     public RelationData() {
@@ -25,5 +25,5 @@
 
     public void setMembers(List<RelationMemberData> memberData) {
-        members = new ArrayList<RelationMemberData>(memberData);
+        members = new ArrayList<>(memberData);
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/RelationToChildReference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/RelationToChildReference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/RelationToChildReference.java	(revision 7005)
@@ -16,5 +16,5 @@
     public static Set<RelationToChildReference> getRelationToChildReferences(OsmPrimitive child) {
         Set<Relation> parents = OsmPrimitive.getFilteredSet(child.getReferrers(), Relation.class);
-        Set<RelationToChildReference> references = new HashSet<RelationToChildReference>();
+        Set<RelationToChildReference> references = new HashSet<>();
         for (Relation parent: parents) {
             for (int i=0; i < parent.getMembersCount(); i++) {
@@ -35,5 +35,5 @@
      */
     public static Set<RelationToChildReference> getRelationToChildReferences(Collection<? extends OsmPrimitive> children) {
-        Set<RelationToChildReference> references = new HashSet<RelationToChildReference>();
+        Set<RelationToChildReference> references = new HashSet<>();
         for (OsmPrimitive child: children) {
             references.addAll(getRelationToChildReferences(child));
Index: trunk/src/org/openstreetmap/josm/data/osm/SimplePrimitiveId.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/SimplePrimitiveId.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/SimplePrimitiveId.java	(revision 7005)
@@ -94,5 +94,5 @@
      */
     public static List<SimplePrimitiveId> fuzzyParse(String s) {
-        final ArrayList<SimplePrimitiveId> ids = new ArrayList<SimplePrimitiveId>();
+        final ArrayList<SimplePrimitiveId> ids = new ArrayList<>();
         final Matcher m = ID_PATTERN.matcher(s);
         while (m.find()) {
Index: trunk/src/org/openstreetmap/josm/data/osm/Storage.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Storage.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/Storage.java	(revision 7005)
@@ -257,5 +257,5 @@
 
     public <K> Map<K,T> foreignKey(Hash<K,? super T> h) {
-        return new FMap<K>(h);
+        return new FMap<>(h);
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 7005)
@@ -141,5 +141,5 @@
     }
 
-    private final Set<Tag> tags = new HashSet<Tag>();
+    private final Set<Tag> tags = new HashSet<>();
 
     /**
@@ -469,5 +469,5 @@
      */
     public Set<Tag> asSet() {
-        return new HashSet<Tag>(tags);
+        return new HashSet<>(tags);
     }
 
@@ -479,5 +479,5 @@
      */
     public List<Tag> asList() {
-        return new ArrayList<Tag>(tags);
+        return new ArrayList<>(tags);
     }
 
@@ -498,5 +498,5 @@
      */
     public Set<String> getKeys() {
-        HashSet<String> ret = new HashSet<String>();
+        HashSet<String> ret = new HashSet<>();
         for (Tag tag: tags) {
             ret.add(tag.getKey());
@@ -511,10 +511,10 @@
      */
     public Set<String> getKeysWithMultipleValues() {
-        HashMap<String, Integer> counters = new HashMap<String, Integer>();
+        HashMap<String, Integer> counters = new HashMap<>();
         for (Tag tag: tags) {
             Integer v = counters.get(tag.getKey());
             counters.put(tag.getKey(),(v==null) ? 1 : v+1);
         }
-        Set<String> ret = new HashSet<String>();
+        Set<String> ret = new HashSet<>();
         for (Entry<String, Integer> e : counters.entrySet()) {
             if (e.getValue() > 1) {
@@ -556,5 +556,5 @@
      */
     public Set<String> getValues() {
-        HashSet<String> ret = new HashSet<String>();
+        HashSet<String> ret = new HashSet<>();
         for (Tag tag: tags) {
             ret.add(tag.getValue());
@@ -572,5 +572,5 @@
      */
     public Set<String> getValues(String key) {
-        HashSet<String> ret = new HashSet<String>();
+        HashSet<String> ret = new HashSet<>();
         if (key == null) return ret;
         for (Tag tag: tags) {
@@ -733,6 +733,6 @@
         }
 
-        Set<String> values = new LinkedHashSet<String>();
-        Map<String, Collection<String>> originalSplitValues = new LinkedHashMap<String, Collection<String>>();
+        Set<String> values = new LinkedHashSet<>();
+        Map<String, Collection<String>> originalSplitValues = new LinkedHashMap<>();
         for (String v : originalValues) {
             List<String> vs = Arrays.asList(SPLIT_VALUES_PATTERN.split(v));
Index: trunk/src/org/openstreetmap/josm/data/osm/TigerUtils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/TigerUtils.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/TigerUtils.java	(revision 7005)
@@ -46,5 +46,5 @@
 
     public static String combineTags(String name, Set<String> values) {
-        TreeSet<Object> resultSet = new TreeSet<Object>();
+        TreeSet<Object> resultSet = new TreeSet<>();
         for (String value: values) {
             String[] parts = value.split(":");
@@ -68,5 +68,5 @@
 
     public static String combineTags(String name, String t1, String t2) {
-        Set<String> set = new TreeSet<String>();
+        Set<String> set = new TreeSet<>();
         set.add(t1);
         set.add(t2);
Index: trunk/src/org/openstreetmap/josm/data/osm/User.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/User.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/User.java	(revision 7005)
@@ -30,5 +30,5 @@
      * the map of known users
      */
-    private static Map<Long,User> userMap = new HashMap<Long,User>();
+    private static Map<Long,User> userMap = new HashMap<>();
     private static final User anonymous = createLocalUser(tr("<anonymous>"));
 
@@ -102,5 +102,5 @@
             name = "";
         }
-        List<User> ret = new ArrayList<User>();
+        List<User> ret = new ArrayList<>();
         for (User user: userMap.values()) {
             if (user.hasName(name)) {
@@ -120,5 +120,5 @@
 
     /** the user name */
-    private final Set<String> names = new HashSet<String>();
+    private final Set<String> names = new HashSet<>();
     /** the user id */
     private final long uid;
@@ -139,5 +139,5 @@
      */
     public List<String> getNames() {
-        return new ArrayList<String>(names);
+        return new ArrayList<>(names);
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/Way.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Way.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/Way.java	(revision 7005)
@@ -42,5 +42,5 @@
      */
     public List<Node> getNodes() {
-        return new CopyList<Node>(nodes);
+        return new CopyList<>(nodes);
     }
 
@@ -167,5 +167,5 @@
      */
     public Set<Node> getNeighbours(Node node) {
-        HashSet<Node> neigh = new HashSet<Node>();
+        HashSet<Node> neigh = new HashSet<>();
 
         if (node == null) return neigh;
@@ -191,5 +191,5 @@
      */
     public List<Pair<Node,Node>> getNodePairs(boolean sort) {
-        List<Pair<Node,Node>> chunkSet = new ArrayList<Pair<Node,Node>>();
+        List<Pair<Node,Node>> chunkSet = new ArrayList<>();
         if (isIncomplete()) return chunkSet;
         Node lastN = null;
@@ -200,5 +200,5 @@
                 continue;
             }
-            Pair<Node,Node> np = new Pair<Node,Node>(lastN, n);
+            Pair<Node,Node> np = new Pair<>(lastN, n);
             if (sort) {
                 Pair.sort(np);
@@ -284,5 +284,5 @@
             WayData wayData = (WayData) data;
 
-            List<Node> newNodes = new ArrayList<Node>(wayData.getNodes().size());
+            List<Node> newNodes = new ArrayList<>(wayData.getNodes().size());
             for (Long nodeId : wayData.getNodes()) {
                 Node node = (Node)getDataSet().getPrimitiveById(nodeId, OsmPrimitiveType.NODE);
@@ -386,5 +386,5 @@
         try {
             boolean closed = (lastNode() == firstNode() && selection.contains(lastNode()));
-            List<Node> copy = new ArrayList<Node>();
+            List<Node> copy = new ArrayList<>();
 
             for (Node n: nodes) {
Index: trunk/src/org/openstreetmap/josm/data/osm/WayData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/WayData.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/WayData.java	(revision 7005)
@@ -9,5 +9,5 @@
 public class WayData extends PrimitiveData implements IWay {
 
-    private List<Long> nodes = new ArrayList<Long>();
+    private List<Long> nodes = new ArrayList<>();
 
     public WayData() {
@@ -41,5 +41,5 @@
 
     public void setNodes(List<Long> nodes) {
-        this.nodes = new ArrayList<Long>(nodes);
+        this.nodes = new ArrayList<>(nodes);
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java	(revision 7005)
@@ -68,9 +68,12 @@
     }
 
-    private final Queue<AbstractDatasetChangedEvent> eventsInEDT = new LinkedBlockingQueue<AbstractDatasetChangedEvent>();
-    private final CopyOnWriteArrayList<ListenerInfo> inEDTListeners = new CopyOnWriteArrayList<ListenerInfo>();
-    private final CopyOnWriteArrayList<ListenerInfo> normalListeners = new CopyOnWriteArrayList<ListenerInfo>();
+    private final Queue<AbstractDatasetChangedEvent> eventsInEDT = new LinkedBlockingQueue<>();
+    private final CopyOnWriteArrayList<ListenerInfo> inEDTListeners = new CopyOnWriteArrayList<>();
+    private final CopyOnWriteArrayList<ListenerInfo> normalListeners = new CopyOnWriteArrayList<>();
     private final DataSetListener myListener = new DataSetListenerAdapter(this);
 
+    /**
+     * Constructs a new {@code DatasetEventManager}.
+     */
     public DatasetEventManager() {
         MapView.addEditLayerChangeListener(this);
@@ -139,5 +142,5 @@
         public void run() {
             while (!eventsInEDT.isEmpty()) {
-                List<AbstractDatasetChangedEvent> events = new ArrayList<AbstractDatasetChangedEvent>();
+                List<AbstractDatasetChangedEvent> events = new ArrayList<>();
                 events.addAll(eventsInEDT);
 
@@ -187,6 +190,5 @@
                             }
                         } else {
-                            consolidatedEvent = new DataChangedEvent(dataSet,
-                                    new ArrayList<AbstractDatasetChangedEvent>(Arrays.asList(consolidatedEvent)));
+                            consolidatedEvent = new DataChangedEvent(dataSet, new ArrayList<>(Arrays.asList(consolidatedEvent)));
                         }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/event/PrimitivesAddedEvent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/event/PrimitivesAddedEvent.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/event/PrimitivesAddedEvent.java	(revision 7005)
@@ -17,5 +17,5 @@
     public PrimitivesAddedEvent(DataSet dataSet, Collection<? extends OsmPrimitive> primitives, boolean wasIncomplete) {
         super(dataSet);
-        this.primitives = Collections.unmodifiableList(new ArrayList<OsmPrimitive>(primitives));
+        this.primitives = Collections.unmodifiableList(new ArrayList<>(primitives));
         this.wasIncomplete = wasIncomplete;
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/event/PrimitivesRemovedEvent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/event/PrimitivesRemovedEvent.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/event/PrimitivesRemovedEvent.java	(revision 7005)
@@ -17,5 +17,5 @@
     public PrimitivesRemovedEvent(DataSet dataSet, Collection<? extends OsmPrimitive> primitives, boolean wasComplete) {
         super(dataSet);
-        this.primitives = Collections.unmodifiableList(new ArrayList<OsmPrimitive>(primitives));
+        this.primitives = Collections.unmodifiableList(new ArrayList<>(primitives));
         this.wasComplete = wasComplete;
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java	(revision 7005)
@@ -45,6 +45,6 @@
 
     private Collection<? extends OsmPrimitive> selection;
-    private final CopyOnWriteArrayList<ListenerInfo> inEDTListeners = new CopyOnWriteArrayList<ListenerInfo>();
-    private final CopyOnWriteArrayList<ListenerInfo> normalListeners = new CopyOnWriteArrayList<ListenerInfo>();
+    private final CopyOnWriteArrayList<ListenerInfo> inEDTListeners = new CopyOnWriteArrayList<>();
+    private final CopyOnWriteArrayList<ListenerInfo> normalListeners = new CopyOnWriteArrayList<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/osm/history/History.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/History.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/History.java	(revision 7005)
@@ -25,5 +25,5 @@
 
     private static History filter(History history, FilterPredicate predicate) {
-        List<HistoryOsmPrimitive> out = new ArrayList<HistoryOsmPrimitive>();
+        List<HistoryOsmPrimitive> out = new ArrayList<>();
         for (HistoryOsmPrimitive primitive: history.versions) {
             if (predicate.matches(primitive)) {
@@ -56,5 +56,5 @@
         this.id = id;
         this.type = type;
-        this.versions = new ArrayList<HistoryOsmPrimitive>();
+        this.versions = new ArrayList<>();
         if (versions != null) {
             this.versions.addAll(versions);
@@ -63,5 +63,5 @@
 
     public History sortAscending() {
-        List<HistoryOsmPrimitive> copy = new ArrayList<HistoryOsmPrimitive>(versions);
+        List<HistoryOsmPrimitive> copy = new ArrayList<>(versions);
         Collections.sort(
                 copy,
@@ -77,5 +77,5 @@
 
     public History sortDescending() {
-        List<HistoryOsmPrimitive> copy = new ArrayList<HistoryOsmPrimitive>(versions);
+        List<HistoryOsmPrimitive> copy = new ArrayList<>(versions);
         Collections.sort(
                 copy,
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java	(revision 7005)
@@ -52,7 +52,7 @@
      */
     public HistoryDataSet() {
-        data = new HashMap<PrimitiveId, ArrayList<HistoryOsmPrimitive>>();
-        listeners = new CopyOnWriteArrayList<HistoryDataSetListener>();
-        changesets = new HashMap<Long, Changeset>();
+        data = new HashMap<>();
+        listeners = new CopyOnWriteArrayList<>();
+        changesets = new HashMap<>();
     }
 
@@ -187,5 +187,5 @@
 
     public Collection<Long> getChangesetIds() {
-        final HashSet<Long> ids = new HashSet<Long>();
+        final HashSet<Long> ids = new HashSet<>();
         for (Collection<HistoryOsmPrimitive> i : data.values()) {
             for (HistoryOsmPrimitive j : i) {
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java	(revision 7005)
@@ -89,5 +89,5 @@
         this.changesetId  = changesetId;
         this.timestamp = timestamp;
-        tags = new HashMap<String, String>();
+        tags = new HashMap<>();
     }
 
@@ -191,7 +191,7 @@
     public void setTags(Map<String,String> tags) {
         if (tags == null) {
-            this.tags = new HashMap<String, String>();
+            this.tags = new HashMap<>();
         } else {
-            this.tags = new HashMap<String, String>(tags);
+            this.tags = new HashMap<>(tags);
         }
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java	(revision 7005)
@@ -21,5 +21,5 @@
 public class HistoryRelation extends HistoryOsmPrimitive{
 
-    private List<RelationMemberData> members = new ArrayList<RelationMemberData>();
+    private List<RelationMemberData> members = new ArrayList<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java	(revision 7005)
@@ -21,5 +21,5 @@
 public class HistoryWay extends HistoryOsmPrimitive {
 
-    private List<Long> nodeIds = new ArrayList<Long>();
+    private List<Long> nodeIds = new ArrayList<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/AllNodesVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/AllNodesVisitor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/AllNodesVisitor.java	(revision 7005)
@@ -21,5 +21,5 @@
      * The resulting nodes collected so far.
      */
-    public Collection<Node> nodes = new HashSet<Node>();
+    public Collection<Node> nodes = new HashSet<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java	(revision 7005)
@@ -49,5 +49,5 @@
         this.selectionBase = selectionBase;
         this.hull = new DataSet();
-        this.mappedPrimitives = new HashMap<OsmPrimitive, PrimitiveData>();
+        this.mappedPrimitives = new HashMap<>();
     }
 
@@ -80,5 +80,5 @@
             return;
         WayData clone = w.save();
-        List<Long> newNodes = new ArrayList<Long>(w.getNodesCount());
+        List<Long> newNodes = new ArrayList<>(w.getNodesCount());
         for (Node n: w.getNodes()) {
             newNodes.add(mappedPrimitives.get(n).getUniqueId());
@@ -102,5 +102,5 @@
         }
 
-        List<RelationMemberData> newMembers = new ArrayList<RelationMemberData>();
+        List<RelationMemberData> newMembers = new ArrayList<>();
         for (RelationMember member: r.getMembers()) {
             newMembers.add(
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java	(revision 7005)
@@ -110,5 +110,5 @@
     }
 
-    private final List<Descriptor> descriptors = new ArrayList<Descriptor>();
+    private final List<Descriptor> descriptors = new ArrayList<>();
     private Class<? extends AbstractMapRenderer> activeRenderer = null;
 
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 7005)
@@ -183,5 +183,5 @@
             this.drawMultipolygon = drawMultipolygon;
             this.drawRestriction = drawRestriction;
-            styleElems = new ArrayList<StyleRecord>();
+            styleElems = new ArrayList<>();
         }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java	(revision 7005)
@@ -168,6 +168,6 @@
 
         // draw tagged ways first, then untagged ways, then highlighted ways
-        List<Way> highlightedWays = new ArrayList<Way>();
-        List<Way> untaggedWays = new ArrayList<Way>();
+        List<Way> highlightedWays = new ArrayList<>();
+        List<Way> untaggedWays = new ArrayList<>();
 
         for (final Way way : data.searchWays(bbox)){
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java	(revision 7005)
@@ -56,8 +56,8 @@
      */
     private static class MultipolygonRoleMatcher implements PreferenceChangedListener{
-        private final List<String> outerExactRoles = new ArrayList<String>();
-        private final List<String> outerRolePrefixes = new ArrayList<String>();
-        private final List<String> innerExactRoles = new ArrayList<String>();
-        private final List<String> innerRolePrefixes = new ArrayList<String>();
+        private final List<String> outerExactRoles = new ArrayList<>();
+        private final List<String> outerRolePrefixes = new ArrayList<>();
+        private final List<String> innerExactRoles = new ArrayList<>();
+        private final List<String> innerRolePrefixes = new ArrayList<>();
 
         private void initDefaults() {
@@ -202,7 +202,7 @@
         private PolyData(List<Node> nodes, boolean selected, Collection<Long> wayIds) {
             this.wayIds = Collections.unmodifiableCollection(wayIds);
-            this.nodes = new ArrayList<Node>(nodes);
+            this.nodes = new ArrayList<>(nodes);
             this.selected = selected;
-            this.inners = new ArrayList<Multipolygon.PolyData>();
+            this.inners = new ArrayList<>();
             this.poly = new Path2D.Double();
             this.poly.setWindingRule(Path2D.WIND_EVEN_ODD);
@@ -235,6 +235,6 @@
             this.poly = (Double) copy.poly.clone();
             this.wayIds = Collections.unmodifiableCollection(copy.wayIds);
-            this.nodes = new ArrayList<Node>(copy.nodes);
-            this.inners = new ArrayList<Multipolygon.PolyData>(copy.inners);
+            this.nodes = new ArrayList<>(copy.nodes);
+            this.inners = new ArrayList<>(copy.inners);
         }
 
@@ -297,5 +297,5 @@
                     nodes.addAll(w.getNodes());
                 } else if (!wayIds.isEmpty()) {
-                    List<Way> waysToJoin = new ArrayList<Way>();
+                    List<Way> waysToJoin = new ArrayList<>();
                     for (Long wayId : wayIds) {
                         Way w = (Way) ds.getPrimitiveById(wayId, OsmPrimitiveType.WAY);
@@ -347,9 +347,9 @@
     }
 
-    private final List<Way> innerWays = new ArrayList<Way>();
-    private final List<Way> outerWays = new ArrayList<Way>();
-    private final List<PolyData> innerPolygons = new ArrayList<PolyData>();
-    private final List<PolyData> outerPolygons = new ArrayList<PolyData>();
-    private final List<PolyData> combinedPolygons = new ArrayList<PolyData>();
+    private final List<Way> innerWays = new ArrayList<>();
+    private final List<Way> outerWays = new ArrayList<>();
+    private final List<PolyData> innerPolygons = new ArrayList<>();
+    private final List<PolyData> outerPolygons = new ArrayList<>();
+    private final List<PolyData> combinedPolygons = new ArrayList<>();
 
     private boolean incomplete;
@@ -397,5 +397,5 @@
 
     private void createPolygons(List<Way> ways, List<PolyData> result) {
-        List<Way> waysToJoin = new ArrayList<Way>();
+        List<Way> waysToJoin = new ArrayList<>();
         for (Way way: ways) {
             if (way.isClosed()) {
@@ -413,5 +413,5 @@
     public static Collection<JoinedWay> joinWays(Collection<Way> waysToJoin)
     {
-        final Collection<JoinedWay> result = new ArrayList<JoinedWay>();
+        final Collection<JoinedWay> result = new ArrayList<>();
         final Way[] joinArray = waysToJoin.toArray(new Way[waysToJoin.size()]);
         int left = waysToJoin.size();
@@ -420,5 +420,5 @@
             boolean selected = false;
             List<Node> nodes = null;
-            Set<Long> wayIds = new HashSet<Long>();
+            Set<Long> wayIds = new HashSet<>();
             boolean joined = true;
             while (joined && left > 0) {
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java	(revision 7005)
@@ -47,6 +47,6 @@
     
     private MultipolygonCache() {
-        this.cache = new HashMap<NavigatableComponent, Map<DataSet, Map<Relation, Multipolygon>>>();
-        this.selectedPolyData = new ArrayList<Multipolygon.PolyData>();
+        this.cache = new HashMap<>();
+        this.selectedPolyData = new ArrayList<>();
         Main.addProjectionChangeListener(this);
         DataSet.addSelectionListener(this);
@@ -71,9 +71,9 @@
             Map<DataSet, Map<Relation, Multipolygon>> map1 = cache.get(nc);
             if (map1 == null) {
-                cache.put(nc, map1 = new HashMap<DataSet, Map<Relation, Multipolygon>>());
+                cache.put(nc, map1 = new HashMap<>());
             }
             Map<Relation, Multipolygon> map2 = map1.get(r.getDataSet());
             if (map2 == null) {
-                map1.put(r.getDataSet(), map2 = new HashMap<Relation, Multipolygon>());
+                map1.put(r.getDataSet(), map2 = new HashMap<>());
             }
             multipolygon = map2.get(r);
@@ -113,5 +113,5 @@
     
     private final Collection<Map<Relation, Multipolygon>> getMapsFor(DataSet ds) {
-        List<Map<Relation, Multipolygon>> result = new ArrayList<Map<Relation, Multipolygon>>();
+        List<Map<Relation, Multipolygon>> result = new ArrayList<>();
         for (Map<DataSet, Map<Relation, Multipolygon>> map : cache.values()) {
             Map<Relation, Multipolygon> map2 = map.get(ds);
Index: trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 7005)
@@ -75,5 +75,5 @@
         public boolean hasValue;
 
-        public static final Map<String, Param> paramsByKey = new HashMap<String, Param>();
+        public static final Map<String, Param> paramsByKey = new HashMap<>();
         static {
             for (Param p : Param.values()) {
@@ -161,5 +161,5 @@
 
     private Map<String, String> parseParameterList(String pref) throws ProjectionConfigurationException {
-        Map<String, String> parameters = new HashMap<String, String>();
+        Map<String, String> parameters = new HashMap<>();
         String[] parts = Utils.WHITE_SPACES_PATTERN.split(pref.trim());
         if (pref.trim().isEmpty()) {
@@ -292,5 +292,5 @@
         if (numStr.length != 3 && numStr.length != 7)
             throw new ProjectionConfigurationException(tr("Unexpected number of arguments for parameter ''towgs84'' (must be 3 or 7)"));
-        List<Double> towgs84Param = new ArrayList<Double>();
+        List<Double> towgs84Param = new ArrayList<>();
         for (String str : numStr) {
             try {
Index: trunk/src/org/openstreetmap/josm/data/projection/Projections.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/Projections.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/projection/Projections.java	(revision 7005)
@@ -60,9 +60,9 @@
      * should be compatible to PROJ.4
      */
-    public static final Map<String, ProjFactory> projs = new HashMap<String, ProjFactory>();
-    public static final Map<String, Ellipsoid> ellipsoids = new HashMap<String, Ellipsoid>();
-    public static final Map<String, Datum> datums = new HashMap<String, Datum>();
-    public static final Map<String, NTV2GridShiftFileWrapper> nadgrids = new HashMap<String, NTV2GridShiftFileWrapper>();
-    public static final Map<String, Pair<String, String>> inits = new HashMap<String, Pair<String, String>>();
+    public static final Map<String, ProjFactory> projs = new HashMap<>();
+    public static final Map<String, Ellipsoid> ellipsoids = new HashMap<>();
+    public static final Map<String, Datum> datums = new HashMap<>();
+    public static final Map<String, NTV2GridShiftFileWrapper> nadgrids = new HashMap<>();
+    public static final Map<String, Pair<String, String>> inits = new HashMap<>();
 
     static {
@@ -158,7 +158,7 @@
     }
 
-    private static final Set<String> allCodes = new HashSet<String>();
-    private static final Map<String, ProjectionChoice> allProjectionChoicesByCode = new HashMap<String, ProjectionChoice>();
-    private static final Map<String, Projection> projectionsByCode_cache = new HashMap<String, Projection>();
+    private static final Set<String> allCodes = new HashSet<>();
+    private static final Map<String, ProjectionChoice> allProjectionChoicesByCode = new HashMap<>();
+    private static final Map<String, Projection> projectionsByCode_cache = new HashMap<>();
 
     static {
Index: trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java	(revision 7005)
@@ -167,5 +167,5 @@
     private NTV2SubGrid[] createSubGridTree(NTV2SubGrid[] subGrid) {
         int topLevelCount = 0;
-        HashMap<String, List<NTV2SubGrid>> subGridMap = new HashMap<String, List<NTV2SubGrid>>();
+        HashMap<String, List<NTV2SubGrid>> subGridMap = new HashMap<>();
         for (int i = 0; i < subGrid.length; i++) {
             if ("NONE".equalsIgnoreCase(subGrid[i].getParentSubGridName())) {
Index: trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 7005)
@@ -77,5 +77,5 @@
     public static double griddetail;
 
-    public static final Collection<String> ignoredErrors = new TreeSet<String>();
+    public static final Collection<String> ignoredErrors = new TreeSet<>();
 
     /**
@@ -124,5 +124,5 @@
     private static Map<String, Test> allTestsMap;
     static {
-        allTestsMap = new HashMap<String, Test>();
+        allTestsMap = new HashMap<>();
         for (Class<Test> testClass : allAvailableTests) {
             try {
@@ -226,5 +226,5 @@
         applyPrefs(allTestsMap, false);
         applyPrefs(allTestsMap, true);
-        return new TreeMap<String, Test>(allTestsMap);
+        return new TreeMap<>(allTestsMap);
     }
 
@@ -263,5 +263,5 @@
     public static Collection<Test> getEnabledTests(boolean beforeUpload) {
         Collection<Test> enabledTests = getTests();
-        for (Test t : new ArrayList<Test>(enabledTests)) {
+        for (Test t : new ArrayList<>(enabledTests)) {
             if (beforeUpload ? t.testBeforeUpload : t.enabled) {
                 continue;
Index: trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java	(revision 7005)
@@ -34,6 +34,6 @@
     private boolean selected;
     
-    private final Set<PaintedPoint> paintedPoints = new HashSet<PaintedPoint>();
-    private final Set<PaintedSegment> paintedSegments = new HashSet<PaintedSegment>();
+    private final Set<PaintedPoint> paintedPoints = new HashSet<>();
+    private final Set<PaintedSegment> paintedSegments = new HashSet<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/validation/Test.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/Test.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/Test.java	(revision 7005)
@@ -58,5 +58,5 @@
 
     /** The list of errors */
-    protected List<TestError> errors = new ArrayList<TestError>(30);
+    protected List<TestError> errors = new ArrayList<>(30);
 
     /** Whether the test is run on a partial selection data */
@@ -152,5 +152,5 @@
         this.progressMonitor.beginTask(startMessage);
         Main.debug(startMessage);
-        this.errors = new ArrayList<TestError>(30);
+        this.errors = new ArrayList<>(30);
         this.startTime = System.currentTimeMillis();
     }
@@ -307,5 +307,5 @@
      */
     protected final Command deletePrimitivesIfNeeded(Collection<? extends OsmPrimitive> primitives) {
-        Collection<OsmPrimitive> primitivesToDelete = new ArrayList<OsmPrimitive>();
+        Collection<OsmPrimitive> primitivesToDelete = new ArrayList<>();
         for (OsmPrimitive p : primitives) {
             if (!p.isDeleted()) {
Index: trunk/src/org/openstreetmap/josm/data/validation/TestError.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/TestError.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/TestError.java	(revision 7005)
@@ -133,5 +133,5 @@
      */
     public Collection<? extends OsmPrimitive> getSelectablePrimitives() {
-        List<OsmPrimitive> selectablePrimitives = new ArrayList<OsmPrimitive>(primitives.size());
+        List<OsmPrimitive> selectablePrimitives = new ArrayList<>(primitives.size());
         for (OsmPrimitive o : primitives) {
             if (o.isSelectable()) {
@@ -170,5 +170,5 @@
      */
     public String getIgnoreState() {
-        Collection<String> strings = new TreeSet<String>();
+        Collection<String> strings = new TreeSet<>();
         StringBuilder ignorestring = new StringBuilder(getIgnoreSubGroup());
         for (OsmPrimitive o : primitives) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java	(revision 7005)
@@ -117,11 +117,11 @@
         if (r.hasTag("type", ASSOCIATED_STREET)) {
             // Used to count occurences of each house number in order to find duplicates
-            Map<String, List<OsmPrimitive>> map = new HashMap<String, List<OsmPrimitive>>();
+            Map<String, List<OsmPrimitive>> map = new HashMap<>();
             // Used to detect different street names
             String relationName = r.get("name");
-            Set<OsmPrimitive> wrongStreetNames = new HashSet<OsmPrimitive>();
+            Set<OsmPrimitive> wrongStreetNames = new HashSet<>();
             // Used to check distance
-            Set<OsmPrimitive> houses = new HashSet<OsmPrimitive>();
-            Set<Way> street = new HashSet<Way>();
+            Set<OsmPrimitive> houses = new HashSet<>();
+            Set<Way> street = new HashSet<>();
             for (RelationMember m : r.getMembers()) {
                 String role = m.getRole();
@@ -134,5 +134,5 @@
                         List<OsmPrimitive> list = map.get(number);
                         if (list == null) {
-                            map.put(number, list = new ArrayList<OsmPrimitive>());
+                            map.put(number, list = new ArrayList<>());
                         }
                         list.add(p);
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java	(revision 7005)
@@ -59,5 +59,5 @@
         }
 
-        coastlines = new LinkedList<Way>();
+        coastlines = new LinkedList<>();
     }
 
@@ -145,9 +145,9 @@
             }
 
-            List<OsmPrimitive> primitives = new ArrayList<OsmPrimitive>();
+            List<OsmPrimitive> primitives = new ArrayList<>();
             primitives.add(c1);
 
             if (headWays == 0 || tailWays == 0) {
-                List<OsmPrimitive> highlight = new ArrayList<OsmPrimitive>();
+                List<OsmPrimitive> highlight = new ArrayList<>();
 
                 if (headWays == 0 && head.getCoor().isIn(downloadedArea)) {
@@ -178,5 +178,5 @@
 
             if (unordered) {
-                List<OsmPrimitive> highlight = new ArrayList<OsmPrimitive>();
+                List<OsmPrimitive> highlight = new ArrayList<>();
 
                 if (headWays > 1 || headUnordered || headReversed || reversed) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java	(revision 7005)
@@ -23,13 +23,16 @@
 
     final OpeningHourTest openingHourTest = new OpeningHourTest();
-    static final Set<String> RESTRICTION_TYPES = new HashSet<String>(Arrays.asList("oneway", "toll", "noexit", "maxspeed", "minspeed",
+    static final Set<String> RESTRICTION_TYPES = new HashSet<>(Arrays.asList("oneway", "toll", "noexit", "maxspeed", "minspeed",
             "maxweight", "maxaxleload", "maxheight", "maxwidth", "maxlength", "overtaking", "maxgcweight", "maxgcweightrating", "fee"));
-    static final Set<String> RESTRICTION_VALUES = new HashSet<String>(Arrays.asList("yes", "official", "designated", "destination",
+    static final Set<String> RESTRICTION_VALUES = new HashSet<>(Arrays.asList("yes", "official", "designated", "destination",
             "delivery", "permissive", "private", "agricultural", "forestry", "no"));
-    static final Set<String> TRANSPORT_MODES = new HashSet<String>(Arrays.asList("access", "foot", "ski", "inline_skates", "ice_skates",
+    static final Set<String> TRANSPORT_MODES = new HashSet<>(Arrays.asList("access", "foot", "ski", "inline_skates", "ice_skates",
             "horse", "vehicle", "bicycle", "carriage", "trailer", "caravan", "motor_vehicle", "motorcycle", "moped", "mofa",
             "motorcar", "motorhome", "psv", "bus", "taxi", "tourist_bus", "goods", "hgv", "agricultural", "atv", "snowmobile"
             /*,"hov","emergency","hazmat","disabled"*/));
 
+    /**
+     * Constructs a new {@code ConditionalKeys}.
+     */
     public ConditionalKeys() {
         super(tr("Conditional Keys"), tr("Tests for the correct usage of ''*:conditional'' tags."));
@@ -94,5 +97,5 @@
         public static List<ConditionalValue> parse(String value) throws ConditionalParsingException {
             // <restriction-value> @ <condition>[;<restriction-value> @ <condition>]
-            final List<ConditionalValue> r = new ArrayList<ConditionalValue>();
+            final List<ConditionalValue> r = new ArrayList<>();
             final Pattern part = Pattern.compile("([^@\\p{Space}][^@]*?)" + "\\s*@\\s*" + "(\\([^)\\p{Space}][^)]+?\\)|[^();\\p{Space}][^();]*?)\\s*");
             final Matcher m = Pattern.compile("(" + part + ")(;\\s*" + part + ")*").matcher(value);
@@ -137,5 +140,5 @@
 
     public List<TestError> validatePrimitive(OsmPrimitive p) {
-        final List<TestError> errors = new ArrayList<TestError>();
+        final List<TestError> errors = new ArrayList<>();
         for (final String key : Utils.filter(p.keySet(), Predicates.stringMatchesPattern(Pattern.compile(".*:conditional$")))) {
             if (!isKeyValid(key)) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 7005)
@@ -185,7 +185,7 @@
     public void startTest(ProgressMonitor monitor) {
         super.startTest(monitor);
-        cellSegments = new HashMap<Point2D,List<WaySegment>>(1000);
-        errorSegments = new HashSet<WaySegment>();
-        seenWays = new HashMap<List<Way>, List<WaySegment>>(50);
+        cellSegments = new HashMap<>(1000);
+        errorSegments = new HashSet<>();
+        seenWays = new HashMap<>(50);
     }
 
@@ -247,5 +247,5 @@
                     prims = Arrays.asList(es1.way, es2.way);
                     if ((highlight = seenWays.get(prims)) == null) {
-                        highlight = new ArrayList<WaySegment>();
+                        highlight = new ArrayList<>();
                         highlight.add(es1);
                         highlight.add(es2);
@@ -278,9 +278,9 @@
     public List<List<WaySegment>> getSegments(EastNorth n1, EastNorth n2) {
 
-        List<List<WaySegment>> cells = new ArrayList<List<WaySegment>>();
+        List<List<WaySegment>> cells = new ArrayList<>();
         for (Point2D cell : ValUtil.getSegmentCells(n1, n2, OsmValidator.griddetail)) {
             List<WaySegment> segments = cellSegments.get(cell);
             if (segments == null) {
-                segments = new ArrayList<WaySegment>();
+                segments = new ArrayList<>();
                 cellSegments.put(cell, segments);
             }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 7005)
@@ -118,5 +118,5 @@
     public void startTest(ProgressMonitor monitor) {
         super.startTest(monitor);
-        potentialDuplicates = new Storage<Object>(new NodeHash());
+        potentialDuplicates = new Storage<>(new NodeHash());
     }
 
@@ -133,5 +133,5 @@
             // multiple nodes at the same position -> check if all nodes have a distinct elevation
             List<Node> nodes = (List<Node>) v;
-            Set<String> eles = new HashSet<String>();
+            Set<String> eles = new HashSet<>();
             for (Node n : nodes) {
                 String ele = n.get("ele");
@@ -161,12 +161,12 @@
      */
     public List<TestError> buildTestErrors(Test parentTest, List<Node> nodes) {
-        List<TestError> errors = new ArrayList<TestError>();
-
-        MultiMap<Map<String,String>, OsmPrimitive> mm = new MultiMap<Map<String,String>, OsmPrimitive>();
+        List<TestError> errors = new ArrayList<>();
+
+        MultiMap<Map<String,String>, OsmPrimitive> mm = new MultiMap<>();
         for (Node n: nodes) {
             mm.put(n.getKeys(), n);
         }
 
-        Map<String,Boolean> typeMap=new HashMap<String,Boolean>();
+        Map<String,Boolean> typeMap=new HashMap<>();
         String[] types = {"none", "highway", "railway", "waterway", "boundary", "power", "natural", "landuse", "building"};
 
@@ -334,5 +334,5 @@
         //
         if (!mm.isEmpty()) {
-            List<OsmPrimitive> duplicates = new ArrayList<OsmPrimitive>();
+            List<OsmPrimitive> duplicates = new ArrayList<>();
             for (Set<OsmPrimitive> l: mm.values()) {
                 duplicates.addAll(l);
@@ -365,5 +365,5 @@
                 //
                 Node n1 = (Node)potentialDuplicates.get(n);
-                List<Node> nodes = new ArrayList<Node>(2);
+                List<Node> nodes = new ArrayList<>(2);
                 nodes.add(n1);
                 nodes.add(n);
@@ -385,6 +385,6 @@
     public Command fixError(TestError testError) {
         if (!isFixable(testError)) return null;
-        Collection<OsmPrimitive> sel = new LinkedList<OsmPrimitive>(testError.getPrimitives());
-        LinkedHashSet<Node> nodes = new LinkedHashSet<Node>(OsmPrimitive.getFilteredList(sel, Node.class));
+        Collection<OsmPrimitive> sel = new LinkedList<>(testError.getPrimitives());
+        LinkedHashSet<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 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 7005)
@@ -72,10 +72,10 @@
             type = src.getType();
             relId = 0;
-            coor = new ArrayList<LatLon>();
+            coor = new ArrayList<>();
 
             if (src.isNode()) {
                 Node r = src.getNode();
                 tags = r.getKeys();
-                coor = new ArrayList<LatLon>(1);
+                coor = new ArrayList<>(1);
                 coor.add(r.getCoor());
             }
@@ -84,5 +84,5 @@
                 tags = r.getKeys();
                 List<Node> wNodes = r.getNodes();
-                coor = new ArrayList<LatLon>(wNodes.size());
+                coor = new ArrayList<>(wNodes.size());
                 for (Node wNode : wNodes) {
                     coor.add(wNode.getCoor());
@@ -93,5 +93,5 @@
                 tags = r.getKeys();
                 relId = r.getId();
-                coor = new ArrayList<LatLon>();
+                coor = new ArrayList<>();
             }
         }
@@ -109,5 +109,5 @@
          */
         public RelationMembers(List<RelationMember> members) {
-            this.members = new ArrayList<RelMember>(members.size());
+            this.members = new ArrayList<>(members.size());
             for (RelationMember member : members) {
                 this.members.add(new RelMember(member));
@@ -172,5 +172,5 @@
 
     /** List of keys without useful information */
-    private final Set<String> ignoreKeys = new HashSet<String>(OsmPrimitive.getUninterestingKeys());
+    private final Set<String> ignoreKeys = new HashSet<>(OsmPrimitive.getUninterestingKeys());
 
     /**
@@ -185,6 +185,6 @@
     public void startTest(ProgressMonitor monitor) {
         super.startTest(monitor);
-        relations = new MultiMap<RelationPair, OsmPrimitive>(1000);
-        relations_nokeys = new MultiMap<List<RelationMember>, OsmPrimitive>(1000);
+        relations = new MultiMap<>(1000);
+        relations_nokeys = new MultiMap<>(1000);
     }
 
@@ -229,5 +229,5 @@
         if (testError.getCode() == SAME_RELATION) return null;
         Collection<? extends OsmPrimitive> sel = testError.getPrimitives();
-        HashSet<Relation> relFix = new HashSet<Relation>();
+        HashSet<Relation> relFix = new HashSet<>();
 
         for (OsmPrimitive osm : sel)
@@ -263,5 +263,5 @@
         }
 
-        Collection<Command> commands = new LinkedList<Command>();
+        Collection<Command> commands = new LinkedList<>();
 
         // Fix relations.
@@ -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<Relation>();
+        HashSet<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 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java	(revision 7005)
@@ -107,7 +107,7 @@
     public void startTest(ProgressMonitor monitor) {
         super.startTest(monitor);
-        ways = new MultiMap<WayPair, OsmPrimitive>(1000);
-        waysNoTags = new MultiMap<WayPairNoTags, OsmPrimitive>(1000);
-        knownHashCodes = new HashSet<Integer>(1000);
+        ways = new MultiMap<>(1000);
+        waysNoTags = new MultiMap<>(1000);
+        knownHashCodes = new HashSet<>(1000);
     }
 
@@ -168,5 +168,5 @@
             return;
         List<Node> wNodes = w.getNodes();                            // The original list of nodes for this way
-        List<Node> wNodesToUse = new ArrayList<Node>(wNodes.size()); // The list that will be considered for this test
+        List<Node> wNodesToUse = new ArrayList<>(wNodes.size()); // The list that will be considered for this test
         if (w.isClosed()) {
             // In case of a closed way, build the list of lat/lon starting from the node with the lowest id
@@ -192,5 +192,5 @@
         }
         // Build the list of lat/lon
-        List<LatLon> wLat = new ArrayList<LatLon>(wNodesToUse.size());
+        List<LatLon> wLat = new ArrayList<>(wNodesToUse.size());
         for (Node node : wNodesToUse) {
             wLat.add(node.getCoor());
@@ -200,5 +200,5 @@
             int hash = wLat.hashCode();
             if (!knownHashCodes.contains(hash)) {
-                List<LatLon> reversedwLat = new ArrayList<LatLon>(wLat);
+                List<LatLon> reversedwLat = new ArrayList<>(wLat);
                    Collections.reverse(reversedwLat);
                 int reverseHash = reversedwLat.hashCode();
@@ -226,5 +226,5 @@
     public Command fixError(TestError testError) {
         Collection<? extends OsmPrimitive> sel = testError.getPrimitives();
-        HashSet<Way> ways = new HashSet<Way>();
+        HashSet<Way> ways = new HashSet<>();
 
         for (OsmPrimitive osm : sel) {
@@ -261,5 +261,5 @@
         }
 
-        Collection<Command> commands = new LinkedList<Command>();
+        Collection<Command> commands = new LinkedList<>();
 
         // Fix relations.
@@ -294,5 +294,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<Way>();
+        HashSet<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 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java	(revision 7005)
@@ -111,8 +111,8 @@
 
     private void testWrongRoundabout(Way w) {
-        Map<String, List<Way>> map = new HashMap<String, List<Way>>();
+        Map<String, List<Way>> map = new HashMap<>();
         // Count all highways (per type) connected to this roundabout, except links
         // As roundabouts are closed ways, take care of not processing the first/last node twice
-        for (Node n : new HashSet<Node>(w.getNodes())) {
+        for (Node n : new HashSet<>(w.getNodes())) {
             for (Way h : Utils.filteredCollection(n.getReferrers(), Way.class)) {
                 String value = h.get("highway");
@@ -120,5 +120,5 @@
                     List<Way> list = map.get(value);
                     if (list == null) {
-                        map.put(value, list = new ArrayList<Way>());
+                        map.put(value, list = new ArrayList<>());
                     }
                     list.add(h);
@@ -150,5 +150,5 @@
         }
 
-        final HashSet<OsmPrimitive> referrers = new HashSet<OsmPrimitive>();
+        final HashSet<OsmPrimitive> referrers = new HashSet<>();
         referrers.addAll(way.firstNode().getReferrers());
         referrers.addAll(way.lastNode().getReferrers());
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/Lanes.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/Lanes.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Lanes.java	(revision 7005)
@@ -41,5 +41,5 @@
             return;
         }
-        final Set<Integer> lanesCount = new HashSet<Integer>(Utils.transform(keysForPattern, new Utils.Function<String, Integer>() {
+        final Set<Integer> lanesCount = new HashSet<>(Utils.transform(keysForPattern, new Utils.Function<String, Integer>() {
             @Override
             public Integer apply(String key) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 7005)
@@ -69,13 +69,13 @@
     }
 
-    final List<TagCheck> checks = new ArrayList<TagCheck>();
+    final List<TagCheck> checks = new ArrayList<>();
 
     static class TagCheck implements Predicate<OsmPrimitive> {
         protected final MapCSSRule rule;
-        protected final List<PrimitiveToTag> change = new ArrayList<PrimitiveToTag>();
-        protected final Map<String, String> keyChange = new LinkedHashMap<String, String>();
-        protected final List<String> alternatives = new ArrayList<String>();
-        protected final Map<Instruction.AssignmentInstruction, Severity> errors = new HashMap<Instruction.AssignmentInstruction, Severity>();
-        protected final Map<String, Boolean> assertions = new HashMap<String, Boolean>();
+        protected final List<PrimitiveToTag> change = new ArrayList<>();
+        protected final Map<String, String> keyChange = new LinkedHashMap<>();
+        protected final List<String> alternatives = new ArrayList<>();
+        protected final Map<Instruction.AssignmentInstruction, Severity> errors = new HashMap<>();
+        protected final Map<String, Boolean> assertions = new HashMap<>();
 
         TagCheck(MapCSSRule rule) {
@@ -180,5 +180,5 @@
             // Ignore "meta" rule(s) from external rules of JOSM wiki
             removeMetaRules(source);
-            return new ArrayList<TagCheck>(Utils.transform(source.rules, new Utils.Function<MapCSSRule, TagCheck>() {
+            return new ArrayList<>(Utils.transform(source.rules, new Utils.Function<MapCSSRule, TagCheck>() {
                 @Override
                 public TagCheck apply(MapCSSRule x) {
@@ -297,5 +297,5 @@
             }
             final Selector matchingSelector = whichSelectorMatchesPrimitive(p);
-            Collection<Command> cmds = new LinkedList<Command>();
+            Collection<Command> cmds = new LinkedList<>();
             for (PrimitiveToTag toTag : change) {
                 final Tag tag = toTag.apply(p);
@@ -416,5 +416,5 @@
      */
     public Collection<TestError> getErrorsForPrimitive(OsmPrimitive p, boolean includeOtherSeverity) {
-        final ArrayList<TestError> r = new ArrayList<TestError>();
+        final ArrayList<TestError> r = new ArrayList<>();
         final Environment env = new Environment(p, new MultiCascade(), Environment.DEFAULT_LAYER, null);
         for (TagCheck check : checks) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 7005)
@@ -57,6 +57,6 @@
     private static ElemStyles styles;
 
-    private final List<List<Node>> nonClosedWays = new ArrayList<List<Node>>();
-    private final Set<String> keysCheckedByAnotherTest = new HashSet<String>();
+    private final List<List<Node>> nonClosedWays = new ArrayList<>();
+    private final Set<String> keysCheckedByAnotherTest = new HashSet<>();
 
     /**
@@ -92,6 +92,6 @@
 
     private List<List<Node>> joinWays(Collection<Way> ways) {
-        List<List<Node>> result = new ArrayList<List<Node>>();
-        List<Way> waysToJoin = new ArrayList<Way>();
+        List<List<Node>> result = new ArrayList<>();
+        List<Way> waysToJoin = new ArrayList<>();
         for (Way way : ways) {
             if (way.isClosed()) {
@@ -123,5 +123,5 @@
 
     private List<GeneralPath> createPolygons(List<List<Node>> joinedWays) {
-        List<GeneralPath> result = new ArrayList<GeneralPath>();
+        List<GeneralPath> result = new ArrayList<>();
         for (List<Node> way : joinedWays) {
             result.add(createPath(way));
@@ -229,5 +229,5 @@
 
                         if (areaInner != null && area.equals(areaInner)) {
-                            List<OsmPrimitive> l = new ArrayList<OsmPrimitive>();
+                            List<OsmPrimitive> l = new ArrayList<>();
                             l.add(r);
                             l.add(wInner);
@@ -240,5 +240,5 @@
                             AreaElemStyle areaOuter = ElemStyles.getAreaElemStyle(wOuter, false);
                             if (areaOuter != null && !area.equals(areaOuter)) {
-                                List<OsmPrimitive> l = new ArrayList<OsmPrimitive>();
+                                List<OsmPrimitive> l = new ArrayList<>();
                                 l.add(r);
                                 l.add(wOuter);
@@ -251,5 +251,5 @@
             }
 
-            List<Node> openNodes = new LinkedList<Node>();
+            List<Node> openNodes = new LinkedList<>();
             for (List<Node> w : nonClosedWays) {
                 if (w.size()<1) continue;
@@ -258,5 +258,5 @@
             }
             if (!openNodes.isEmpty()) {
-                List<OsmPrimitive> primitives = new LinkedList<OsmPrimitive>();
+                List<OsmPrimitive> primitives = new LinkedList<>();
                 primitives.add(r);
                 primitives.addAll(openNodes);
@@ -282,5 +282,5 @@
                 }
                 if (outside || crossing) {
-                    List<List<Node>> highlights = new ArrayList<List<Node>>();
+                    List<List<Node>> highlights = new ArrayList<>();
                     highlights.add(pdInner);
                     if (outside) {
@@ -319,5 +319,5 @@
                 }
             }
-            List<OsmPrimitive> newPrimitives = new ArrayList<OsmPrimitive>(primitives);
+            List<OsmPrimitive> newPrimitives = new ArrayList<>(primitives);
             newPrimitives.add(0, r);
             error.setPrimitives(newPrimitives);
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java	(revision 7005)
@@ -4,5 +4,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map.Entry;
@@ -61,5 +60,5 @@
     @Override
     public void check(OsmPrimitive p) {
-        HashSet<String> names = new HashSet<String>();
+        HashSet<String> names = new HashSet<>();
 
         for (Entry<String, String> entry : p.getKeys().entrySet()) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 7005)
@@ -191,5 +191,5 @@
             return Collections.emptyList();
         }
-        final List<OpeningHoursTestError> errors = new ArrayList<OpeningHoursTestError>();
+        final List<OpeningHoursTestError> errors = new ArrayList<>();
         try {
             final Object r = parse(value, mode);
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java	(revision 7005)
@@ -64,5 +64,5 @@
     public void startTest(ProgressMonitor monitor)  {
         super.startTest(monitor);
-        nodePairs = new MultiMap<Pair<Node,Node>, WaySegment>(1000);
+        nodePairs = new MultiMap<>(1000);
     }
 
@@ -78,13 +78,13 @@
     @Override
     public void endTest() {
-        Map<List<Way>, Set<WaySegment>> seenWays = new HashMap<List<Way>, Set<WaySegment>>(500);
-
-        Collection<TestError> preliminaryErrors = new ArrayList<TestError>();
+        Map<List<Way>, Set<WaySegment>> seenWays = new HashMap<>(500);
+
+        Collection<TestError> preliminaryErrors = new ArrayList<>();
         for (Set<WaySegment> duplicated : nodePairs.values()) {
             int ways = duplicated.size();
 
             if (ways > 1) {
-                List<OsmPrimitive> prims = new ArrayList<OsmPrimitive>();
-                List<Way> currentWays = new ArrayList<Way>();
+                List<OsmPrimitive> prims = new ArrayList<>();
+                List<Way> currentWays = new ArrayList<>();
                 Collection<WaySegment> highlight;
                 int highway = 0;
@@ -178,5 +178,5 @@
     protected static Set<WaySegment> checkDuplicateWaySegment(Way w) {
         // test for ticket #4959
-        Set<WaySegment> segments = new TreeSet<WaySegment>(new Comparator<WaySegment>() {
+        Set<WaySegment> segments = new TreeSet<>(new Comparator<WaySegment>() {
             @Override
             public int compare(WaySegment o1, WaySegment o2) {
@@ -190,5 +190,5 @@
             }
         });
-        final Set<WaySegment> duplicateWaySegments = new HashSet<WaySegment>();
+        final Set<WaySegment> duplicateWaySegments = new HashSet<>();
 
         for (int i = 0; i < w.getNodesCount() - 1; i++) {
@@ -224,5 +224,5 @@
                 continue;
             }
-            nodePairs.put(Pair.sort(new Pair<Node,Node>(lastN, n)),
+            nodePairs.put(Pair.sort(new Pair<>(lastN, n)),
                     new WaySegment(w, i));
             lastN = n;
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java	(revision 7005)
@@ -45,9 +45,9 @@
     public static final Collection<String> POWER_ALLOWED_TAGS = Arrays.asList("switch", "transformer", "busbar", "generator");
 
-    private final Map<Way, String> towerPoleTagMap = new HashMap<Way, String>();
-
-    private final List<PowerLineError> potentialErrors = new ArrayList<PowerLineError>();
-
-    private final List<OsmPrimitive> powerStations = new ArrayList<OsmPrimitive>();
+    private final Map<Way, String> towerPoleTagMap = new HashMap<>();
+
+    private final List<PowerLineError> potentialErrors = new ArrayList<>();
+
+    private final List<OsmPrimitive> powerStations = new ArrayList<>();
 
     /**
@@ -118,5 +118,5 @@
     protected final boolean isInPowerStation(Node n) {
         for (OsmPrimitive station : powerStations) {
-            List<List<Node>> nodesLists = new ArrayList<List<Node>>();
+            List<List<Node>> nodesLists = new ArrayList<>();
             if (station instanceof Way) {
                 nodesLists.add(((Way)station).getNodes());
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 7005)
@@ -65,5 +65,5 @@
     }
 
-    private static Collection<TaggingPreset> relationpresets = new LinkedList<TaggingPreset>();
+    private static Collection<TaggingPreset> relationpresets = new LinkedList<>();
 
     /**
@@ -87,8 +87,8 @@
     private static class RoleInfo {
         private int total = 0;
-        private Collection<Node> nodes = new LinkedList<Node>();
-        private Collection<Way> ways = new LinkedList<Way>();
-        private Collection<Way> openways = new LinkedList<Way>();
-        private Collection<Relation> relations = new LinkedList<Relation>();
+        private Collection<Node> nodes = new LinkedList<>();
+        private Collection<Way> ways = new LinkedList<>();
+        private Collection<Way> openways = new LinkedList<>();
+        private Collection<Relation> relations = new LinkedList<>();
     }
 
@@ -96,5 +96,5 @@
     @Override
     public void visit(Relation n) {
-        LinkedList<Role> allroles = new LinkedList<Role>();
+        LinkedList<Role> allroles = new LinkedList<>();
         for (TaggingPreset p : relationpresets) {
             boolean matches = true;
@@ -124,5 +124,5 @@
                     RELATION_UNKNOWN, n) );
         } else {
-            HashMap<String,RoleInfo> map = new HashMap<String, RoleInfo>();
+            HashMap<String,RoleInfo> map = new HashMap<>();
             for (RelationMember m : n.getMembers()) {
                 String s = "";
@@ -152,5 +152,5 @@
                         RELATION_EMPTY, n) );
             } else {
-                LinkedList<String> done = new LinkedList<String>();
+                LinkedList<String> done = new LinkedList<>();
                 for (Role r : allroles) {
                     done.add(r.key);
@@ -180,5 +180,5 @@
                     if (ri != null) {
                         if (r.types != null) {
-                            Set<OsmPrimitive> wrongTypes = new HashSet<OsmPrimitive>();
+                            Set<OsmPrimitive> wrongTypes = new HashSet<>();
                             if (!r.types.contains(TaggingPresetType.WAY)) {
                                 wrongTypes.addAll(r.types.contains(TaggingPresetType.CLOSEDWAY) ? ri.openways : ri.ways);
@@ -192,5 +192,5 @@
                             if (!wrongTypes.isEmpty()) {
                                 String s = marktr("Member for role {0} of wrong type");
-                                LinkedList<OsmPrimitive> highlight = new LinkedList<OsmPrimitive>(wrongTypes);
+                                LinkedList<OsmPrimitive> highlight = new LinkedList<>(wrongTypes);
                                 highlight.addFirst(n);
                                 errors.add(new TestError(this, Severity.WARNING, ROLE_VERIF_PROBLEM_MSG,
@@ -200,5 +200,5 @@
                         }
                         if (r.memberExpression != null) {
-                            Set<OsmPrimitive> notMatching = new HashSet<OsmPrimitive>();
+                            Set<OsmPrimitive> notMatching = new HashSet<>();
                             for (Collection<OsmPrimitive> c : Arrays.asList(new Collection[]{ri.nodes, ri.ways, ri.relations})) {
                                 for (OsmPrimitive p : c) {
@@ -210,5 +210,5 @@
                             if (!notMatching.isEmpty()) {
                                 String s = marktr("Member for role ''{0}'' does not match ''{1}''");
-                                LinkedList<OsmPrimitive> highlight = new LinkedList<OsmPrimitive>(notMatching);
+                                LinkedList<OsmPrimitive> highlight = new LinkedList<>(notMatching);
                                 highlight.addFirst(n);
                                 errors.add(new TestError(this, Severity.WARNING, ROLE_VERIF_PROBLEM_MSG,
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWay.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWay.java	(revision 7005)
@@ -30,5 +30,5 @@
 
     @Override public void visit(Way w) {
-        HashSet<Node> nodes = new HashSet<Node>();
+        HashSet<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 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java	(revision 7005)
@@ -46,6 +46,6 @@
     public void startTest(ProgressMonitor monitor) {
         super.startTest(monitor);
-        cellWays = new HashMap<Point2D,List<Way>>(1000);
-        errorWays = new MultiMap<Way, Way>();
+        cellWays = new HashMap<>(1000);
+        errorWays = new MultiMap<>();
     }
 
@@ -80,5 +80,5 @@
                 int levenshteinDistance = getLevenshteinDistance(name, name2);
                 if (0 < levenshteinDistance && levenshteinDistance <= 2) {
-                    List<OsmPrimitive> primitives = new ArrayList<OsmPrimitive>(2);
+                    List<OsmPrimitive> primitives = new ArrayList<>(2);
                     primitives.add(w);
                     primitives.add(w2);
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 7005)
@@ -75,9 +75,9 @@
     protected static MultiMap<String, String> presetsValueData;
     /** The TagChecker data */
-    protected static final List<CheckerData> checkerData = new ArrayList<CheckerData>();
-    protected static final List<String> ignoreDataStartsWith = new ArrayList<String>();
-    protected static final List<String> ignoreDataEquals = new ArrayList<String>();
-    protected static final List<String> ignoreDataEndsWith = new ArrayList<String>();
-    protected static final List<IgnoreKeyPair> ignoreDataKeyPair = new ArrayList<IgnoreKeyPair>();
+    protected static final List<CheckerData> checkerData = new ArrayList<>();
+    protected static final List<String> ignoreDataStartsWith = new ArrayList<>();
+    protected static final List<String> ignoreDataEquals = new ArrayList<>();
+    protected static final List<String> ignoreDataEndsWith = new ArrayList<>();
+    protected static final List<IgnoreKeyPair> ignoreDataKeyPair = new ArrayList<>();
 
     /** The preferences prefix */
@@ -161,5 +161,5 @@
         ignoreDataKeyPair.clear();
 
-        spellCheckKeyData = new HashMap<String, String>();
+        spellCheckKeyData = new HashMap<>();
         
         String errorSources = "";
@@ -258,5 +258,5 @@
         Collection<TaggingPreset> presets = TaggingPresetPreference.taggingPresets;
         if (presets != null) {
-            presetsValueData = new MultiMap<String, String>();
+            presetsValueData = new MultiMap<>();
             for (String a : OsmPrimitive.getUninterestingKeys()) {
                 presetsValueData.putVoid(a);
@@ -316,5 +316,5 @@
     public void check(OsmPrimitive p) {
         // Just a collection to know if a primitive has been already marked with error
-        MultiMap<OsmPrimitive, String> withErrors = new MultiMap<OsmPrimitive, String>();
+        MultiMap<OsmPrimitive, String> withErrors = new MultiMap<>();
 
         if (checkComplex) {
@@ -550,5 +550,5 @@
     @Override
     public Command fixError(TestError testError) {
-        List<Command> commands = new ArrayList<Command>(50);
+        List<Command> commands = new ArrayList<>(50);
 
         Collection<? extends OsmPrimitive> primitives = testError.getPrimitives();
@@ -607,5 +607,5 @@
     protected static class CheckerData {
         private String description;
-        protected List<CheckerElement> data = new ArrayList<CheckerElement>();
+        protected List<CheckerElement> data = new ArrayList<>();
         private OsmPrimitiveType type;
         private int code;
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java	(revision 7005)
@@ -54,5 +54,5 @@
         Way fromWay = null;
         Way toWay = null;
-        List<OsmPrimitive> via = new ArrayList<OsmPrimitive>();
+        List<OsmPrimitive> via = new ArrayList<>();
 
         boolean morefrom = false;
@@ -66,5 +66,5 @@
                 return;
 
-            List<OsmPrimitive> l = new ArrayList<OsmPrimitive>();
+            List<OsmPrimitive> l = new ArrayList<>();
             l.add(r);
             l.add(m.getMember());
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java	(revision 7005)
@@ -156,5 +156,5 @@
      */
     public Set<String> getCheckedKeys() {
-        Set<String> keys = new HashSet<String>();
+        Set<String> keys = new HashSet<>();
         for (UnclosedWaysCheck c : checks) {
             keys.add(c.key);
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 7005)
@@ -157,9 +157,9 @@
     public void startTest(ProgressMonitor monitor) {
         super.startTest(monitor);
-        ways = new HashSet<MyWaySegment>();
-        endnodes = new QuadBuckets<Node>();
-        endnodes_highway = new QuadBuckets<Node>();
-        middlenodes = new QuadBuckets<Node>();
-        othernodes = new HashSet<Node>();
+        ways = new HashSet<>();
+        endnodes = new QuadBuckets<>();
+        endnodes_highway = new QuadBuckets<>();
+        middlenodes = new QuadBuckets<>();
+        othernodes = new HashSet<>();
         mindist = Main.pref.getDouble(PREFIX + ".node_way_distance", 10.0);
         minmiddledist = Main.pref.getDouble(PREFIX + ".way_way_distance", 0.0);
@@ -168,5 +168,5 @@
 
     protected Map<Node, Way> getWayEndNodesNearOtherHighway() {
-        Map<Node, Way> map = new HashMap<Node, Way>();
+        Map<Node, Way> map = new HashMap<>();
         for (int iter = 0; iter < 1; iter++) {
             for (MyWaySegment s : ways) {
@@ -199,5 +199,5 @@
 
     protected Map<Node, Way> getWayEndNodesNearOtherWay() {
-        Map<Node, Way> map = new HashMap<Node, Way>();
+        Map<Node, Way> map = new HashMap<>();
         for (MyWaySegment s : ways) {
             if (isCanceled()) {
@@ -220,5 +220,5 @@
 
     protected Map<Node, Way> getWayNodesNearOtherWay() {
-        Map<Node, Way> map = new HashMap<Node, Way>();
+        Map<Node, Way> map = new HashMap<>();
         for (MyWaySegment s : ways) {
             if (isCanceled()) {
@@ -240,5 +240,5 @@
 
     protected Map<Node, Way> getConnectedWayEndNodesNearOtherWay() {
-        Map<Node, Way> map = new HashMap<Node, Way>();
+        Map<Node, Way> map = new HashMap<>();
         for (MyWaySegment s : ways) {
             if (isCanceled()) {
@@ -348,5 +348,5 @@
             LatLon topLeft  = new LatLon(y2+fudge, x1-fudge);
             LatLon botRight = new LatLon(y1-fudge, x2+fudge);
-            List<LatLon> ret = new ArrayList<LatLon>(2);
+            List<LatLon> ret = new ArrayList<>(2);
             ret.add(topLeft);
             ret.add(botRight);
@@ -368,6 +368,6 @@
                     // the nodes that are not in the smaller
                     // area, but keep the old larger cache.
-                    Set<Node> trimmed = new HashSet<Node>(nearbyNodeCache);
-                    Set<Node> initial = new HashSet<Node>(nearbyNodeCache);
+                    Set<Node> trimmed = new HashSet<>(nearbyNodeCache);
+                    Set<Node> initial = new HashSet<>(nearbyNodeCache);
                     for (Node n : initial) {
                         if (!nearby(n, dist)) {
@@ -400,5 +400,5 @@
                 // allocating the hash set
                 if (nearbyNodeCache == null) {
-                    nearbyNodeCache = new HashSet<Node>();
+                    nearbyNodeCache = new HashSet<>();
                 }
                 nearbyNodeCache.add(n);
@@ -413,5 +413,5 @@
 
     List<MyWaySegment> getWaySegments(Way w) {
-        List<MyWaySegment> ret = new ArrayList<MyWaySegment>();
+        List<MyWaySegment> ret = new ArrayList<>();
         if (!w.isUsable()
                 || w.hasKey("barrier")
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java	(revision 7005)
@@ -42,5 +42,5 @@
 
     /** Ways that must have a name */
-    public static final Set<String> NAMED_WAYS = new HashSet<String>();
+    public static final Set<String> NAMED_WAYS = new HashSet<>();
     static {
         NAMED_WAYS.add( "motorway" );
@@ -54,5 +54,5 @@
 
     /** Whitelist of roles allowed to reference an untagged way */
-    public static final Set<String> WHITELIST = new HashSet<String>();
+    public static final Set<String> WHITELIST = new HashSet<>();
     static {
         WHITELIST.add( "outer" );
@@ -119,5 +119,5 @@
     public void startTest(ProgressMonitor monitor) {
         super.startTest(monitor);
-        waysUsedInRelations = new HashSet<Way>();
+        waysUsedInRelations = new HashSet<>();
         for (Relation r : Main.main.getCurrentDataSet().getRelations()) {
             if (r.isUsable()) {
Index: trunk/src/org/openstreetmap/josm/data/validation/util/AggregatePrimitivesVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/util/AggregatePrimitivesVisitor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/util/AggregatePrimitivesVisitor.java	(revision 7005)
@@ -21,5 +21,5 @@
 public class AggregatePrimitivesVisitor extends AbstractVisitor {
     /** Aggregated data */
-    final Collection<OsmPrimitive> aggregatedData = new HashSet<OsmPrimitive>();
+    final Collection<OsmPrimitive> aggregatedData = new HashSet<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java	(revision 7005)
@@ -386,5 +386,5 @@
                         if(mapNameToValue == null)
                         {
-                            mapNameToValue = new HashMap<String, String>();
+                            mapNameToValue = new HashMap<>();
                             for (String[] pair : ARRAY)
                                 mapNameToValue.put(pair[0], pair[1]);
Index: trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java	(revision 7005)
@@ -40,6 +40,6 @@
         Node n2 = w.getNode(w.getNodesCount() - 1);
 
-        List<List<Way>> cells = new ArrayList<List<Way>>(2);
-        Set<Point2D> cellNodes = new HashSet<Point2D>();
+        List<List<Way>> cells = new ArrayList<>(2);
+        Set<Point2D> cellNodes = new HashSet<>();
         Point2D cell;
 
@@ -55,5 +55,5 @@
         List<Way> ways = cellWays.get(cell);
         if (ways == null) {
-            ways = new ArrayList<Way>();
+            ways = new ArrayList<>();
             cellWays.put(cell, ways);
         }
@@ -66,5 +66,5 @@
             ways = cellWays.get( cell );
             if (ways == null) {
-                ways = new ArrayList<Way>();
+                ways = new ArrayList<>();
                 cellWays.put(cell, ways);
             }
@@ -84,5 +84,5 @@
             ways = cellWays.get(cell);
             if (ways == null) {
-                ways = new ArrayList<Way>();
+                ways = new ArrayList<>();
                 cellWays.put(cell, ways);
             }
@@ -96,5 +96,5 @@
             ways = cellWays.get(cell);
             if (ways == null) {
-                ways = new ArrayList<Way>();
+                ways = new ArrayList<>();
                 cellWays.put(cell, ways);
             }
@@ -134,5 +134,5 @@
         CheckParameterUtil.ensureParameterNotNull(en1, "en1");
         CheckParameterUtil.ensureParameterNotNull(en2, "en2");
-        List<Point2D> cells = new ArrayList<Point2D>();
+        List<Point2D> cells = new ArrayList<>();
         double x0 = en1.east() * gridDetail;
         double x1 = en2.east() * gridDetail;
Index: trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 7005)
@@ -36,9 +36,9 @@
 
     /** (preference key =&gt; return value) mappings valid for the current operation (no, those two maps cannot be combined) */
-    protected static final Map<String, Integer> sessionChoices = new HashMap<String, Integer>();
+    protected static final Map<String, Integer> sessionChoices = new HashMap<>();
     /** (preference key =&gt; return value) mappings valid for the current session */
-    protected static final Map<String, Integer> immediateChoices = new HashMap<String, Integer>();
+    protected static final Map<String, Integer> immediateChoices = new HashMap<>();
     /** a set indication that (preference key) is or may be stored for the currently active bulk operation */
-    protected static final Set<String> immediateActive = new HashSet<String>();
+    protected static final Set<String> immediateActive = new HashSet<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 7005)
@@ -49,5 +49,5 @@
     private static DefaultNameFormatter instance;
 
-    private static final List<NameFormatterHook> formatHooks = new LinkedList<NameFormatterHook>();
+    private static final List<NameFormatterHook> formatHooks = new LinkedList<>();
 
     /**
@@ -108,5 +108,5 @@
     public static List<String> getNamingtagsForRelations() {
         if (namingTagsForRelations == null) {
-            namingTagsForRelations = new ArrayList<String>(
+            namingTagsForRelations = new ArrayList<>(
                     Main.pref.getCollection("relation.nameOrder", Arrays.asList(DEFAULT_NAMING_TAGS_FOR_RELATIONS))
                     );
@@ -498,5 +498,5 @@
         .append(primitive.getId())
         .append("<br>");
-        List<String> keyList = new ArrayList<String>(primitive.keySet());
+        List<String> keyList = new ArrayList<>(primitive.keySet());
         Collections.sort(keyList);
         for (int i = 0; i < keyList.size(); i++) {
@@ -629,5 +629,5 @@
         sb.append(" (");
         String nameTag = null;
-        Set<String> namingTags = new HashSet<String>(getNamingtagsForRelations());
+        Set<String> namingTags = new HashSet<>(getNamingtagsForRelations());
         for (String n : relation.getTags().keySet()) {
             // #3328: "note " and " note" are name tags too
@@ -671,5 +671,5 @@
         .append(primitive.getId())
         .append("<br>");
-        List<String> keyList = new ArrayList<String>(primitive.getTags().keySet());
+        List<String> keyList = new ArrayList<>(primitive.getTags().keySet());
         Collections.sort(keyList);
         for (int i = 0; i < keyList.size(); i++) {
Index: trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 7005)
@@ -102,5 +102,5 @@
     // For easy access when inherited
     protected Insets contentInsets = new Insets(10,5,0,5);
-    protected List<JButton> buttons = new ArrayList<JButton>();
+    protected List<JButton> buttons = new ArrayList<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/gui/FileDrop.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 7005)
@@ -301,5 +301,5 @@
     {
         try {
-            List<File> list = new ArrayList<File>();
+            List<File> list = new ArrayList<>();
             String line = null;
             while ((line = bReader.readLine()) != null) {
Index: trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 7005)
@@ -47,5 +47,5 @@
         private boolean enabled;
 
-        private final Collection<ChangeListener> listeners = new HashSet<ChangeListener>();
+        private final Collection<ChangeListener> listeners = new HashSet<>();
 
         /**
@@ -133,5 +133,5 @@
      */
     private static List<JButton> createOptionButtons(ButtonSpec[] options, String helpTopic) {
-        List<JButton> buttons = new ArrayList<JButton>();
+        List<JButton> buttons = new ArrayList<>();
         if (options == null) {
             JButton b = new JButton(tr("OK"));
Index: trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 7005)
@@ -133,5 +133,5 @@
             MapView mv = Main.map.mapView;
             LatLon pos = mv.getProjection().eastNorth2latlon(mv.getCenter());
-            final Set<ImageryInfo> inViewLayers = new HashSet<ImageryInfo>();
+            final Set<ImageryInfo> inViewLayers = new HashSet<>();
 
             for (ImageryInfo i : ImageryLayerInfo.instance.getDefaultLayers()) {
@@ -238,5 +238,5 @@
      * @since 5803
      */
-    private List <Object> dynamicItems = new ArrayList<Object>(20);
+    private List <Object> dynamicItems = new ArrayList<>(20);
     
     /**
Index: trunk/src/org/openstreetmap/josm/gui/MainApplet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplet.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplet.java	(revision 7005)
@@ -71,5 +71,5 @@
     };
 
-    private Map<String, Collection<String>> args = new HashMap<String, Collection<String>>();
+    private Map<String, Collection<String>> args = new HashMap<>();
 
     @Override public String[][] getParameterInfo() {
@@ -157,5 +157,5 @@
         if (param != null) {
             if (v == null) {
-                v = new LinkedList<String>();
+                v = new LinkedList<>();
             }
             v.addAll(Arrays.asList(param.split(";")));
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 7005)
@@ -80,5 +80,5 @@
         mainFrame.setJMenuBar(menu);
         geometry.applySafe(mainFrame);
-        LinkedList<Image> l = new LinkedList<Image>();
+        LinkedList<Image> l = new LinkedList<>();
         l.add(ImageProvider.get("logo_16x16x32").getImage());
         l.add(ImageProvider.get("logo_16x16x8").getImage());
@@ -202,5 +202,5 @@
 
         public static Map<Option, Collection<String>> fromStringMap(Map<String, Collection<String>> opts) {
-            Map<Option, Collection<String>> res = new HashMap<Option, Collection<String>>();
+            Map<Option, Collection<String>> res = new HashMap<>();
             for (Map.Entry<String, Collection<String>> e : opts.entrySet()) {
                 Option o = Option.valueOf(e.getKey().toUpperCase().replace("-", "_"));
@@ -215,5 +215,5 @@
     private static Map<Option, Collection<String>> buildCommandLineArgumentMap(String[] args) {
 
-        List<LongOpt> los = new ArrayList<LongOpt>();
+        List<LongOpt> los = new ArrayList<>();
         for (Option o : Option.values()) {
             los.add(new LongOpt(o.getName(), o.requiresArgument() ? LongOpt.REQUIRED_ARGUMENT : LongOpt.NO_ARGUMENT, null, 0));
@@ -222,5 +222,5 @@
         Getopt g = new Getopt("JOSM", args, "hv", los.toArray(new LongOpt[los.size()]));
 
-        Map<Option, Collection<String>> argMap = new HashMap<Option, Collection<String>>();
+        Map<Option, Collection<String>> argMap = new HashMap<>();
 
         int c;
@@ -241,5 +241,5 @@
                 Collection<String> values = argMap.get(opt);
                 if (values == null) {
-                    values = new ArrayList<String>();
+                    values = new ArrayList<>();
                     argMap.put(opt, values);
                 }
@@ -252,5 +252,5 @@
             Collection<String> values = argMap.get(Option.DOWNLOAD);
             if (values == null) {
-                values = new ArrayList<String>();
+                values = new ArrayList<>();
                 argMap.put(Option.DOWNLOAD, values);
             }
@@ -528,5 +528,5 @@
             boolean condition = !NETWORK_ERRORS.isEmpty();
             if (condition) {
-                Set<String> errors = new TreeSet<String>();
+                Set<String> errors = new TreeSet<>();
                 for (Throwable t : NETWORK_ERRORS.values()) {
                     errors.add(t.toString());
Index: trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 7005)
@@ -211,5 +211,5 @@
     public final HistoryInfoWebAction historyinfoweb = new HistoryInfoWebAction();
     /** View / "Zoom to"... actions */
-    public final Map<String, AutoScaleAction> autoScaleActions = new HashMap<String, AutoScaleAction>();
+    public final Map<String, AutoScaleAction> autoScaleActions = new HashMap<>();
     /** View / Jump to position */
     public final JumpToAction jumpToAct = new JumpToAction();
Index: trunk/src/org/openstreetmap/josm/gui/MapFrame.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 7005)
@@ -104,8 +104,8 @@
     private final JToolBar toolBarToggle = new JToolBar(JToolBar.VERTICAL);
 
-    private final List<ToggleDialog> allDialogs = new ArrayList<ToggleDialog>();
-    private final List<MapMode> mapModes = new ArrayList<MapMode>();
-    private final List<IconToggleButton> allDialogButtons = new ArrayList<IconToggleButton>();
-    public final List<IconToggleButton> allMapModeButtons = new ArrayList<IconToggleButton>();
+    private final List<ToggleDialog> allDialogs = new ArrayList<>();
+    private final List<MapMode> mapModes = new ArrayList<>();
+    private final List<IconToggleButton> allDialogButtons = new ArrayList<>();
+    public final List<IconToggleButton> allMapModeButtons = new ArrayList<>();
 
     private final ListAllButtonsAction listAllDialogsAction = new ListAllButtonsAction(allDialogButtons);
@@ -128,5 +128,5 @@
     // Map modes
     public final SelectAction mapModeSelect;
-    private final Map<Layer, MapMode> lastMapMode = new HashMap<Layer, MapMode>();
+    private final Map<Layer, MapMode> lastMapMode = new HashMap<>();
     private final MapMode mapModeDraw;
     private final MapMode mapModeZoom;
@@ -645,5 +645,5 @@
      * the mapMode listeners
      */
-    private static final CopyOnWriteArrayList<MapModeChangeListener> mapModeChangeListeners = new CopyOnWriteArrayList<MapModeChangeListener>();
+    private static final CopyOnWriteArrayList<MapModeChangeListener> mapModeChangeListeners = new CopyOnWriteArrayList<>();
 
     private PreferenceChangedListener sidetoolbarPreferencesChangedListener;
Index: trunk/src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 7005)
@@ -196,5 +196,5 @@
     private Thread thread;
 
-    private final List<StatusTextHistory> statusText = new ArrayList<StatusTextHistory>();
+    private final List<StatusTextHistory> statusText = new ArrayList<>();
 
     private static class StatusTextHistory {
@@ -352,5 +352,5 @@
                                         // These labels may need to be updated from the outside
                                         // so collect them
-                                        List<JLabel> lbls = new ArrayList<JLabel>(osms.size());
+                                        List<JLabel> lbls = new ArrayList<>(osms.size());
                                         for (final OsmPrimitive osm : osms) {
                                             JLabel l = popupBuildPrimitiveLabels(osm);
@@ -720,5 +720,5 @@
         private final JMenuItem jumpButton = add(Main.main.menu.jumpToAct);
         
-        private final Collection<JCheckBoxMenuItem> somItems = new ArrayList<JCheckBoxMenuItem>();
+        private final Collection<JCheckBoxMenuItem> somItems = new ArrayList<>();
         
         private final JSeparator separator = new JSeparator();
@@ -733,5 +733,5 @@
 
         public MapStatusPopupMenu() {
-            for (final String key : new TreeSet<String>(SystemOfMeasurement.ALL_SYSTEMS.keySet())) {
+            for (final String key : new TreeSet<>(SystemOfMeasurement.ALL_SYSTEMS.keySet())) {
                 JCheckBoxMenuItem item = new JCheckBoxMenuItem(new AbstractAction(key) {
                     @Override
@@ -830,5 +830,5 @@
         if (Main.pref.getBoolean("statusbar.change-system-of-measurement-on-click", true)) {
             distText.addMouseListener(new MouseAdapter() {
-                private final List<String> soms = new ArrayList<String>(new TreeSet<String>(SystemOfMeasurement.ALL_SYSTEMS.keySet()));
+                private final List<String> soms = new ArrayList<>(new TreeSet<>(SystemOfMeasurement.ALL_SYSTEMS.keySet()));
     
                 @Override
Index: trunk/src/org/openstreetmap/josm/gui/MapView.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 7005)
@@ -116,6 +116,6 @@
      * the layer listeners
      */
-    private static final CopyOnWriteArrayList<LayerChangeListener> layerChangeListeners = new CopyOnWriteArrayList<LayerChangeListener>();
-    private static final CopyOnWriteArrayList<EditLayerChangeListener> editLayerChangeListeners = new CopyOnWriteArrayList<EditLayerChangeListener>();
+    private static final CopyOnWriteArrayList<LayerChangeListener> layerChangeListeners = new CopyOnWriteArrayList<>();
+    private static final CopyOnWriteArrayList<EditLayerChangeListener> editLayerChangeListeners = new CopyOnWriteArrayList<>();
 
     /**
@@ -195,5 +195,5 @@
      * A list of all layers currently loaded.
      */
-    private final List<Layer> layers = new ArrayList<Layer>();
+    private final List<Layer> layers = new ArrayList<>();
     /**
      * The play head marker: there is only one of these so it isn't in any specific layer
@@ -213,10 +213,10 @@
     public MouseEvent lastMEvent = new MouseEvent(this, 0, 0, 0, 0, 0, 0, false); // In case somebody reads it before first mouse move
 
-    private final List<MapViewPaintable> temporaryLayers = new LinkedList<MapViewPaintable>();
+    private final List<MapViewPaintable> temporaryLayers = new LinkedList<>();
 
     private BufferedImage nonChangedLayersBuffer;
     private BufferedImage offscreenBuffer;
     // Layers that wasn't changed since last paint
-    private final List<Layer> nonChangedLayers = new ArrayList<Layer>();
+    private final List<Layer> nonChangedLayers = new ArrayList<>();
     private Layer changedLayer;
     private int lastViewID;
@@ -428,5 +428,5 @@
      */
     public void removeLayer(Layer layer) {
-        List<Layer> layersList = new ArrayList<Layer>(layers);
+        List<Layer> layersList = new ArrayList<>(layers);
 
         if (!layersList.remove(layer))
@@ -503,5 +503,5 @@
      */
     protected List<Layer> getVisibleLayersInZOrder() {
-        List<Layer> ret = new ArrayList<Layer>();
+        List<Layer> ret = new ArrayList<>();
         for (Layer l: layers) {
             if (l.isVisible()) {
@@ -716,5 +716,5 @@
      */
     public Collection<Layer> getAllLayers() {
-        return Collections.unmodifiableCollection(new ArrayList<Layer>(layers));
+        return Collections.unmodifiableCollection(new ArrayList<>(layers));
     }
 
@@ -723,5 +723,5 @@
      */
     public List<Layer> getAllLayersAsList() {
-        return Collections.unmodifiableList(new ArrayList<Layer>(layers));
+        return Collections.unmodifiableList(new ArrayList<>(layers));
     }
 
@@ -737,5 +737,5 @@
      */
     public <T extends Layer> List<T>  getLayersOfType(Class<T> ofType) {
-        return new ArrayList<T>(Utils.filteredCollection(getAllLayers(), ofType));
+        return new ArrayList<>(Utils.filteredCollection(getAllLayers(), ofType));
     }
 
@@ -970,5 +970,5 @@
      */
     public String getLayerInformationForSourceTag() {
-        final Collection<String> layerInfo = new ArrayList<String>();
+        final Collection<String> layerInfo = new ArrayList<>();
         if (!getLayersOfType(GpxLayer.class).isEmpty()) {
             // no i18n for international values
Index: trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 7005)
@@ -90,5 +90,5 @@
      * the zoom listeners
      */
-    private static final CopyOnWriteArrayList<ZoomChangeListener> zoomChangeListeners = new CopyOnWriteArrayList<ZoomChangeListener>();
+    private static final CopyOnWriteArrayList<ZoomChangeListener> zoomChangeListeners = new CopyOnWriteArrayList<>();
 
     /**
@@ -118,5 +118,5 @@
     }
 
-    private static final CopyOnWriteArrayList<SoMChangeListener> somChangeListeners = new CopyOnWriteArrayList<SoMChangeListener>();
+    private static final CopyOnWriteArrayList<SoMChangeListener> somChangeListeners = new CopyOnWriteArrayList<>();
 
     /**
@@ -533,6 +533,6 @@
     }
 
-    private Stack<ZoomData> zoomUndoBuffer = new Stack<ZoomData>();
-    private Stack<ZoomData> zoomRedoBuffer = new Stack<ZoomData>();
+    private Stack<ZoomData> zoomUndoBuffer = new Stack<>();
+    private Stack<ZoomData> zoomRedoBuffer = new Stack<>();
     private Date zoomTimestamp = new Date();
 
@@ -588,5 +588,5 @@
     private Map<Double, List<Node>> getNearestNodesImpl(Point p,
             Predicate<OsmPrimitive> predicate) {
-        TreeMap<Double, List<Node>> nearestMap = new TreeMap<Double, List<Node>>();
+        TreeMap<Double, List<Node>> nearestMap = new TreeMap<>();
         DataSet ds = getCurrentDataSet();
 
@@ -603,5 +603,5 @@
                         nlist = nearestMap.get(dist);
                     } else {
-                        nlist = new LinkedList<Node>();
+                        nlist = new LinkedList<>();
                         nearestMap.put(dist, nlist);
                     }
@@ -647,5 +647,5 @@
                     if (!nlist.isEmpty()) {
                         minDistSq = distSq;
-                        nearestList = new ArrayList<Node>();
+                        nearestList = new ArrayList<>();
                         nearestList.addAll(nlist);
                     }
@@ -798,5 +798,5 @@
     private Map<Double, List<WaySegment>> getNearestWaySegmentsImpl(Point p,
             Predicate<OsmPrimitive> predicate) {
-        Map<Double, List<WaySegment>> nearestMap = new TreeMap<Double, List<WaySegment>>();
+        Map<Double, List<WaySegment>> nearestMap = new TreeMap<>();
         DataSet ds = getCurrentDataSet();
 
@@ -841,5 +841,5 @@
                             wslist = nearestMap.get(perDistSq);
                         } else {
-                            wslist = new LinkedList<WaySegment>();
+                            wslist = new LinkedList<>();
                             nearestMap.put(perDistSq, wslist);
                         }
@@ -869,6 +869,6 @@
     public final List<WaySegment> getNearestWaySegments(Point p,
             Collection<WaySegment> ignore, Predicate<OsmPrimitive> predicate) {
-        List<WaySegment> nearestList = new ArrayList<WaySegment>();
-        List<WaySegment> unselected = new LinkedList<WaySegment>();
+        List<WaySegment> nearestList = new ArrayList<>();
+        List<WaySegment> unselected = new LinkedList<>();
 
         for (List<WaySegment> wss : getNearestWaySegmentsImpl(p, predicate).values()) {
@@ -1010,6 +1010,6 @@
     public final List<Way> getNearestWays(Point p,
             Collection<Way> ignore, Predicate<OsmPrimitive> predicate) {
-        List<Way> nearestList = new ArrayList<Way>();
-        Set<Way> wset = new HashSet<Way>();
+        List<Way> nearestList = new ArrayList<>();
+        Set<Way> wset = new HashSet<>();
 
         for (List<WaySegment> wss : getNearestWaySegmentsImpl(p, predicate).values()) {
@@ -1256,6 +1256,6 @@
     public final List<OsmPrimitive> getAllNearest(Point p,
             Collection<OsmPrimitive> ignore, Predicate<OsmPrimitive> predicate) {
-        List<OsmPrimitive> nearestList = new ArrayList<OsmPrimitive>();
-        Set<Way> wset = new HashSet<Way>();
+        List<OsmPrimitive> nearestList = new ArrayList<>();
+        Set<Way> wset = new HashSet<>();
 
         // add nearby ways
@@ -1274,5 +1274,5 @@
 
         // add parent relations of nearby nodes and ways
-        Set<OsmPrimitive> parentRelations = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> parentRelations = new HashSet<>();
         for (OsmPrimitive o : nearestList) {
             for (OsmPrimitive r : o.getReferrers()) {
@@ -1369,5 +1369,5 @@
     }
 
-    private LinkedList<CursorInfo> cursors = new LinkedList<CursorInfo>();
+    private LinkedList<CursorInfo> cursors = new LinkedList<>();
     
     /**
@@ -1409,5 +1409,5 @@
 
     private void stripCursors(Object reference) {
-        LinkedList<CursorInfo> c = new LinkedList<CursorInfo>();
+        LinkedList<CursorInfo> c = new LinkedList<>();
         for(CursorInfo i : cursors) {
             if(i.object != reference) {
Index: trunk/src/org/openstreetmap/josm/gui/NotificationManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/NotificationManager.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/NotificationManager.java	(revision 7005)
@@ -84,5 +84,5 @@
 
     public NotificationManager() {
-        queue = new LinkedList<Notification>();
+        queue = new LinkedList<>();
         hideTimer = new Timer(defaultNotificationTime, new HideEvent());
         hideTimer.setRepeats(false);
Index: trunk/src/org/openstreetmap/josm/gui/PopupMenuHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/PopupMenuHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/PopupMenuHandler.java	(revision 7005)
@@ -23,5 +23,5 @@
 
     // Set of enabled osm primitives actions
-    private final Set<OsmPrimitiveAction> primitiveActions = new HashSet<OsmPrimitiveAction>();
+    private final Set<OsmPrimitiveAction> primitiveActions = new HashSet<>();
     // Managed menu
     private final JPopupMenu menu;
Index: trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java	(revision 7005)
@@ -66,5 +66,5 @@
     private JComponent component = null;
 
-    private List<JButton> buttons = new ArrayList<JButton>();
+    private List<JButton> buttons = new ArrayList<>();
 
     private Timer timer = new Timer(100, new ActionListener() {
Index: trunk/src/org/openstreetmap/josm/gui/SelectionManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/SelectionManager.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/SelectionManager.java	(revision 7005)
@@ -296,5 +296,5 @@
     public Collection<OsmPrimitive> getSelectedObjects(boolean alt) {
 
-        Collection<OsmPrimitive> selection = new LinkedList<OsmPrimitive>();
+        Collection<OsmPrimitive> selection = new LinkedList<>();
 
         // whether user only clicked, not dragged.
Index: trunk/src/org/openstreetmap/josm/gui/SplashScreen.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/SplashScreen.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/SplashScreen.java	(revision 7005)
@@ -181,5 +181,5 @@
 
         private static final int MAX_NUMBER_OF_MESSAGES = 3;
-        private LinkedList<String> messages = new LinkedList<String>(Arrays.asList("", "", "")); //update when changing MAX_NUMBER_OF_MESSAGES
+        private LinkedList<String> messages = new LinkedList<>(Arrays.asList("", "", "")); //update when changing MAX_NUMBER_OF_MESSAGES
         private long time = System.currentTimeMillis();
 
Index: trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java	(revision 7005)
@@ -193,5 +193,5 @@
          */
         public RelationMemberTableModel() {
-            data = new ArrayList<RelationToChildReference>();
+            data = new ArrayList<>();
         }
 
@@ -229,5 +229,5 @@
 
         public Set<OsmPrimitive> getObjectsToDelete() {
-            HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+            HashSet<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<OsmPrimitive>();
+            HashSet<OsmPrimitive> ret = new HashSet<>();
             for (RelationToChildReference ref: data) {
                 ret.add(ref.getParent());
Index: trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java	(revision 7005)
@@ -49,5 +49,5 @@
      */
     public static class TMSTileSourceProvider implements TileSourceProvider {
-        static final Set<String> existingSlippyMapUrls = new HashSet<String>();
+        static final Set<String> existingSlippyMapUrls = new HashSet<>();
         static {
             // Urls that already exist in the slippymap chooser and shouldn't be copied from TMS layer list
@@ -61,5 +61,5 @@
         public List<TileSource> getTileSources() {
             if (!TMSLayer.PROP_ADD_TO_SLIPPYMAP_CHOOSER.get()) return Collections.<TileSource>emptyList();
-            List<TileSource> sources = new ArrayList<TileSource>();
+            List<TileSource> sources = new ArrayList<>();
             for (ImageryInfo info : ImageryLayerInfo.instance.getLayers()) {
                 if (existingSlippyMapUrls.contains(info.getUrl())) {
@@ -95,5 +95,5 @@
     }
 
-    private static CopyOnWriteArrayList<TileSourceProvider> providers = new CopyOnWriteArrayList<TileSourceProvider>();
+    private static CopyOnWriteArrayList<TileSourceProvider> providers = new CopyOnWriteArrayList<>();
 
     static {
@@ -179,5 +179,5 @@
 
     private List<TileSource> getAllTileSources() {
-        List<TileSource> tileSources = new ArrayList<TileSource>();
+        List<TileSource> tileSources = new ArrayList<>();
         for (TileSourceProvider provider: providers) {
             tileSources.addAll(provider.getTileSources());
@@ -338,5 +338,5 @@
         MapMarkerDot xmax_ymax = new MapMarkerDot(bbox.getMaxLat(), bbox.getMaxLon());
 
-        List<MapMarker> marker = new ArrayList<MapMarker>(2);
+        List<MapMarker> marker = new ArrayList<>(2);
         marker.add(xmin_ymin);
         marker.add(xmax_ymax);
Index: trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 7005)
@@ -157,5 +157,5 @@
         MapMarkerDot xmax_ymax = new MapMarkerDot(bbox.getMaxLat(), bbox.getMaxLon());
 
-        List<MapMarker> marker = new ArrayList<MapMarker>(2);
+        List<MapMarker> marker = new ArrayList<>(2);
         marker.add(xmin_ymin);
         marker.add(xmax_ymax);
@@ -328,5 +328,5 @@
             add(buildTileGridInputPanel(), BorderLayout.CENTER);
 
-            Set<AWTKeyStroke> forwardKeys = new HashSet<AWTKeyStroke>(getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS));
+            Set<AWTKeyStroke> forwardKeys = new HashSet<>(getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS));
             forwardKeys.add(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));
             setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,forwardKeys);
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java	(revision 7005)
@@ -72,5 +72,5 @@
     private RelationMemberMerger relationMemberMerger;
     private PropertiesMerger propertiesMerger;
-    private final List<IConflictResolver> conflictResolvers = new ArrayList<IConflictResolver>();
+    private final List<IConflictResolver> conflictResolvers = new ArrayList<>();
     private OsmPrimitive my;
     private OsmPrimitive their;
@@ -276,5 +276,5 @@
      */
     public Command buildResolveCommand() {
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
 
         if (tagMerger.getModel().getNumResolvedConflicts() > 0) {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java	(revision 7005)
@@ -183,5 +183,5 @@
 
     public ListMergeModel() {
-        entries = new HashMap<ListRole, ArrayList<T>>();
+        entries = new HashMap<>();
         for (ListRole role : ListRole.values()) {
             entries.put(role, new ArrayList<T>());
@@ -196,5 +196,5 @@
         mergedEntriesSelectionModel =  new EntriesSelectionModel(entries.get(MERGED_ENTRIES));
 
-        listeners = new ArrayList<PropertyChangeListener>();
+        listeners = new ArrayList<>();
         comparePairListModel = new ComparePairListModel();
 
@@ -349,5 +349,5 @@
 
     protected void alertCopyFailedForDeletedPrimitives(List<PrimitiveId> deletedIds) {
-        List<String> items = new ArrayList<String>();
+        List<String> items = new ArrayList<>();
         for (int i=0; i<Math.min(MAX_DELETED_PRIMITIVE_IN_DIALOG, deletedIds.size()); i++) {
             items.add(deletedIds.get(i).toString());
@@ -373,7 +373,7 @@
         if (position < 0 || position > getMergedEntriesSize())
             throw new IllegalArgumentException();
-        List<T> newItems = new ArrayList<T>(rows.length);
+        List<T> newItems = new ArrayList<>(rows.length);
         List<T> source = entries.get(sourceRole);
-        List<PrimitiveId> deletedIds = new ArrayList<PrimitiveId>();
+        List<PrimitiveId> deletedIds = new ArrayList<>();
         for (int row: rows) {
             T entry = source.get(row);
@@ -835,5 +835,5 @@
          */
         public ComparePairListModel() {
-            this.compareModes = new ArrayList<ComparePairType>();
+            this.compareModes = new ArrayList<>();
             compareModes.add(MY_WITH_THEIR);
             compareModes.add(MY_WITH_MERGED);
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java	(revision 7005)
@@ -40,5 +40,5 @@
         }
         if (myAndTheirEntriesEqual()) {
-            entries.put(ListRole.MERGED_ENTRIES, new ArrayList<Node>(getMyEntries()));
+            entries.put(ListRole.MERGED_ENTRIES, new ArrayList<>(getMyEntries()));
             setFrozen(true);
         } else {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java	(revision 7005)
@@ -59,5 +59,5 @@
         // show the key/value-pairs, sorted by key
         //
-        List<String> keyList = new ArrayList<String>(primitive.keySet());
+        List<String> keyList = new ArrayList<>(primitive.keySet());
         Collections.sort(keyList);
         for (int i = 0; i < keyList.size(); i++) {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java	(revision 7005)
@@ -326,5 +326,5 @@
      */
     public List<Command> buildResolveCommand(Conflict<? extends OsmPrimitive> conflict) {
-        List<Command> cmds = new ArrayList<Command>();
+        List<Command> cmds = new ArrayList<>();
         if (hasCoordConflict() && isDecidedCoord()) {
             cmds.add(new CoordinateConflictResolveCommand(conflict, coordMergeDecision));
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java	(revision 7005)
@@ -44,5 +44,5 @@
         .append(primitive.getId())
         .append("<br>");
-        List<String> keyList = new ArrayList<String>(primitive.keySet());
+        List<String> keyList = new ArrayList<>(primitive.keySet());
         Collections.sort(keyList);
         for (int i = 0; i < keyList.size(); i++) {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModel.java	(revision 7005)
@@ -41,6 +41,6 @@
 
     public TagMergeModel() {
-        tagMergeItems = new ArrayList<TagMergeItem>();
-        listeners = new ArrayList<PropertyChangeListener>();
+        tagMergeItems = new ArrayList<>();
+        listeners = new ArrayList<>();
     }
 
@@ -104,5 +104,5 @@
     public void populate(OsmPrimitive my, OsmPrimitive their) {
         tagMergeItems.clear();
-        Set<String> keys = new HashSet<String>();
+        Set<String> keys = new HashSet<>();
         keys.addAll(my.keySet());
         keys.addAll(their.keySet());
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java	(revision 7005)
@@ -334,5 +334,5 @@
 
         public AdjustmentSynchronizer() {
-            synchronizedAdjustables = new ArrayList<Adjustable>();
+            synchronizedAdjustables = new ArrayList<>();
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 7005)
@@ -245,5 +245,5 @@
 
     protected List<Command> buildTagChangeCommand(OsmPrimitive primitive, TagCollection tc) {
-        LinkedList<Command> cmds = new LinkedList<Command>();
+        LinkedList<Command> cmds = new LinkedList<>();
         for (String key : tc.getKeys()) {
             if (tc.hasUniqueEmptyValue(key)) {
@@ -266,5 +266,5 @@
      */
     public List<Command> buildResolutionCommands() {
-        List<Command> cmds = new LinkedList<Command>();
+        List<Command> cmds = new LinkedList<>();
 
         TagCollection allResolutions = getTagConflictResolverModel().getAllResolutions();
@@ -298,5 +298,5 @@
     protected void prepareDefaultRelationDecisions() {
         RelationMemberConflictResolverModel model = getRelationMemberConflictResolverModel();
-        Set<Relation> relations = new HashSet<Relation>();
+        Set<Relation> relations = new HashSet<>();
         for (int i = 0; i < model.getNumDecisions(); i++) {
             RelationMemberConflictDecision decision = model.getDecision(i);
@@ -533,5 +533,5 @@
             }
         }
-        List<Command> cmds = new LinkedList<Command>();
+        List<Command> cmds = new LinkedList<>();
         for (OsmPrimitive i : targetPrimitives) {
             dialog.setTargetPrimitive(i);
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java	(revision 7005)
@@ -119,5 +119,5 @@
         );
         editor.setRenderer(new EditorCellRenderer());
-        listeners = new CopyOnWriteArrayList<NavigationListener>();
+        listeners = new CopyOnWriteArrayList<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java	(revision 7005)
@@ -148,5 +148,5 @@
      */
     public List<String> getValues() {
-        List<String> ret = new ArrayList<String>(tags.getValues());
+        List<String> ret = new ArrayList<>(tags.getValues());
         ret.remove("");
         ret.remove(null);
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 7005)
@@ -46,5 +46,5 @@
     private static final Map<OsmPrimitiveType, String> PANE_TITLES;
     static {
-        PANE_TITLES = new HashMap<OsmPrimitiveType, String>();
+        PANE_TITLES = new HashMap<>();
         PANE_TITLES.put(OsmPrimitiveType.NODE, tr("Tags from nodes"));
         PANE_TITLES.put(OsmPrimitiveType.WAY, tr("Tags from ways"));
@@ -78,5 +78,5 @@
         setTitle(tr("Conflicts in pasted tags"));
         allPrimitivesResolver = new TagConflictResolver();
-        resolvers = new HashMap<OsmPrimitiveType, TagConflictResolver>();
+        resolvers = new HashMap<>();
         for (OsmPrimitiveType type: OsmPrimitiveType.dataValues()) {
             resolvers.put(type, new TagConflictResolver());
@@ -360,6 +360,6 @@
 
         public StatisticsInfo() {
-            sourceInfo = new HashMap<OsmPrimitiveType, Integer>();
-            targetInfo = new HashMap<OsmPrimitiveType, Integer>();
+            sourceInfo = new HashMap<>();
+            targetInfo = new HashMap<>();
         }
     }
@@ -398,5 +398,5 @@
 
         public StatisticsTableModel() {
-            data = new ArrayList<StatisticsInfo>();
+            data = new ArrayList<>();
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java	(revision 7005)
@@ -85,5 +85,5 @@
 
     public RelationMemberConflictResolverModel() {
-        decisions = new ArrayList<RelationMemberConflictDecision>();
+        decisions = new ArrayList<>();
         support = new PropertyChangeSupport(this);
     }
@@ -168,5 +168,5 @@
         references = references == null ? new LinkedList<RelationToChildReference>() : references;
         decisions.clear();
-        this.relations = new HashSet<Relation>(references.size());
+        this.relations = new HashSet<>(references.size());
         for (RelationToChildReference reference: references) {
             decisions.add(new RelationMemberConflictDecision(reference.getParent(), reference.getPosition()));
@@ -268,5 +268,5 @@
      */
     public List<Command> buildResolutionCommands(OsmPrimitive newPrimitive) {
-        List<Command> command = new LinkedList<Command>();
+        List<Command> command = new LinkedList<>();
         for (Relation relation : relations) {
             Command cmd = buildResolveCommand(relation, newPrimitive);
@@ -308,5 +308,5 @@
      */
     public Set<Relation> getModifiedRelations(OsmPrimitive newPrimitive) {
-        HashSet<Relation> ret = new HashSet<Relation>();
+        HashSet<Relation> ret = new HashSet<>();
         for (Relation relation: relations) {
             if (isChanged(relation, newPrimitive)) {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java	(revision 7005)
@@ -38,5 +38,5 @@
         }
 
-        Collection<OsmPrimitive> taggedPrimitives = new ArrayList<OsmPrimitive>();
+        Collection<OsmPrimitive> taggedPrimitives = new ArrayList<>();
         for (OsmPrimitive p: merged) {
             if (p.isTagged()) {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java	(revision 7005)
@@ -98,5 +98,5 @@
             keys.retainAll(keysWithConflicts);
             if (showTagsWithMultiValuesOnly) {
-                Set<String> keysWithMultiValues = new HashSet<String>();
+                Set<String> keysWithMultiValues = new HashSet<>();
                 for (String key: keys) {
                     if (decisions.get(key).canKeepAll()) {
@@ -132,7 +132,7 @@
         CheckParameterUtil.ensureParameterNotNull(tags, "tags");
         this.tags = tags;
-        displayedKeys = new ArrayList<String>();
+        displayedKeys = new ArrayList<>();
         this.keysWithConflicts = keysWithConflicts == null ? new HashSet<String>() : keysWithConflicts;
-        decisions = new HashMap<String, MultiValueResolutionDecision>();
+        decisions = new HashMap<>();
         rebuild();
     }
@@ -277,5 +277,5 @@
      */
     public final Set<String> getKeysWithConflicts() {
-        return new HashSet<String>(keysWithConflicts);
+        return new HashSet<>(keysWithConflicts);
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java	(revision 7005)
@@ -92,5 +92,5 @@
         inSelectionModel = new ChangesetInSelectionListModel(selectionModel);
 
-        lstInSelection = new JList<Changeset>(inSelectionModel);
+        lstInSelection = new JList<>(inSelectionModel);
         lstInSelection.setSelectionModel(selectionModel);
         lstInSelection.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
@@ -99,5 +99,5 @@
         selectionModel = new DefaultListSelectionModel();
         inActiveDataLayerModel = new ChangesetsInActiveDataLayerListModel(selectionModel);
-        lstInActiveDataLayer = new JList<Changeset>(inActiveDataLayerModel);
+        lstInActiveDataLayer = new JList<>(inActiveDataLayerModel);
         lstInActiveDataLayer.setSelectionModel(selectionModel);
         lstInActiveDataLayer.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
@@ -302,5 +302,5 @@
             if (ds == null || ids == null)
                 return;
-            Set<OsmPrimitive> sel = new HashSet<OsmPrimitive>();
+            Set<OsmPrimitive> sel = new HashSet<>();
             for (OsmPrimitive p: ds.allPrimitives()) {
                 if (ids.contains(p.getChangesetId())) {
@@ -485,5 +485,5 @@
             ChangesetListModel model = getCurrentChangesetListModel();
             Set<Integer> sel = model.getSelectedChangesetIds();
-            final Set<Integer> toDownload = new HashSet<Integer>();
+            final Set<Integer> toDownload = new HashSet<>();
             ChangesetCache cc = ChangesetCache.getInstance();
             for (int id: sel) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(revision 7005)
@@ -226,5 +226,5 @@
      * Simple listener setup to update the button enabled state when the side dialog shows.
      */
-    Set<IEnabledStateUpdating> showNotifyListener = new LinkedHashSet<IEnabledStateUpdating>();
+    Set<IEnabledStateUpdating> showNotifyListener = new LinkedHashSet<>();
 
     private void addShowNotifyListener(IEnabledStateUpdating listener) {
@@ -304,5 +304,5 @@
         CommandListMutableTreeNode node = new CommandListMutableTreeNode(c, idx);
         if (c.getChildren() != null) {
-            List<PseudoCommand> children = new ArrayList<PseudoCommand>(c.getChildren());
+            List<PseudoCommand> children = new ArrayList<>(c.getChildren());
             for (int i=0; i<children.size(); ++i) {
                 node.add(getNodeForCommand(children.get(i), i));
@@ -320,5 +320,5 @@
         PseudoCommand c = ((CommandListMutableTreeNode) path.getLastPathComponent()).getCommand();
         final OsmDataLayer currentLayer = Main.main.getEditLayer();
-        FilteredCollection<OsmPrimitive> prims = new FilteredCollection<OsmPrimitive>(
+        FilteredCollection<OsmPrimitive> prims = new FilteredCollection<>(
                 c.getParticipatingPrimitives(),
                 new Predicate<OsmPrimitive>(){
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java	(revision 7005)
@@ -95,5 +95,5 @@
         model = new ConflictListModel();
 
-        lstConflicts = new JList<OsmPrimitive>(model);
+        lstConflicts = new JList<>(model);
         lstConflicts.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
         lstConflicts.setCellRenderer(new OsmPrimitivRenderer());
@@ -235,5 +235,5 @@
         Visitor conflictPainter = new AbstractVisitor() {
             // Manage a stack of visited relations to avoid infinite recursion with cyclic relations (fix #7938)
-            private final Set<Relation> visited = new HashSet<Relation>();
+            private final Set<Relation> visited = new HashSet<>();
             @Override
             public void visit(Node n) {
@@ -364,5 +364,5 @@
 
         public ConflictListModel() {
-            listeners = new CopyOnWriteArrayList<ListDataListener>();
+            listeners = new CopyOnWriteArrayList<>();
         }
 
@@ -451,5 +451,5 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            Collection<OsmPrimitive> sel = new LinkedList<OsmPrimitive>();
+            Collection<OsmPrimitive> sel = new LinkedList<>();
             for (OsmPrimitive o : lstConflicts.getSelectedValuesList()) {
                 sel.add(o);
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java	(revision 7005)
@@ -18,5 +18,5 @@
 
 public class DialogsPanel extends JPanel implements Destroyable {
-    protected List<ToggleDialog> allDialogs = new ArrayList<ToggleDialog>();
+    protected List<ToggleDialog> allDialogs = new ArrayList<>();
     protected MultiSplitPane mSpltPane = new MultiSplitPane();
     protected static final int DIVIDER_SIZE = 5;
@@ -25,5 +25,5 @@
      * Panels that are added to the multisplitpane.
      */
-    private List<JPanel> panels = new ArrayList<JPanel>();
+    private List<JPanel> panels = new ArrayList<>();
 
     private final JSplitPane parent;
@@ -38,5 +38,5 @@
             throw new IllegalStateException();
         initialized = true;
-        allDialogs = new ArrayList<ToggleDialog>();
+        allDialogs = new ArrayList<>();
 
         for (ToggleDialog dialog: pAllDialogs) {
@@ -250,5 +250,5 @@
          * create Layout
          */
-        final List<Node> ch = new ArrayList<Node>();
+        final List<Node> ch = new ArrayList<>();
 
         for (int i = k; i <= N-1; ++i) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java	(revision 7005)
@@ -286,6 +286,6 @@
     private Collection<OsmPrimitive> getAffectedPrimitives(Collection<? extends OsmPrimitive> primitives) {
         // Filters can use nested parent/child expression so complete tree is necessary
-        Set<OsmPrimitive> result = new HashSet<OsmPrimitive>();
-        Stack<OsmPrimitive> stack = new Stack<OsmPrimitive>();
+        Set<OsmPrimitive> result = new HashSet<>();
+        Stack<OsmPrimitive> stack = new Stack<>();
         stack.addAll(primitives);
 
@@ -368,5 +368,5 @@
         @Override
         public List<MultikeyInfo> getMultikeyCombinations() {
-            List<MultikeyInfo> result = new ArrayList<MultikeyShortcutAction.MultikeyInfo>();
+            List<MultikeyInfo> result = new ArrayList<>();
 
             for (int i=0; i<filterModel.getRowCount(); i++) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java	(revision 7005)
@@ -54,5 +54,5 @@
     }
 
-    private final List<Filter> filters = new LinkedList<Filter>();
+    private final List<Filter> filters = new LinkedList<>();
     private final FilterMatcher filterMatcher = new FilterMatcher();
 
@@ -78,5 +78,5 @@
             changed = true;
         } else {
-            final Collection<OsmPrimitive> deselect = new HashSet<OsmPrimitive>();
+            final Collection<OsmPrimitive> deselect = new HashSet<>();
 
             ds.beginUpdate();
@@ -123,5 +123,5 @@
 
         boolean changed = false;
-        List<OsmPrimitive> deselect = new ArrayList<OsmPrimitive>();
+        List<OsmPrimitive> deselect = new ArrayList<>();
 
         ds.beginUpdate();
@@ -190,5 +190,5 @@
 
     private void savePrefs() {
-        Collection<FilterPreferenceEntry> entries = new ArrayList<FilterPreferenceEntry>();
+        Collection<FilterPreferenceEntry> entries = new ArrayList<>();
         for (Filter flt : filters) {
             entries.add(flt.getPreferenceEntry());
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java	(revision 7005)
@@ -156,5 +156,5 @@
 
         public HistoryItemTableModel(DefaultListSelectionModel selectionModel) {
-            data = new ArrayList<OsmPrimitive>();
+            data = new ArrayList<>();
             this.selectionModel = selectionModel;
         }
@@ -178,5 +178,5 @@
 
         protected List<OsmPrimitive> getSelectedPrimitives() {
-            List<OsmPrimitive> ret = new ArrayList<OsmPrimitive>();
+            List<OsmPrimitive> ret = new ArrayList<>();
             for (int i=0; i< data.size(); i++) {
                 if (selectionModel.isSelectedIndex(i)) {
@@ -230,5 +230,5 @@
         public List<OsmPrimitive> getPrimitives(int [] rows) {
             if (rows == null || rows.length == 0) return Collections.emptyList();
-            List<OsmPrimitive> ret = new ArrayList<OsmPrimitive>(rows.length);
+            List<OsmPrimitive> ret = new ArrayList<>(rows.length);
             for (int row: rows) {
                 ret.add(data.get(row));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java	(revision 7005)
@@ -67,5 +67,5 @@
     public InspectPrimitiveDialog(Collection<OsmPrimitive> primitives, OsmDataLayer layer) {
         super(Main.parent, tr("Advanced object info"), new String[] {tr("Close")});
-        this.primitives = new ArrayList<OsmPrimitive>(primitives);
+        this.primitives = new ArrayList<>(primitives);
         this.layer = layer;
         setRememberWindowGeometry(getClass().getName() + ".geometry",
@@ -363,5 +363,5 @@
 
         if (sel.size() == 2) {
-            List<OsmPrimitive> selList = new ArrayList<OsmPrimitive>(sel);
+            List<OsmPrimitive> selList = new ArrayList<>(sel);
             StyleCache sc1 = selList.get(0).mappaintStyle;
             StyleCache sc2 = selList.get(1).mappaintStyle;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java	(revision 7005)
@@ -343,5 +343,5 @@
 
         final StringBuilder sb = new StringBuilder();
-        final List<Object> list = new ArrayList<Object>();
+        final List<Object> list = new ArrayList<>();
 
         while (m.find()) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 7005)
@@ -470,5 +470,5 @@
             if (l != null) {
                 l.toggleVisible();
-                lastLayer = new WeakReference<Layer>(l);
+                lastLayer = new WeakReference<>(l);
             } else if (repeat && lastLayer != null) {
                 l = lastLayer.get();
@@ -830,5 +830,5 @@
                 return;
 
-            List<String> layerNames = new ArrayList<String>();
+            List<String> layerNames = new ArrayList<>();
             for (Layer l: Main.map.mapView.getAllLayers()) {
                 layerNames.add(l.getName());
@@ -1113,5 +1113,5 @@
         private LayerListModel(DefaultListSelectionModel selectionModel) {
             this.selectionModel = selectionModel;
-            listeners = new CopyOnWriteArrayList<LayerListModelListener>();
+            listeners = new CopyOnWriteArrayList<>();
         }
 
@@ -1199,5 +1199,5 @@
          */
         public List<Layer> getSelectedLayers() {
-            List<Layer> selected = new ArrayList<Layer>();
+            List<Layer> selected = new ArrayList<>();
             for (int i=0; i<getLayers().size(); i++) {
                 if (selectionModel.isSelectedIndex(i)) {
@@ -1216,5 +1216,5 @@
          */
         public List<Integer> getSelectedRows() {
-            List<Integer> selected = new ArrayList<Integer>();
+            List<Integer> selected = new ArrayList<>();
             for (int i=0; i<getLayers().size();i++) {
                 if (selectionModel.isSelectedIndex(i)) {
@@ -1376,5 +1376,5 @@
          */
         public List<Layer> getPossibleMergeTargets(Layer source) {
-            List<Layer> targets = new ArrayList<Layer>();
+            List<Layer> targets = new ArrayList<>();
             if (source == null)
                 return targets;
@@ -1617,5 +1617,5 @@
     public static List<MultikeyInfo> getLayerInfoByClass(Class<?> layerClass) {
 
-        List<MultikeyInfo> result = new ArrayList<MultikeyShortcutAction.MultikeyInfo>();
+        List<MultikeyInfo> result = new ArrayList<>();
 
         if (!Main.isDisplayingMapView())
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java	(revision 7005)
@@ -74,5 +74,5 @@
         } else {
             // Very simple algorithm - first selected layer has actions order as in getMenuEntries, actions from other layers go to the end
-            actions = new ArrayList<Action>();
+            actions = new ArrayList<>();
             boolean separatorAdded = true;
             for (Action a: selectedLayers.get(0).getMenuEntries()) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 7005)
@@ -197,5 +197,5 @@
         // Reload local styles when they have been changed in an external editor.
         // Checks file modification time.
-        List<StyleSource> toReload = new ArrayList<StyleSource>();
+        List<StyleSource> toReload = new ArrayList<>();
         for (StyleSource s : MapPaintStyles.getStyles().getStyleSources()) {
             if (s.isLocal()) {
@@ -234,8 +234,8 @@
     protected class StylesModel extends AbstractTableModel implements MapPaintSylesUpdateListener {
 
-        List<StyleSource> data = new ArrayList<StyleSource>();
+        List<StyleSource> data = new ArrayList<>();
 
         public StylesModel() {
-            data = new ArrayList<StyleSource>(MapPaintStyles.getStyles().getStyleSources());
+            data = new ArrayList<>(MapPaintStyles.getStyles().getStyleSources());
         }
 
@@ -301,5 +301,5 @@
         @Override
         public void mapPaintStylesUpdated() {
-            data = new ArrayList<StyleSource>(MapPaintStyles.getStyles().getStyleSources());
+            data = new ArrayList<>(MapPaintStyles.getStyles().getStyleSources());
             fireTableDataChanged();
             tblStyles.repaint();
@@ -308,5 +308,5 @@
         @Override
         public void mapPaintStyleEntryUpdated(int idx) {
-            data = new ArrayList<StyleSource>(MapPaintStyles.getStyles().getStyleSources());
+            data = new ArrayList<>(MapPaintStyles.getStyles().getStyleSources());
             fireTableRowsUpdated(idx, idx);
             tblStyles.repaint();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java	(revision 7005)
@@ -157,5 +157,5 @@
      */
     protected void restorePrimitivesHistory(HistoryComboBox cbHistory) {
-        java.util.List<String> cmtHistory = new LinkedList<String>(Main.pref.getCollection(getClass().getName() + ".primitivesHistory", new LinkedList<String>()));
+        java.util.List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(getClass().getName() + ".primitivesHistory", new LinkedList<String>()));
         // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
         Collections.reverse(cmtHistory);
@@ -208,5 +208,5 @@
             }));
             tfId.tryToPasteFrom(parsedText);
-            final Set<OsmPrimitiveType> types = new HashSet<OsmPrimitiveType>(Utils.transform(ids, new Utils.Function<SimplePrimitiveId, OsmPrimitiveType>() {
+            final Set<OsmPrimitiveType> types = new HashSet<>(Utils.transform(ids, new Utils.Function<SimplePrimitiveId, OsmPrimitiveType>() {
                 @Override
                 public OsmPrimitiveType apply(SimplePrimitiveId x) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 7005)
@@ -129,5 +129,5 @@
         DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
         model = new RelationListModel(selectionModel);
-        displaylist = new JList<Relation>(model);
+        displaylist = new JList<>(model);
         displaylist.setSelectionModel(selectionModel);
         displaylist.setCellRenderer(new OsmPrimitivRenderer() {
@@ -381,5 +381,5 @@
      */
     private class RelationListModel extends AbstractListModel<Relation> {
-        private final List<Relation> relations = new ArrayList<Relation>();
+        private final List<Relation> relations = new ArrayList<>();
         private List<Relation> filteredRelations;
         private DefaultListSelectionModel selectionModel;
@@ -463,5 +463,5 @@
             // extract the removed relations
             //
-            Set<Relation> removedRelations = new HashSet<Relation>();
+            Set<Relation> removedRelations = new HashSet<>();
             for (OsmPrimitive p: removedPrimitives) {
                 if (! (p instanceof Relation)) {
@@ -487,5 +487,5 @@
         private void updateFilteredRelations() {
             if (filter != null) {
-                filteredRelations = new ArrayList<Relation>(Utils.filter(relations, new Predicate<Relation>() {
+                filteredRelations = new ArrayList<>(Utils.filter(relations, new Predicate<Relation>() {
                     @Override
                     public boolean evaluate(Relation r) {
@@ -533,5 +533,5 @@
          */
         public List<Relation> getSelectedRelations() {
-            List<Relation> ret = new ArrayList<Relation>();
+            List<Relation> ret = new ArrayList<>();
             for (int i=0; i<getSize();i++) {
                 if (!selectionModel.isSelectedIndex(i)) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 7005)
@@ -101,5 +101,5 @@
      */
     protected void buildContentPanel() {
-        lstPrimitives = new JList<OsmPrimitive>(model);
+        lstPrimitives = new JList<>(model);
         lstPrimitives.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
         lstPrimitives.setSelectionModel(selectionModel);
@@ -413,5 +413,5 @@
         // Variable to store history from currentDataSet()
         private LinkedList<Collection<? extends OsmPrimitive>> history;
-        private final List<OsmPrimitive> selection = new ArrayList<OsmPrimitive>();
+        private final List<OsmPrimitive> selection = new ArrayList<>();
         private DefaultListSelectionModel selectionModel;
 
@@ -497,5 +497,5 @@
          */
         public Collection<OsmPrimitive> getSelected() {
-            Set<OsmPrimitive> sel = new HashSet<OsmPrimitive>();
+            Set<OsmPrimitive> sel = new HashSet<>();
             for(int i=0; i< getSize();i++) {
                 if (selectionModel.isSelectedIndex(i)) {
@@ -729,5 +729,5 @@
             if(ways + nodes + relations == 0) {
                 text.append(tr("Unselectable now"));
-                this.sel=new ArrayList<OsmPrimitive>(); // empty selection
+                this.sel=new ArrayList<>(); // empty selection
             }
             if(ways + nodes + relations == 1)
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 7005)
@@ -152,5 +152,5 @@
     protected JToggleButton button;
     private JPanel buttonsPanel;
-    private List<javax.swing.Action> buttonActions = new ArrayList<javax.swing.Action>();
+    private List<javax.swing.Action> buttonActions = new ArrayList<>();
 
     /** holds the menu entry in the windows menu. Required to properly
@@ -866,5 +866,5 @@
             data = new JScrollPane(data);
         }
-        LinkedList<Collection<SideButton>> buttons = new LinkedList<Collection<SideButton>>();
+        LinkedList<Collection<SideButton>> buttons = new LinkedList<>();
         buttons.addFirst(firstButtons);
         if (nextButtons != null) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 7005)
@@ -295,9 +295,9 @@
         public UserTableModel() {
             setColumnIdentifiers(new String[]{tr("Author"),tr("# Objects"),"%"});
-            data = new ArrayList<UserInfo>();
+            data = new ArrayList<>();
         }
 
         protected Map<User, Integer> computeStatistics(Collection<? extends OsmPrimitive> primitives) {
-            HashMap<User, Integer> ret = new HashMap<User, Integer>();
+            HashMap<User, Integer> ret = new HashMap<>();
             if (primitives == null || primitives.isEmpty()) return ret;
             for (OsmPrimitive primitive: primitives) {
@@ -351,10 +351,10 @@
 
         public void selectPrimitivesOwnedBy(int [] rows) {
-            Set<User> users= new HashSet<User>();
+            Set<User> users= new HashSet<>();
             for (int index: rows) {
                 users.add(data.get(index).user);
             }
             Collection<OsmPrimitive> selected = Main.main.getCurrentDataSet().getAllSelected();
-            Collection<OsmPrimitive> byUser = new LinkedList<OsmPrimitive>();
+            Collection<OsmPrimitive> byUser = new LinkedList<>();
             for (OsmPrimitive p : selected) {
                 if (users.contains(p.getUser())) {
@@ -366,5 +366,5 @@
 
         public List<User> getSelectedUsers(int[] rows) {
-            LinkedList<User> ret = new LinkedList<User>();
+            LinkedList<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 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java	(revision 7005)
@@ -98,5 +98,5 @@
         InputMapUtils.unassignCtrlShiftUpDown(tree, JComponent.WHEN_FOCUSED);
 
-        List<SideButton> buttons = new LinkedList<SideButton>();
+        List<SideButton> buttons = new LinkedList<>();
 
         selectButton = new SideButton(new AbstractAction() {
@@ -190,7 +190,7 @@
             return;
 
-        Set<DefaultMutableTreeNode> processedNodes = new HashSet<DefaultMutableTreeNode>();
-
-        LinkedList<TestError> errorsToFix = new LinkedList<TestError>();
+        Set<DefaultMutableTreeNode> processedNodes = new HashSet<>();
+
+        LinkedList<TestError> errorsToFix = new LinkedList<>();
         for (TreePath path : selectionPaths) {
             DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
@@ -231,5 +231,5 @@
             return;
 
-        Set<DefaultMutableTreeNode> processedNodes = new HashSet<DefaultMutableTreeNode>();
+        Set<DefaultMutableTreeNode> processedNodes = new HashSet<>();
         for (TreePath path : selectionPaths) {
             DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
@@ -240,5 +240,5 @@
             Object mainNodeInfo = node.getUserObject();
             if (!(mainNodeInfo instanceof TestError)) {
-                Set<String> state = new HashSet<String>();
+                Set<String> state = new HashSet<>();
                 // ask if the whole set should be ignored
                 if (asked == JOptionPane.DEFAULT_OPTION) {
@@ -309,5 +309,5 @@
             return;
 
-        Collection<OsmPrimitive> sel = new HashSet<OsmPrimitive>(40);
+        Collection<OsmPrimitive> sel = new HashSet<>(40);
 
         TreePath[] selectedPaths = tree.getSelectionPaths();
@@ -548,5 +548,5 @@
             tree.setFilter(null);
         }
-        HashSet<OsmPrimitive> filter = new HashSet<OsmPrimitive>(newSelection);
+        HashSet<OsmPrimitive> filter = new HashSet<>(newSelection);
         tree.setFilter(filter);
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java	(revision 7005)
@@ -626,5 +626,5 @@
             return;
         }
-        Set<Changeset> toSelect = new HashSet<Changeset>();
+        Set<Changeset> toSelect = new HashSet<>();
         ChangesetCache cc = ChangesetCache.getInstance();
         for (int id: ids) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerModel.java	(revision 7005)
@@ -30,5 +30,5 @@
     public static final String CHANGESET_IN_DETAIL_VIEW_PROP = ChangesetCacheManagerModel.class.getName() + ".changesetInDetailView";
 
-    private final List<Changeset> data = new ArrayList<Changeset>();
+    private final List<Changeset> data = new ArrayList<>();
     private DefaultListSelectionModel selectionModel;
     private Changeset changesetInDetailView;
@@ -76,5 +76,5 @@
      */
     public List<Changeset> getSelectedChangesets() {
-        List<Changeset> ret = new ArrayList<Changeset>();
+        List<Changeset> ret = new ArrayList<>();
         for (int i =0; i< data.size();i++) {
             Changeset cs = data.get(i);
@@ -92,5 +92,5 @@
      */
     public Set<Integer> getSelectedChangesetIds() {
-        Set<Integer> ret = new HashSet<Integer>();
+        Set<Integer> ret = new HashSet<>();
         for (Changeset cs: getSelectedChangesets()) {
             ret.add(cs.getId());
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java	(revision 7005)
@@ -32,5 +32,5 @@
 
     /** the list of changeset ids to download */
-    private final List<Integer> toDownload = new ArrayList<Integer>();
+    private final List<Integer> toDownload = new ArrayList<>();
     /** true if the task was canceled */
     private boolean canceled;
@@ -57,5 +57,5 @@
             toDownload.add(id);
         }
-        downloadedChangesets = new HashSet<Changeset>();
+        downloadedChangesets = new HashSet<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java	(revision 7005)
@@ -277,5 +277,5 @@
 
         protected List<HistoryOsmPrimitive> filterPrimitivesWithUnloadedHistory(Collection<HistoryOsmPrimitive> primitives) {
-            List<HistoryOsmPrimitive> ret = new ArrayList<HistoryOsmPrimitive>(primitives.size());
+            List<HistoryOsmPrimitive> ret = new ArrayList<>(primitives.size());
             for (HistoryOsmPrimitive p: primitives) {
                 if (HistoryDataSet.getInstance().getHistory(p.getPrimitiveId()) == null) {
@@ -333,5 +333,5 @@
             OsmDataLayer layer = Main.main.getEditLayer();
             Set<HistoryOsmPrimitive> selected = model.getSelectedPrimitives();
-            Set<OsmPrimitive> target = new HashSet<OsmPrimitive>();
+            Set<OsmPrimitive> target = new HashSet<>();
             for (HistoryOsmPrimitive p : model.getSelectedPrimitives()) {
                 OsmPrimitive op = layer.data.getPrimitiveById(p.getPrimitiveId());
@@ -383,5 +383,5 @@
             OsmDataLayer layer = Main.main.getEditLayer();
             Set<HistoryOsmPrimitive> selected = model.getSelectedPrimitives();
-            Set<OsmPrimitive> target = new HashSet<OsmPrimitive>();
+            Set<OsmPrimitive> target = new HashSet<>();
             for (HistoryOsmPrimitive p : model.getSelectedPrimitives()) {
                 OsmPrimitive op = layer.data.getPrimitiveById(p.getPrimitiveId());
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableModel.java	(revision 7005)
@@ -24,5 +24,5 @@
 public class ChangesetContentTableModel extends AbstractTableModel {
 
-    private final List<ChangesetContentEntry> data = new ArrayList<ChangesetContentEntry>();
+    private final List<ChangesetContentEntry> data = new ArrayList<>();
     private DefaultListSelectionModel selectionModel;
 
@@ -53,5 +53,5 @@
 
     public Set<HistoryOsmPrimitive> getSelectedPrimitives() {
-        Set<HistoryOsmPrimitive> ret = new HashSet<HistoryOsmPrimitive>();
+        Set<HistoryOsmPrimitive> ret = new HashSet<>();
         for (int i=0;i < data.size();i++) {
             if (selectionModel.isSelectedIndex(i)) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanel.java	(revision 7005)
@@ -387,5 +387,5 @@
             if (Main.main == null || !Main.main.hasEditLayer()) return;
             OsmDataLayer layer = Main.main.getEditLayer();
-            Set<OsmPrimitive> target = new HashSet<OsmPrimitive>();
+            Set<OsmPrimitive> target = new HashSet<>();
             for (OsmPrimitive p: layer.data.allPrimitives()) {
                 if (p.isUsable() && p.getChangesetId() == current.getId()) {
@@ -448,5 +448,5 @@
             if (Main.main == null || !Main.main.hasEditLayer()) return;
             OsmDataLayer layer = Main.main.getEditLayer();
-            Set<OsmPrimitive> target = new HashSet<OsmPrimitive>();
+            Set<OsmPrimitive> target = new HashSet<>();
             for (OsmPrimitive p: layer.data.allPrimitives()) {
                 if (p.isUsable() && p.getChangesetId() == current.getId()) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetHeaderDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetHeaderDownloadTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetHeaderDownloadTask.java	(revision 7005)
@@ -65,5 +65,5 @@
         }
 
-        HashSet<Integer> ids = new HashSet<Integer>();
+        HashSet<Integer> ids = new HashSet<>();
         for (Changeset cs: changesets) {
             if (cs == null || cs.isNew()) {
@@ -89,5 +89,5 @@
             ids = Collections.emptyList();
         }
-        idsToDownload = new HashSet<Integer>();
+        idsToDownload = new HashSet<>();
         if (ids == null ||  ids.isEmpty())
             return;
@@ -179,5 +179,5 @@
                 reader = new OsmServerChangesetReader();
             }
-            downloadedChangesets = new HashSet<Changeset>();
+            downloadedChangesets = new HashSet<>();
             downloadedChangesets.addAll(reader.readChangesets(idsToDownload, getProgressMonitor().createSubTaskMonitor(0, false)));
         } catch(OsmTransferException e) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java	(revision 7005)
@@ -22,6 +22,6 @@
 
 public class ChangesetListModel extends DefaultListModel<Changeset> implements ChangesetCacheListener {
-    private final List<Changeset> data = new ArrayList<Changeset>();
-    private final Storage<Changeset> shownChangesets = new Storage<Changeset>(true);
+    private final List<Changeset> data = new ArrayList<>();
+    private final Storage<Changeset> shownChangesets = new Storage<>(true);
     private DefaultListSelectionModel selectionModel;
 
@@ -31,5 +31,5 @@
 
     public Set<Changeset> getSelectedChangesets() {
-        Set<Changeset> ret = new HashSet<Changeset>();
+        Set<Changeset> ret = new HashSet<>();
         for (int i=0; i < getSize(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
@@ -41,5 +41,5 @@
 
     public Set<Integer> getSelectedChangesetIds() {
-        Set<Integer> ret = new HashSet<Integer>();
+        Set<Integer> ret = new HashSet<>();
         for (int i=0; i < getSize(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
@@ -90,5 +90,5 @@
             return;
         }
-        Set<Changeset> changesets = new HashSet<Changeset>(ids.size());
+        Set<Changeset> changesets = new HashSet<>(ids.size());
         for (int id: ids) {
             if (id <= 0) {
@@ -105,5 +105,5 @@
             return;
         }
-        Set<Changeset> changesets = new HashSet<Changeset>();
+        Set<Changeset> changesets = new HashSet<>();
         for (OsmPrimitive p: primitives) {
             if (p.getChangesetId() <= 0) {
@@ -120,5 +120,5 @@
             return;
         }
-        Set<Changeset> changesets = new HashSet<Changeset>();
+        Set<Changeset> changesets = new HashSet<>();
         for (OsmPrimitive p: ds.allPrimitives()) {
             if (p.getChangesetId() <=0 ) {
@@ -169,5 +169,5 @@
      */
     public List<Changeset> getSelectedOpenChangesets() {
-        List<Changeset> ret = new ArrayList<Changeset>();
+        List<Changeset> ret = new ArrayList<>();
         for (int i=0; i< getSize(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java	(revision 7005)
@@ -49,6 +49,6 @@
 
         ButtonGroup bgQueries = new ButtonGroup();
-        rbQueries = new HashMap<BasicQuery, JRadioButton>();
-        lblQueries = new HashMap<BasicQuery, JMultilineLabel>();
+        rbQueries = new HashMap<>();
+        lblQueries = new HashMap<>();
         SelectQueryHandler selectedQueryHandler = new SelectQueryHandler();
         for (BasicQuery q: BasicQuery.values()) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java	(revision 7005)
@@ -179,5 +179,5 @@
                 changesetReader= new OsmServerChangesetReader();
             }
-            downloadedChangesets = new HashSet<Changeset>();
+            downloadedChangesets = new HashSet<>();
             downloadedChangesets.addAll(changesetReader.queryChangesets(query, getProgressMonitor().createSubTaskMonitor(0, false)));
             synchronized (this) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 7005)
@@ -156,5 +156,5 @@
     private final PopupMenuHandler blankSpaceMenuHandler = new PopupMenuHandler(blankSpaceMenu);
 
-    private final Map<String, Map<String, Integer>> valueCount = new TreeMap<String, Map<String, Integer>>();
+    private final Map<String, Map<String, Integer>> valueCount = new TreeMap<>();
     /**
      * This sub-object is responsible for all adding and editing of tags
@@ -400,5 +400,5 @@
             protected int checkTableSelection(JTable table, Point p) {
                 int row = super.checkTableSelection(table, p);
-                List<Relation> rels = new ArrayList<Relation>();
+                List<Relation> rels = new ArrayList<>();
                 for (int i: table.getSelectedRows()) {
                     rels.add((Relation) table.getValueAt(i, 0));
@@ -603,6 +603,6 @@
 
         final boolean displayDiscardableKeys = Main.pref.getBoolean("display.discardable-keys", false);
-        final Map<String, Integer> keyCount = new HashMap<String, Integer>();
-        final Map<String, String> tags = new HashMap<String, String>();
+        final Map<String, Integer> keyCount = new HashMap<>();
+        final Map<String, String> tags = new HashMap<>();
         valueCount.clear();
         EnumSet<TaggingPresetType> types = EnumSet.noneOf(TaggingPresetType.class);
@@ -617,5 +617,5 @@
                         v.put(value, v.containsKey(value) ? v.get(value) + 1 : 1);
                     } else {
-                        TreeMap<String, Integer> v = new TreeMap<String, Integer>();
+                        TreeMap<String, Integer> v = new TreeMap<>();
                         v.put(value, 1);
                         valueCount.put(key, v);
@@ -639,5 +639,5 @@
         membershipData.setRowCount(0);
 
-        Map<Relation, MemberInfo> roles = new HashMap<Relation, MemberInfo>();
+        Map<Relation, MemberInfo> roles = new HashMap<>();
         for (OsmPrimitive primitive: newSel) {
             for (OsmPrimitive ref: primitive.getReferrers(true)) {
@@ -660,5 +660,5 @@
         }
 
-        List<Relation> sortedRelations = new ArrayList<Relation>(roles.keySet());
+        List<Relation> sortedRelations = new ArrayList<>(roles.keySet());
         Collections.sort(sortedRelations, new Comparator<Relation>() {
             @Override public int compare(Relation o1, Relation o2) {
@@ -819,7 +819,7 @@
 
     static class MemberInfo {
-        private List<RelationMember> role = new ArrayList<RelationMember>();
-        private Set<OsmPrimitive> members = new HashSet<OsmPrimitive>();
-        private List<Integer> position = new ArrayList<Integer>();
+        private List<RelationMember> role = new ArrayList<>();
+        private Set<OsmPrimitive> members = new HashSet<>();
+        private List<Integer> position = new ArrayList<>();
         private Iterable<OsmPrimitive> selection;
         private String positionString = null;
@@ -901,5 +901,5 @@
         protected void deleteTags(int[] rows){
             // convert list of rows to HashMap (and find gap for nextKey)
-            HashMap<String, String> tags = new HashMap<String, String>(rows.length);
+            HashMap<String, String> tags = new HashMap<>(rows.length);
             int nextKeyIndex = rows[0];
             for (int row : rows) {
@@ -1063,5 +1063,5 @@
                 String base = Main.pref.get("url.openstreetmap-wiki", "http://wiki.openstreetmap.org/wiki/");
                 String lang = LanguageInfo.getWikiLanguagePrefix();
-                final List<URI> uris = new ArrayList<URI>();
+                final List<URI> uris = new ArrayList<>();
                 int row;
                 if (tagTable.getSelectedRowCount() == 1) {
@@ -1174,5 +1174,5 @@
         public void actionPerformed(ActionEvent ae) {
             int[] rows = tagTable.getSelectedRows();
-            Set<String> values = new TreeSet<String>();
+            Set<String> values = new TreeSet<>();
             Collection<OsmPrimitive> sel = Main.main.getInProgressSelection();
             if (rows.length == 0 || sel.isEmpty()) return;
@@ -1232,5 +1232,5 @@
         @Override
         protected Collection<String> getString(OsmPrimitive p, String key) {
-            List<String> r = new LinkedList<String>();
+            List<String> r = new LinkedList<>();
             for (Entry<String, String> kv : p.getKeys().entrySet()) {
                 r.add(new Tag(kv.getKey(), kv.getValue()).toString());
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 7005)
@@ -206,5 +206,5 @@
     public void saveTagsIfNeeded() {
         if (PROPERTY_REMEMBER_TAGS.get() && !recentTags.isEmpty()) {
-            List<String> c = new ArrayList<String>( recentTags.size()*2 );
+            List<String> c = new ArrayList<>( recentTags.size()*2 );
             for (Tag t: recentTags.keySet()) {
                 c.add(t.getKey());
@@ -366,8 +366,8 @@
                     }
                 }
-                Collection<Command> commands = new ArrayList<Command>();
+                Collection<Command> commands = new ArrayList<>();
                 commands.add(new ChangePropertyCommand(sel, key, null));
                 if (value.equals(tr("<different>"))) {
-                    Map<String, List<OsmPrimitive>> map = new HashMap<String, List<OsmPrimitive>>();
+                    Map<String, List<OsmPrimitive>> map = new HashMap<>();
                     for (OsmPrimitive osm: sel) {
                         String val = osm.get(key);
@@ -376,5 +376,5 @@
                                 map.get(val).add(osm);
                             } else {
-                                List<OsmPrimitive> v = new ArrayList<OsmPrimitive>();
+                                List<OsmPrimitive> v = new ArrayList<>();
                                 v.add(osm);
                                 map.put(val, v);
@@ -515,5 +515,5 @@
 
     class AddTagsDialog extends AbstractTagsDialog {
-        List<JosmAction> recentTagsActions = new ArrayList<JosmAction>();
+        List<JosmAction> recentTagsActions = new ArrayList<>();
         
         // Counter of added commands for possible undo
@@ -641,5 +641,5 @@
             // This implies to iterate in descending order, as the oldest elements will only be removed after we reach the maximum numbern and not the number of tags to show.
             // However, as Set does not allow to iterate in descending order, we need to copy its elements into a List we can access in reverse order.
-            List<Tag> tags = new LinkedList<Tag>(recentTags.keySet());
+            List<Tag> tags = new LinkedList<>(recentTags.keySet());
             for (int i = tags.size()-1; i >= 0 && count <= tagsToShow; i--, count++) {
                 final Tag t = tags.get(i);
@@ -675,5 +675,5 @@
                 if (icon == null) {
                     // If no icon found in map style look at presets
-                    Map<String, String> map = new HashMap<String, String>();
+                    Map<String, String> map = new HashMap<>();
                     map.put(t.getKey(), t.getValue());
                     for (TaggingPreset tp : TaggingPreset.getMatchingPresets(null, map, false)) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 7005)
@@ -258,5 +258,5 @@
             if (selection == null || selection.length == 0)
                 return;
-            HashSet<Relation> relations = new HashSet<Relation>();
+            HashSet<Relation> relations = new HashSet<>();
             for (TreePath aSelection : selection) {
                 relations.add((Relation) aSelection.getLastPathComponent());
@@ -298,6 +298,6 @@
              */);
             this.relation = r;
-            relationsToDownload = new Stack<Relation>();
-            downloadedRelationIds = new HashSet<Long>();
+            relationsToDownload = new Stack<>();
+            downloadedRelationIds = new HashSet<>();
             relationsToDownload.push(this.relation);
         }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java	(revision 7005)
@@ -34,5 +34,5 @@
     private boolean canceled;
     private Exception lastException;
-    private final Set<Relation> parents = new HashSet<Relation>();
+    private final Set<Relation> parents = new HashSet<>();
     private Collection<OsmPrimitive> children;
     private OsmDataLayer curLayer;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 7005)
@@ -646,5 +646,5 @@
      */
     protected void cleanSelfReferences() {
-        List<OsmPrimitive> toCheck = new ArrayList<OsmPrimitive>();
+        List<OsmPrimitive> toCheck = new ArrayList<>();
         toCheck.add(getRelation());
         if (memberTableModel.hasMembersReferringTo(toCheck)) {
@@ -767,5 +767,5 @@
             if (primitives == null || primitives.isEmpty())
                 return primitives;
-            List<OsmPrimitive> ret = new ArrayList<OsmPrimitive>();
+            List<OsmPrimitive> ret = new ArrayList<>();
             ConditionalOptionPaneUtil.startBulkOperation("add_primitive_to_relation");
             for (OsmPrimitive primitive : primitives) {
@@ -1169,5 +1169,5 @@
             tagEditorPanel.getModel().applyToPrimitive(newRelation);
             memberTableModel.applyToRelation(newRelation);
-            List<RelationMember> newMembers = new ArrayList<RelationMember>();
+            List<RelationMember> newMembers = new ArrayList<>();
             for (RelationMember rm: newRelation.getMembers()) {
                 if (!rm.getMember().isDeleted()) {
@@ -1214,5 +1214,5 @@
             tagEditorPanel.getModel().applyToPrimitive(editedRelation);
             memberTableModel.applyToRelation(editedRelation);
-            Conflict<Relation> conflict = new Conflict<Relation>(getRelation(), editedRelation);
+            Conflict<Relation> conflict = new Conflict<>(getRelation(), editedRelation);
             Main.main.undoRedo.add(new ConflictAddCommand(getLayer(),conflict));
         }
@@ -1637,5 +1637,5 @@
 
         protected Collection<RelationMember> getMembersForCurrentSelection(Relation r) {
-            Collection<RelationMember> members = new HashSet<RelationMember>();
+            Collection<RelationMember> members = new HashSet<>();
             Collection<OsmPrimitive> selection = getLayer().data.getSelected();
             for (RelationMember member: r.getMembers()) {
@@ -1682,5 +1682,5 @@
                 List<PrimitiveData> primitives = Main.pasteBuffer.getDirectlyAdded();
                 DataSet ds = getLayer().data;
-                List<OsmPrimitive> toAdd = new ArrayList<OsmPrimitive>();
+                List<OsmPrimitive> toAdd = new ArrayList<>();
                 boolean hasNewInOtherLayer = false;
 
@@ -1722,5 +1722,5 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            Set<OsmPrimitive> primitives = new HashSet<OsmPrimitive>();
+            Set<OsmPrimitive> primitives = new HashSet<>();
             for (RelationMember rm: memberTableModel.getSelectedMembers()) {
                 primitives.add(rm.getMember());
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java	(revision 7005)
@@ -125,5 +125,5 @@
                 if (Main.isDisplayingMapView()) {
                     Collection<RelationMember> sel = getMemberTableModel().getSelectedMembers();
-                    final List<OsmPrimitive> toHighlight = new ArrayList<OsmPrimitive>();
+                    final List<OsmPrimitive> toHighlight = new ArrayList<>();
                     for (RelationMember r: sel) {
                         if (r.getMember().isUsable()) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 7005)
@@ -64,6 +64,6 @@
      */
     public MemberTableModel(OsmDataLayer layer, PresetListPanel.PresetHandler presetHandler) {
-        members = new ArrayList<RelationMember>();
-        listeners = new CopyOnWriteArrayList<IMemberModelListener>();
+        members = new ArrayList<>();
+        listeners = new CopyOnWriteArrayList<>();
         this.layer = layer;
         this.presetHandler = presetHandler;
@@ -337,5 +337,5 @@
      */
     public Set<OsmPrimitive> getIncompleteMemberPrimitives() {
-        Set<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         for (RelationMember member : members) {
             if (member.getMember().isIncomplete()) {
@@ -352,5 +352,5 @@
      */
     public Set<OsmPrimitive> getSelectedIncompleteMemberPrimitives() {
-        Set<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         for (RelationMember member : getSelectedMembers()) {
             if (member.getMember().isIncomplete()) {
@@ -388,5 +388,5 @@
 
     protected List<Integer> getSelectedIndices() {
-        List<Integer> selectedIndices = new ArrayList<Integer>();
+        List<Integer> selectedIndices = new ArrayList<>();
         for (int i = 0; i < members.size(); i++) {
             if (getSelectionModel().isSelectedIndex(i)) {
@@ -403,5 +403,5 @@
         int idx = index;
         for (OsmPrimitive primitive : primitives) {
-            Set<String> potentialRoles = new TreeSet<String>();
+            Set<String> potentialRoles = new TreeSet<>();
             for (TaggingPreset tp : presets) {
                 String suggestedRole = tp.suggestRoleForOsmPrimitive(primitive);
@@ -480,5 +480,5 @@
      */
     public Collection<RelationMember> getSelectedMembers() {
-        List<RelationMember> selectedMembers = new ArrayList<RelationMember>();
+        List<RelationMember> selectedMembers = new ArrayList<>();
         for (int i : getSelectedIndices()) {
             selectedMembers.add(members.get(i));
@@ -493,5 +493,5 @@
      */
     public Collection<OsmPrimitive> getSelectedChildPrimitives() {
-        Collection<OsmPrimitive> ret = new ArrayList<OsmPrimitive>();
+        Collection<OsmPrimitive> ret = new ArrayList<>();
         for (RelationMember m: getSelectedMembers()) {
             ret.add(m.getMember());
@@ -506,5 +506,5 @@
      */
     public Set<OsmPrimitive> getChildPrimitives(Collection<? extends OsmPrimitive> referenceSet) {
-        HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> ret = new HashSet<>();
         if (referenceSet == null) return null;
         for (RelationMember m: members) {
@@ -529,5 +529,5 @@
         // lookup the indices for the respective members
         //
-        Set<Integer> selectedIndices = new HashSet<Integer>();
+        Set<Integer> selectedIndices = new HashSet<>();
         for (RelationMember member : selectedMembers) {
             for (int idx = 0; idx < members.size(); ++idx) {
@@ -598,5 +598,5 @@
         if (primitives == null || primitives.isEmpty())
             return false;
-        HashSet<OsmPrimitive> referrers = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> referrers = new HashSet<>();
         for (RelationMember member : members) {
             referrers.add(member.getMember());
@@ -672,5 +672,5 @@
      */
     void sort() {
-        List<RelationMember> selectedMembers = new ArrayList<RelationMember>(getSelectedMembers());
+        List<RelationMember> selectedMembers = new ArrayList<>(getSelectedMembers());
         List<RelationMember> sortedMembers = null;
         List<RelationMember> newMembers;
@@ -681,5 +681,5 @@
             sortedMembers = relationSorter.sortMembers(selectedMembers);
             List<Integer> selectedIndices = getSelectedIndices();
-            newMembers = new ArrayList<RelationMember>();
+            newMembers = new ArrayList<>();
             boolean inserted = false;
             for (int i=0; i < members.size(); i++) {
@@ -730,5 +730,5 @@
             Collections.reverse(selectedIndicesReversed);
 
-            List<RelationMember> newMembers = new ArrayList<RelationMember>(members);
+            List<RelationMember> newMembers = new ArrayList<>(members);
 
             for (int i=0; i < selectedIndices.size(); i++) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java	(revision 7005)
@@ -79,5 +79,5 @@
         referrers = null;
         this.layer = layer;
-        parents = new ArrayList<Relation>();
+        parents = new ArrayList<>();
         this.child = child;
         this.full = full;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java	(revision 7005)
@@ -47,5 +47,5 @@
     protected void build() {
         setLayout(new BorderLayout());
-        referrers = new JList<Relation>(model);
+        referrers = new JList<>(model);
         referrers.setCellRenderer(new OsmPrimitivRenderer());
         add(new JScrollPane(referrers), BorderLayout.CENTER);
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowserModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowserModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowserModel.java	(revision 7005)
@@ -22,5 +22,5 @@
     public ReferringRelationsBrowserModel() {
         relation = null;
-        referrers = new ArrayList<Relation>();
+        referrers = new ArrayList<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java	(revision 7005)
@@ -99,5 +99,5 @@
      */
     public RelationDialogManager(){
-        openDialogs = new HashMap<DialogContext, RelationEditor>();
+        openDialogs = new HashMap<>();
     }
     /**
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java	(revision 7005)
@@ -32,5 +32,5 @@
 
     /** the list of registered relation editor classes */
-    private static List<Class<RelationEditor>> editors = new ArrayList<Class<RelationEditor>>();
+    private static List<Class<RelationEditor>> editors = new ArrayList<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeModel.java	(revision 7005)
@@ -34,5 +34,5 @@
     public RelationTreeModel() {
         this.root = null;
-        listeners = new CopyOnWriteArrayList<TreeModelListener>();
+        listeners = new CopyOnWriteArrayList<>();
     }
 
@@ -43,5 +43,5 @@
     public RelationTreeModel(Relation root) {
         this.root = root;
-        listeners = new CopyOnWriteArrayList<TreeModelListener>();
+        listeners = new CopyOnWriteArrayList<>();
     }
 
@@ -56,5 +56,5 @@
         root.setMembers(members);
         this.root = root;
-        listeners = new CopyOnWriteArrayList<TreeModelListener>();
+        listeners = new CopyOnWriteArrayList<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java	(revision 7005)
@@ -31,5 +31,5 @@
         CheckParameterUtil.ensureParameterNotNull(layer, "layer");
         this.layer = layer;
-        cache = new ArrayList<OsmPrimitive>();
+        cache = new ArrayList<>();
         populateSelectedPrimitives(layer);
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java	(revision 7005)
@@ -32,6 +32,6 @@
 
     private static class NodesWays{
-        public final Map<Node, Set<Integer>> nodes = new TreeMap<Node, Set<Integer>>();
-        public final Map<Integer, Set<Node>> ways = new TreeMap<Integer, Set<Node>>();
+        public final Map<Node, Set<Integer>> nodes = new TreeMap<>();
+        public final Map<Integer, Set<Node>> ways = new TreeMap<>();
         public final boolean oneWay;
         public NodesWays(boolean oneWay){
@@ -53,11 +53,11 @@
      * Used to keep track of what members are done.
      */
-    private final Set<Integer> remaining = new TreeSet<Integer>();
-    private final Map<Integer, Set<Node>> remainingOneway = new TreeMap<Integer, Set<Node>>();
+    private final Set<Integer> remaining = new TreeSet<>();
+    private final Map<Integer, Set<Node>> remainingOneway = new TreeMap<>();
 
     /**
      * All members that are incomplete or not a way
      */
-    private final List<Integer> notSortable = new ArrayList<Integer>();
+    private final List<Integer> notSortable = new ArrayList<>();
 
     public static Node firstOnewayNode(RelationMember m){
@@ -109,5 +109,5 @@
         Set<Integer> ts = map.nodes.get(n);
         if (ts == null) {
-            ts = new TreeSet<Integer>();
+            ts = new TreeSet<>();
             map.nodes.put(n, ts);
         }
@@ -116,5 +116,5 @@
         Set<Node> ts2 = map.ways.get(i);
         if (ts2 == null) {
-            ts2 = new TreeSet<Node>();
+            ts2 = new TreeSet<>();
             map.ways.put(i, ts2);
         }
@@ -125,5 +125,5 @@
         Set<Integer> ts = onewayMap.nodes.get(n);
         if (ts == null) {
-            ts = new TreeSet<Integer>();
+            ts = new TreeSet<>();
             onewayMap.nodes.put(n, ts);
         }
@@ -134,5 +134,5 @@
         Set<Node> ts2 = onewayMap.ways.get(i);
         if (ts2 == null) {
-            ts2 = new TreeSet<Node>();
+            ts2 = new TreeSet<>();
             onewayMap.ways.put(i, ts2);
         }
@@ -143,5 +143,5 @@
         Set<Integer> ts = onewayReverseMap.nodes.get(n);
         if (ts == null) {
-            ts = new TreeSet<Integer>();
+            ts = new TreeSet<>();
             onewayReverseMap.nodes.put(n, ts);
         }
@@ -152,5 +152,5 @@
         Set<Node> ts2 = onewayReverseMap.ways.get(i);
         if (ts2 == null) {
-            ts2 = new TreeSet<Node>();
+            ts2 = new TreeSet<>();
             onewayReverseMap.ways.put(i, ts2);
         }
@@ -161,5 +161,5 @@
         Set<Node> ts2 = remainingOneway.get(i);
         if (ts2 == null) {
-            ts2 = new TreeSet<Node>();
+            ts2 = new TreeSet<>();
             remainingOneway.put(i, ts2);
         }
@@ -233,5 +233,5 @@
     private Integer popBackwardOnewayPart(int way){
         if (lastOnewayNode != null) {
-            TreeSet<Node> nodes = new TreeSet<Node>();
+            TreeSet<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 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorter.java	(revision 7005)
@@ -23,5 +23,5 @@
     }
 
-    private static final Collection<AdditionalSorter> additionalSorters = new ArrayList<AdditionalSorter>();
+    private static final Collection<AdditionalSorter> additionalSorters = new ArrayList<>();
 
     static {
@@ -86,10 +86,10 @@
      */
     public List<RelationMember> sortMembers(List<RelationMember> relationMembers) {
-        List<RelationMember> newMembers = new ArrayList<RelationMember>();
+        List<RelationMember> newMembers = new ArrayList<>();
 
         // Sort members with custom mechanisms (relation-dependent)
-        List<RelationMember> defaultMembers = new ArrayList<RelationMember>(relationMembers.size());
+        List<RelationMember> defaultMembers = new ArrayList<>(relationMembers.size());
         // Maps sorter to assigned members for sorting. Use LinkedHashMap to retain order.
-        Map<AdditionalSorter, List<RelationMember>> customMap = new LinkedHashMap<AdditionalSorter, List<RelationMember>>();
+        Map<AdditionalSorter, List<RelationMember>> customMap = new LinkedHashMap<>();
 
         // Dispatch members to the first adequate sorter
@@ -101,5 +101,5 @@
                     list = customMap.get(sorter);
                     if (list == null) {
-                        customMap.put(sorter, list = new LinkedList<RelationMember>());
+                        customMap.put(sorter, list = new LinkedList<>());
                     }
                     list.add(m);
@@ -123,10 +123,10 @@
     public static List<RelationMember> sortMembersByConnectivity(List<RelationMember> defaultMembers) {
 
-        List<RelationMember> newMembers = new ArrayList<RelationMember>();
+        List<RelationMember> newMembers = new ArrayList<>();
 
         RelationNodeMap map = new RelationNodeMap(defaultMembers);
         // List of groups of linked members
         //
-        List<LinkedList<Integer>> allGroups = new ArrayList<LinkedList<Integer>>();
+        List<LinkedList<Integer>> allGroups = new ArrayList<>();
 
         // current group of members that are linked among each other
@@ -137,5 +137,5 @@
         Integer first;
         while ((first = map.pop()) != null) {
-            group = new LinkedList<Integer>();
+            group = new LinkedList<>();
             group.add(first);
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java	(revision 7005)
@@ -25,5 +25,5 @@
     public List<WayConnectionType> updateLinks(List<RelationMember> members) {
         this.members = members;
-        final List<WayConnectionType> con = new ArrayList<WayConnectionType>();
+        final List<WayConnectionType> con = new ArrayList<>();
 
         for (int i=0; i<members.size(); ++i) {
@@ -246,5 +246,5 @@
 
         /** the list of nodes the way k can dock to */
-        List<Node> refNodes= new ArrayList<Node>();
+        List<Node> refNodes= new ArrayList<>();
 
         switch (ref_direction) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java	(revision 7005)
@@ -51,5 +51,5 @@
 
     /** The list of errors shown in the tree */
-    private List<TestError> errors = new ArrayList<TestError>();
+    private List<TestError> errors = new ArrayList<>();
 
     /**
@@ -143,5 +143,5 @@
 
         // Remember the currently expanded rows
-        Set<Object> oldSelectedRows = new HashSet<Object>();
+        Set<Object> oldSelectedRows = new HashSet<>();
         Enumeration<TreePath> expanded = getExpandedDescendants(new TreePath(getRoot()));
         if (expanded != null) {
@@ -160,6 +160,6 @@
         }
 
-        Map<Severity, MultiMap<String, TestError>> errorTree = new HashMap<Severity, MultiMap<String, TestError>>();
-        Map<Severity, HashMap<String, MultiMap<String, TestError>>> errorTreeDeep = new HashMap<Severity, HashMap<String, MultiMap<String, TestError>>>();
+        Map<Severity, MultiMap<String, TestError>> errorTree = new HashMap<>();
+        Map<Severity, HashMap<String, MultiMap<String, TestError>>> errorTreeDeep = new HashMap<>();
         for (Severity s : Severity.values()) {
             errorTree.put(s, new MultiMap<String, TestError>(20));
@@ -193,5 +193,5 @@
                 MultiMap<String, TestError> b = errorTreeDeep.get(s).get(m);
                 if (b == null) {
-                    b = new MultiMap<String, TestError>(20);
+                    b = new MultiMap<>(20);
                     errorTreeDeep.get(s).put(m, b);
                 }
@@ -202,5 +202,5 @@
         }
 
-        List<TreePath> expandedPaths = new ArrayList<TreePath>();
+        List<TreePath> expandedPaths = new ArrayList<>();
         for (Severity s : Severity.values()) {
             MultiMap<String, TestError> severityErrors = errorTree.get(s);
@@ -356,5 +356,5 @@
      */
     public void resetErrors() {
-        List<TestError> e = new ArrayList<TestError>(errors);
+        List<TestError> e = new ArrayList<>(errors);
         setErrors(e);
     }
Index: trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 7005)
@@ -52,5 +52,5 @@
          */
         public Bookmark(Collection<String> list) throws NumberFormatException, IllegalArgumentException {
-            List<String> array = new ArrayList<String>(list);
+            List<String> array = new ArrayList<>(list);
             if(array.size() < 5)
                 throw new IllegalArgumentException(tr("Wrong number of arguments for bookmark"));
@@ -167,5 +167,5 @@
         Collection<Collection<String>> args = Main.pref.getArray("bookmarks", null);
         if(args != null) {
-            LinkedList<Bookmark> bookmarks = new LinkedList<Bookmark>();
+            LinkedList<Bookmark> bookmarks = new LinkedList<>();
             for(Collection<String> entry : args) {
                 try {
@@ -184,5 +184,5 @@
             File bookmarkFile = new File(Main.pref.getPreferencesDir(),"bookmarks");
             try {
-                LinkedList<Bookmark> bookmarks = new LinkedList<Bookmark>();
+                LinkedList<Bookmark> bookmarks = new LinkedList<>();
                 if (bookmarkFile.exists()) {
                     Main.info("Try loading obsolete bookmarks file");
@@ -240,5 +240,5 @@
      */
     public final void save() {
-        LinkedList<Collection<String>> coll = new LinkedList<Collection<String>>();
+        LinkedList<Collection<String>> coll = new LinkedList<>();
         for (Object o : ((DefaultListModel<Bookmark>)getModel()).toArray()) {
             String[] array = new String[5];
Index: trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 7005)
@@ -67,5 +67,5 @@
 
     protected SlippyMapChooser slippyMapChooser;
-    protected final List<DownloadSelection> downloadSelections = new ArrayList<DownloadSelection>();
+    protected final List<DownloadSelection> downloadSelections = new ArrayList<>();
     protected final JTabbedPane tpDownloadAreaSelectors = new JTabbedPane();
     protected JCheckBox cbNewLayer;
Index: trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 7005)
@@ -110,5 +110,5 @@
         cbSearchExpression = new HistoryComboBox();
         cbSearchExpression.setToolTipText(tr("Enter a place name to search for"));
-        List<String> cmtHistory = new LinkedList<String>(Main.pref.getCollection(HISTORY_KEY, new LinkedList<String>()));
+        List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(HISTORY_KEY, new LinkedList<String>()));
         Collections.reverse(cmtHistory);
         cbSearchExpression.setPossibleItems(cmtHistory);
@@ -195,5 +195,5 @@
         private StringBuffer description = null;
         private int depth = 0;
-        private List<SearchResult> data = new LinkedList<SearchResult>();
+        private List<SearchResult> data = new LinkedList<>();
 
         /**
@@ -389,5 +389,5 @@
 
         public NamedResultTableModel(ListSelectionModel selectionModel) {
-            data = new ArrayList<SearchResult>();
+            data = new ArrayList<>();
             this.selectionModel = selectionModel;
         }
@@ -408,5 +408,5 @@
                 this.data.clear();
             } else {
-                this.data  =new ArrayList<SearchResult>(data);
+                this.data = new ArrayList<>(data);
             }
             fireTableDataChanged();
Index: trunk/src/org/openstreetmap/josm/gui/help/HelpBrowserHistory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/help/HelpBrowserHistory.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/help/HelpBrowserHistory.java	(revision 7005)
@@ -14,5 +14,5 @@
     public HelpBrowserHistory(HelpBrowser browser) {
         this.browser = browser;
-        history = new ArrayList<String>();
+        history = new ArrayList<>();
     }
 
@@ -58,9 +58,9 @@
             // do nothing just append
         } else if (historyPos ==0 && history.size() > 0) {
-            history = new ArrayList<String>(Collections.singletonList(history.get(0)));
+            history = new ArrayList<>(Collections.singletonList(history.get(0)));
         } else if (historyPos < history.size() -1 && historyPos > 0) {
-            history = new ArrayList<String>(history.subList(0, historyPos));
+            history = new ArrayList<>(history.subList(0, historyPos));
         } else {
-            history = new ArrayList<String>();
+            history = new ArrayList<>();
         }
         if(add)
Index: trunk/src/org/openstreetmap/josm/gui/history/DiffTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/DiffTableModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/history/DiffTableModel.java	(revision 7005)
@@ -24,5 +24,5 @@
     }
     public DiffTableModel() {
-        this.rows = new ArrayList<TwoColumnDiff.Item>();
+        this.rows = new ArrayList<>();
     }
     @Override
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java	(revision 7005)
@@ -38,5 +38,5 @@
 
     protected HistoryBrowserDialogManager() {
-        dialogs = new HashMap<Long, HistoryBrowserDialog>();
+        dialogs = new HashMap<>();
         MapView.addLayerChangeListener(this);
     }
@@ -108,5 +108,5 @@
      */
     public void hideAll() {
-        List<HistoryBrowserDialog> dialogs = new ArrayList<HistoryBrowserDialog>();
+        List<HistoryBrowserDialog> dialogs = new ArrayList<>();
         dialogs.addAll(this.dialogs.values());
         for (HistoryBrowserDialog dialog: dialogs) {
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 7005)
@@ -545,5 +545,5 @@
 
         protected void initKeyList() {
-            HashSet<String> keySet = new HashSet<String>();
+            HashSet<String> keySet = new HashSet<>();
             if (current != null) {
                 keySet.addAll(current.getTags().keySet());
@@ -552,5 +552,5 @@
                 keySet.addAll(reference.getTags().keySet());
             }
-            keys = new ArrayList<String>(keySet);
+            keys = new ArrayList<>(keySet);
             Collections.sort(keys);
             fireTableDataChanged();
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java	(revision 7005)
@@ -61,5 +61,5 @@
     public HistoryLoadTask() {
         super(tr("Load history"), true);
-        toLoad = new HashSet<PrimitiveId>();
+        toLoad = new HashSet<>();
     }
 
@@ -75,5 +75,5 @@
         super(parent, tr("Load history"), true);
         CheckParameterUtil.ensureParameterNotNull(parent, "parent");
-        toLoad = new HashSet<PrimitiveId>();
+        toLoad = new HashSet<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java	(revision 7005)
@@ -38,5 +38,5 @@
     public RelationMemberListTableCellRenderer() {
         setOpaque(true);
-        icons = new HashMap<OsmPrimitiveType, ImageIcon>();
+        icons = new HashMap<>();
         icons.put(OsmPrimitiveType.NODE, ImageProvider.get("data", "node"));
         icons.put(OsmPrimitiveType.WAY, ImageProvider.get("data", "way"));
Index: trunk/src/org/openstreetmap/josm/gui/history/SelectionSynchronizer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/SelectionSynchronizer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/history/SelectionSynchronizer.java	(revision 7005)
@@ -18,5 +18,5 @@
      */
     public SelectionSynchronizer() {
-        participants = new ArrayList<ListSelectionModel>();
+        participants = new ArrayList<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java	(revision 7005)
@@ -59,6 +59,6 @@
         this.reference = Utils.copyArray(reference);
         this.current = Utils.copyArray(current);
-        referenceDiff = new ArrayList<Item>();
-        currentDiff = new ArrayList<Item>();
+        referenceDiff = new ArrayList<>();
+        currentDiff = new ArrayList<>();
         diff();
     }
Index: trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java	(revision 7005)
@@ -60,5 +60,5 @@
         hcbUploadComment.setToolTipText(tr("Enter an upload comment"));
         hcbUploadComment.setMaxTextLength(Changeset.MAX_COMMENT_LENGTH);
-        List<String> cmtHistory = new LinkedList<String>(Main.pref.getCollection(HISTORY_KEY, new LinkedList<String>()));
+        List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(HISTORY_KEY, new LinkedList<String>()));
         Collections.reverse(cmtHistory); // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
         hcbUploadComment.setPossibleItems(cmtHistory);
@@ -81,5 +81,5 @@
 
         hcbUploadSource.setToolTipText(tr("Enter a source"));
-        List<String> sourceHistory = new LinkedList<String>(Main.pref.getCollection(SOURCE_HISTORY_KEY, Arrays.asList("knowledge", "survey", "Bing")));
+        List<String> sourceHistory = new LinkedList<>(Main.pref.getCollection(SOURCE_HISTORY_KEY, Arrays.asList("knowledge", "survey", "Bing")));
         Collections.reverse(sourceHistory); // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
         hcbUploadSource.setPossibleItems(sourceHistory);
Index: trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java	(revision 7005)
@@ -197,5 +197,5 @@
     public void setChangesets(Collection<Changeset> changesets) {
         if (changesets == null) {
-            changesets = new ArrayList<Changeset>();
+            changesets = new ArrayList<>();
         }
         model.removeAllElements();
Index: trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java	(revision 7005)
@@ -39,8 +39,8 @@
         super(tr("Closing changeset"), false /* don't ignore exceptions */);
         if (changesets == null) {
-            changesets = new ArrayList<Changeset>();
+            changesets = new ArrayList<>();
         }
         this.changesets = changesets;
-        this.closedChangesets = new ArrayList<Changeset>();
+        this.closedChangesets = new ArrayList<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java	(revision 7005)
@@ -154,5 +154,5 @@
 
         // Warm about deleted primitives
-        final Set<PrimitiveId> del = new HashSet<PrimitiveId>();
+        final Set<PrimitiveId> del = new HashSet<>();
         DataSet ds = Main.main.getCurrentDataSet();
         for (PrimitiveId id : ids) {
@@ -189,5 +189,5 @@
                 return null;
         }
-        ArrayList<PrimitiveId> downloaded = new ArrayList<PrimitiveId>(ids);
+        ArrayList<PrimitiveId> downloaded = new ArrayList<>(ids);
         downloaded.removeAll(mainTask.getMissingPrimitives());
         return downloaded;
Index: trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java	(revision 7005)
@@ -29,5 +29,5 @@
 
     public OpenChangesetComboBoxModel() {
-        this.changesets = new ArrayList<Changeset>();
+        this.changesets = new ArrayList<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/SaveLayersModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/SaveLayersModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/SaveLayersModel.java	(revision 7005)
@@ -60,5 +60,5 @@
 
     public void populate(List<OsmDataLayer> layers) {
-        layerInfo = new ArrayList<SaveLayerInfo>();
+        layerInfo = new ArrayList<>();
         if (layers == null) return;
         for (OsmDataLayer layer: layers) {
@@ -115,5 +115,5 @@
 
     public List<SaveLayerInfo> getLayersWithoutFilesAndSaveRequest() {
-        List<SaveLayerInfo> ret = new ArrayList<SaveLayerInfo>();
+        List<SaveLayerInfo> ret = new ArrayList<>();
         for (SaveLayerInfo info: layerInfo) {
             if (info.isDoSaveToFile() && info.getFile() == null) {
@@ -125,5 +125,5 @@
 
     public List<SaveLayerInfo> getLayersWithIllegalFilesAndSaveRequest() {
-        List<SaveLayerInfo> ret =new ArrayList<SaveLayerInfo>();
+        List<SaveLayerInfo> ret =new ArrayList<>();
         for (SaveLayerInfo info: layerInfo) {
             if (info.isDoSaveToFile() && info.getFile() != null && info.getFile().exists() && !info.getFile().canWrite()) {
@@ -135,5 +135,5 @@
 
     public List<SaveLayerInfo> getLayersWithConflictsAndUploadRequest() {
-        List<SaveLayerInfo> ret =new ArrayList<SaveLayerInfo>();
+        List<SaveLayerInfo> ret =new ArrayList<>();
         for (SaveLayerInfo info: layerInfo) {
             if (info.isDoUploadToServer() && !info.getLayer().getConflicts().isEmpty()) {
@@ -145,5 +145,5 @@
 
     public List<SaveLayerInfo> getLayersToUpload() {
-        List<SaveLayerInfo> ret =new ArrayList<SaveLayerInfo>();
+        List<SaveLayerInfo> ret =new ArrayList<>();
         for (SaveLayerInfo info: layerInfo) {
             if (info.isDoUploadToServer()) {
@@ -155,5 +155,5 @@
 
     public List<SaveLayerInfo> getLayersToSave() {
-        List<SaveLayerInfo> ret =new ArrayList<SaveLayerInfo>();
+        List<SaveLayerInfo> ret =new ArrayList<>();
         for (SaveLayerInfo info: layerInfo) {
             if (info.isDoSaveToFile()) {
Index: trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 7005)
@@ -27,5 +27,5 @@
     private final ChangesetCommentModel changesetSourceModel;
     /** tags that applied to uploaded changesets by default*/
-    private final Map<String, String> defaultTags = new HashMap<String, String>();
+    private final Map<String, String> defaultTags = new HashMap<>();
 
     protected void build() {
@@ -111,5 +111,5 @@
 
     public Map<String,String> getDefaultTags() {
-        Map<String,String> tags = new HashMap<String, String>();
+        Map<String,String> tags = new HashMap<>();
         tags.putAll(defaultTags);
         return tags;
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 7005)
@@ -68,5 +68,5 @@
      * List of custom components that can be added by plugins at JOSM startup.
      */
-    private static final Collection<Component> customComponents = new ArrayList<Component>();
+    private static final Collection<Component> customComponents = new ArrayList<>();
 
     /**
@@ -484,5 +484,5 @@
             /* test for empty tags in the changeset metadata and proceed only after user's confirmation.
              * though, accept if key and value are empty (cf. xor). */
-            List<String> emptyChangesetTags = new ArrayList<String>();
+            List<String> emptyChangesetTags = new ArrayList<>();
             for (final Entry<String, String> i : pnlTagSettings.getTags(true).entrySet()) {
                 final boolean isKeyEmpty = i.getKey() == null || i.getKey().trim().isEmpty();
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java	(revision 7005)
@@ -69,5 +69,5 @@
         this.changeset = changeset;
         this.strategy = strategy;
-        processedPrimitives = new HashSet<IPrimitive>();
+        processedPrimitives = new HashSet<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java	(revision 7005)
@@ -74,5 +74,5 @@
         this.changeset = changeset;
         this.strategy = strategy;
-        this.processedPrimitives = new HashSet<IPrimitive>();
+        this.processedPrimitives = new HashSet<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 7005)
@@ -123,5 +123,5 @@
     public void populate(Collection<OsmPrimitive> selected, Collection<OsmPrimitive> deleted) {
         if (selected != null) {
-            lstSelectedPrimitives.getOsmPrimitiveListModel().setPrimitives(new ArrayList<OsmPrimitive>(selected));
+            lstSelectedPrimitives.getOsmPrimitiveListModel().setPrimitives(new ArrayList<>(selected));
             if (!selected.isEmpty()) {
                 lstSelectedPrimitives.getSelectionModel().setSelectionInterval(0, selected.size()-1);
@@ -135,5 +135,5 @@
 
         if (deleted != null) {
-            lstDeletedPrimitives.getOsmPrimitiveListModel().setPrimitives(new ArrayList<OsmPrimitive>(deleted));
+            lstDeletedPrimitives.getOsmPrimitiveListModel().setPrimitives(new ArrayList<>(deleted));
         } else {
             lstDeletedPrimitives.getOsmPrimitiveListModel().setPrimitives(null);
@@ -150,5 +150,5 @@
 
     public List<OsmPrimitive> getSelectedPrimitives() {
-        List<OsmPrimitive> ret  = new ArrayList<OsmPrimitive>();
+        List<OsmPrimitive> ret  = new ArrayList<>();
         ret.addAll(lstSelectedPrimitives.getOsmPrimitiveListModel().getPrimitives(lstSelectedPrimitives.getSelectedIndices()));
         ret.addAll(lstDeletedPrimitives.getOsmPrimitiveListModel().getPrimitives(lstDeletedPrimitives.getSelectedIndices()));
@@ -247,5 +247,5 @@
             if (indices == null || indices.length == 0)
                 return Collections.emptyList();
-            List<OsmPrimitive> ret = new ArrayList<OsmPrimitive>(indices.length);
+            List<OsmPrimitive> ret = new ArrayList<>(indices.length);
             for (int i: indices) {
                 if (i < 0) {
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java	(revision 7005)
@@ -73,7 +73,7 @@
         pnl.setLayout(new GridBagLayout());
         ButtonGroup bgStrategies = new ButtonGroup();
-        rbStrategy = new HashMap<UploadStrategy, JRadioButton>();
-        lblStrategies = new HashMap<UploadStrategy, JMultilineLabel>();
-        lblNumRequests = new HashMap<UploadStrategy, JLabel>();
+        rbStrategy = new HashMap<>();
+        lblStrategies = new HashMap<>();
+        lblNumRequests = new HashMap<>();
         for (UploadStrategy strategy: UploadStrategy.values()) {
             rbStrategy.put(strategy, new JRadioButton());
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java	(revision 7005)
@@ -158,5 +158,5 @@
 
         public PrimitiveListModel() {
-            primitives = new ArrayList<OsmPrimitive>();
+            primitives = new ArrayList<>();
         }
 
@@ -167,5 +167,5 @@
         public void setPrimitives(List<OsmPrimitive> primitives) {
             if (primitives == null) {
-                this.primitives = new ArrayList<OsmPrimitive>();
+                this.primitives = new ArrayList<>();
             } else {
                 this.primitives = primitives;
Index: trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java	(revision 7005)
@@ -32,5 +32,5 @@
     public CustomizeColor(Layer l) {
         this();
-        layers = new LinkedList<Layer>();
+        layers = new LinkedList<>();
         layers.add(l);
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 7005)
@@ -72,5 +72,5 @@
     public boolean[] trackVisibility = new boolean[0];
 
-    private final List<GpxTrack> lastTracks = new ArrayList<GpxTrack>(); // List of tracks at last paint
+    private final List<GpxTrack> lastTracks = new ArrayList<>(); // List of tracks at last paint
     private int lastUpdateCount;
 
@@ -635,5 +635,5 @@
         }
 
-        LinkedList<WayPoint> visibleSegments = new LinkedList<WayPoint>();
+        LinkedList<WayPoint> visibleSegments = new LinkedList<>();
         WayPoint last = null;
         ensureTrackVisibilityLength();
Index: trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java	(revision 7005)
@@ -55,5 +55,5 @@
         
         protected final void setLastLayer(Layer l) {
-            lastLayer = new WeakReference<Layer>(l);
+            lastLayer = new WeakReference<>(l);
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 7005)
@@ -103,5 +103,5 @@
      * @since 3669
      */
-    public final List<TestError> validationErrors = new ArrayList<TestError>();
+    public final List<TestError> validationErrors = new ArrayList<>();
 
     protected void setRequiresSaveToFile(boolean newValue) {
@@ -183,5 +183,5 @@
     }
 
-    private final CopyOnWriteArrayList<LayerStateChangeListener> layerStateChangeListeners = new CopyOnWriteArrayList<LayerStateChangeListener>();
+    private final CopyOnWriteArrayList<LayerStateChangeListener> layerStateChangeListeners = new CopyOnWriteArrayList<>();
 
     /**
@@ -327,6 +327,6 @@
 
     @Override public String getToolTipText() {
-        int nodes = new FilteredCollection<Node>(data.getNodes(), OsmPrimitive.nonDeletedPredicate).size();
-        int ways = new FilteredCollection<Way>(data.getWays(), OsmPrimitive.nonDeletedPredicate).size();
+        int nodes = new FilteredCollection<>(data.getNodes(), OsmPrimitive.nonDeletedPredicate).size();
+        int ways = new FilteredCollection<>(data.getWays(), OsmPrimitive.nonDeletedPredicate).size();
 
         String tool = trn("{0} node", "{0} nodes", nodes, nodes)+", ";
@@ -505,5 +505,5 @@
                 SeparatorLayerAction.INSTANCE,
                 new LayerListPopup.InfoAction(this)};
-        List<Action> actions = new ArrayList<Action>();
+        List<Action> actions = new ArrayList<>();
         actions.addAll(Arrays.asList(new Action[]{
                 LayerListDialog.getInstance().createActivateLayerAction(this),
@@ -536,11 +536,11 @@
         GpxData gpxData = new GpxData();
         gpxData.storageFile = file;
-        HashSet<Node> doneNodes = new HashSet<Node>();
+        HashSet<Node> doneNodes = new HashSet<>();
         for (Way w : data.getWays()) {
             if (!w.isUsable()) {
                 continue;
             }
-            Collection<Collection<WayPoint>> trk = new ArrayList<Collection<WayPoint>>();
-            Map<String, Object> trkAttr = new HashMap<String, Object>();
+            Collection<Collection<WayPoint>> trk = new ArrayList<>();
+            Map<String, Object> trkAttr = new HashMap<>();
 
             if (w.get("name") != null) {
@@ -555,5 +555,5 @@
                 }
                 if (trkseg == null) {
-                    trkseg = new ArrayList<WayPoint>();
+                    trkseg = new ArrayList<>();
                     trk.add(trkseg);
                 }
Index: trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 7005)
@@ -155,5 +155,5 @@
     }
 
-    private Set<Tile> tileRequestsOutstanding = new HashSet<Tile>();
+    private Set<Tile> tileRequestsOutstanding = new HashSet<>();
 
     @Override
@@ -970,5 +970,5 @@
             borderRect = tileToRect(border);
         }
-        List<Tile> missedTiles = new LinkedList<Tile>();
+        List<Tile> missedTiles = new LinkedList<>();
         // The callers of this code *require* that we return any tiles
         // that we do not draw in missedTiles.  ts.allExistingTiles() by
@@ -1178,5 +1178,5 @@
             if (zoom == 0 || this.insane())
                 return Collections.emptyList();
-            List<Tile> ret = new ArrayList<Tile>();
+            List<Tile> ret = new ArrayList<>();
             for (int x = x0; x <= x1; x++) {
                 for (int y = y0; y <= y1; y++) {
@@ -1196,5 +1196,5 @@
 
         private List<Tile> allLoadedTiles() {
-            List<Tile> ret = new ArrayList<Tile>();
+            List<Tile> ret = new ArrayList<>();
             for (Tile t : this.allExistingTiles()) {
                 if (t.isLoaded())
@@ -1375,5 +1375,5 @@
                 break;
             }
-            List<Tile> newlyMissedTiles = new LinkedList<Tile>();
+            List<Tile> newlyMissedTiles = new LinkedList<>();
             for (Tile missed : missedTiles) {
                 if ("no-tile".equals(missed.getValue("tile-info")) && zoomOffset > 0) {
Index: trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java	(revision 7005)
@@ -86,5 +86,5 @@
     @Override
     public String getToolTipText() {
-        MultiMap<Severity, TestError> errorTree = new MultiMap<Severity, TestError>();
+        MultiMap<Severity, TestError> errorTree = new MultiMap<>();
         List<TestError> errors = Main.map.validatorDialog.tree.getErrors();
         for (TestError e : errors) {
Index: trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 7005)
@@ -139,14 +139,14 @@
 
     // Request queue
-    private final List<WMSRequest> requestQueue = new ArrayList<WMSRequest>();
-    private final List<WMSRequest> finishedRequests = new ArrayList<WMSRequest>();
+    private final List<WMSRequest> requestQueue = new ArrayList<>();
+    private final List<WMSRequest> finishedRequests = new ArrayList<>();
     /**
      * List of request currently being processed by download threads
      */
-    private final List<WMSRequest> processingRequests = new ArrayList<WMSRequest>();
+    private final List<WMSRequest> processingRequests = new ArrayList<>();
     private final Lock requestQueueLock = new ReentrantLock();
     private final Condition queueEmpty = requestQueueLock.newCondition();
-    private final List<Grabber> grabbers = new ArrayList<Grabber>();
-    private final List<Thread> grabberThreads = new ArrayList<Thread>();
+    private final List<Grabber> grabbers = new ArrayList<>();
+    private final List<Thread> grabberThreads = new ArrayList<>();
     private boolean canceled;
 
@@ -235,5 +235,5 @@
 
     public void downloadAreaToCache(PrecacheTask precacheTask, List<LatLon> points, double bufferX, double bufferY) {
-        Set<Point> requestedTiles = new HashSet<Point>();
+        Set<Point> requestedTiles = new HashSet<>();
         for (LatLon point: points) {
             EastNorth minEn = Main.getProjection().latlon2eastNorth(new LatLon(point.lat() - bufferY, point.lon() - bufferX));
@@ -447,5 +447,5 @@
 
         gatherFinishedRequests();
-        Set<ProjectionBounds> areaToCache = new HashSet<ProjectionBounds>();
+        Set<ProjectionBounds> areaToCache = new HashSet<>();
 
         for(int x = bminx; x<=bmaxx; ++x) {
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 7005)
@@ -84,5 +84,5 @@
 public class CorrelateGpxWithImages extends AbstractAction {
 
-    private static List<GpxData> loadedGpxData = new ArrayList<GpxData>();
+    private static List<GpxData> loadedGpxData = new ArrayList<>();
 
     GeoImageLayer yLayer = null;
@@ -117,5 +117,5 @@
 
     ExtendedDialog syncDialog;
-    List<GpxDataWrapper> gpxLst = new ArrayList<GpxDataWrapper>();
+    List<GpxDataWrapper> gpxLst = new ArrayList<>();
     JPanel outerPanel;
     JosmComboBox cbGpx;
@@ -293,5 +293,5 @@
 
             String[] tmp = TimeZone.getAvailableIDs();
-            List<String> vtTimezones = new ArrayList<String>(tmp.length);
+            List<String> vtTimezones = new ArrayList<>(tmp.length);
 
             for (String tzStr : tmp) {
@@ -331,5 +331,5 @@
             panelLst.setLayout(new BorderLayout());
 
-            imgList = new JList<String>(new AbstractListModel<String>() {
+            imgList = new JList<>(new AbstractListModel<String>() {
                 @Override
                 public String getElementAt(int i) {
@@ -876,5 +876,5 @@
             final JSlider sldTimezone = new JSlider(-24, 24, 0);
             sldTimezone.setPaintLabels(true);
-            Dictionary<Integer,JLabel> labelTable = new Hashtable<Integer, JLabel>();
+            Dictionary<Integer,JLabel> labelTable = new Hashtable<>();
             labelTable.put(-24, new JLabel("-12:00"));
             labelTable.put(-12, new JLabel( "-6:00"));
@@ -1076,5 +1076,5 @@
      */
     private List<ImageEntry> getSortedImgList(boolean exif, boolean tagged) {
-        List<ImageEntry> dateImgLst = new ArrayList<ImageEntry>(yLayer.data.size());
+        List<ImageEntry> dateImgLst = new ArrayList<>(yLayer.data.size());
         for (ImageEntry e : yLayer.data) {
             if (!e.hasExifTime()) {
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 7005)
@@ -102,5 +102,5 @@
         private GeoImageLayer layer;
         private Collection<File> selection;
-        private Set<String> loadedDirectories = new HashSet<String>();
+        private Set<String> loadedDirectories = new HashSet<>();
         private Set<String> errorMessages;
         private GpxLayer gpxLayer;
@@ -114,5 +114,5 @@
             this.selection = selection;
             this.gpxLayer = gpxLayer;
-            errorMessages = new LinkedHashSet<String>();
+            errorMessages = new LinkedHashSet<>();
         }
 
@@ -120,5 +120,5 @@
 
             progressMonitor.subTask(tr("Starting directory scan"));
-            Collection<File> files = new ArrayList<File>();
+            Collection<File> files = new ArrayList<>();
             try {
                 addRecursiveFiles(files, selection);
@@ -136,5 +136,5 @@
 
             // read the image files
-            List<ImageEntry> data = new ArrayList<ImageEntry>(files.size());
+            List<ImageEntry> data = new ArrayList<>(files.size());
 
             for (File f : files) {
@@ -311,5 +311,5 @@
     }
 
-    private static List<Action> menuAdditions = new LinkedList<Action>();
+    private static List<Action> menuAdditions = new LinkedList<>();
     public static void registerMenuAddition(Action addition) {
         menuAdditions.add(addition);
@@ -319,5 +319,5 @@
     public Action[] getMenuEntries() {
 
-        List<Action> entries = new ArrayList<Action>();
+        List<Action> entries = new ArrayList<>();
         entries.add(LayerListDialog.getInstance().createShowHideLayerAction());
         entries.add(LayerListDialog.getInstance().createDeleteLayerAction());
@@ -831,5 +831,5 @@
     public static void registerSupportedMapMode(MapMode mapMode) {
         if (supportedMapModes == null) {
-            supportedMapModes = new ArrayList<MapMode>();
+            supportedMapModes = new ArrayList<>();
         }
         supportedMapModes.add(mapMode);
@@ -981,5 +981,5 @@
 
     public List<ImageEntry> getImages() {
-        List<ImageEntry> copy = new ArrayList<ImageEntry>(data.size());
+        List<ImageEntry> copy = new ArrayList<>(data.size());
         for (ImageEntry ie : data) {
             copy.add(ie.clone());
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java	(revision 7005)
@@ -26,5 +26,5 @@
     public ThumbsLoader(GeoImageLayer layer) {
         this.layer = layer;
-        this.data = new ArrayList<ImageEntry>(layer.data);
+        this.data = new ArrayList<>(layer.data);
         if (!cacheOff) {
             cache = new CacheFiles("geoimage-thumbnails", false);
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 7005)
@@ -145,5 +145,5 @@
         };
         // define how to sort row
-        TableRowSorter<DefaultTableModel> rowSorter = new TableRowSorter<DefaultTableModel>();
+        TableRowSorter<DefaultTableModel> rowSorter = new TableRowSorter<>();
         t.setRowSorter(rowSorter);
         rowSorter.setModel(model);
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java	(revision 7005)
@@ -50,5 +50,5 @@
         for (GpxTrack trk : layer.data.tracks) {
             for (GpxTrackSegment segment : trk.getSegments()) {
-                List<Node> nodes = new ArrayList<Node>();
+                List<Node> nodes = new ArrayList<>();
                 for (WayPoint p : segment.getWayPoints()) {
                     Node n = new Node(p.getCoor());
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/CustomizeDrawingAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/CustomizeDrawingAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/CustomizeDrawingAction.java	(revision 7005)
@@ -38,5 +38,5 @@
     public CustomizeDrawingAction(Layer l) {
         this();
-        layers = new LinkedList<Layer>();
+        layers = new LinkedList<>();
         layers.add(l);
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongPanel.java	(revision 7005)
@@ -74,5 +74,5 @@
             s[i] = tr("{0} meters", dist[i]);
         }
-        buffer = new JList<String>(s);
+        buffer = new JList<>(s);
         
         double distanceValue = Main.pref.getDouble(prefDist, dist[0]);
@@ -93,5 +93,5 @@
             s[i] = tr("{0} sq km", area[i]);
         }
-        maxRect = new JList<String>(s);
+        maxRect = new JList<>(s);
 
         double areaValue = Main.pref.getDouble(prefArea, area[0]);
@@ -109,5 +109,5 @@
         if (prefNear != null) {
             add(new JLabel(tr("Download near:")), GBC.eol());
-            downloadNear = new JList<String>(new String[]{tr("track only"), tr("waypoints only"), tr("track and waypoints")});
+            downloadNear = new JList<>(new String[]{tr("track only"), tr("waypoints only"), tr("track and waypoints")});
             downloadNear.setSelectedIndex(Main.pref.getInteger(prefNear, 0));
             add(downloadNear, GBC.eol());
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackAction.java	(revision 7005)
@@ -46,5 +46,5 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        final List<LatLon> points = new ArrayList<LatLon>();
+        final List<LatLon> points = new ArrayList<>();
         for (GpxTrack trk : data.tracks) {
             for (GpxTrackSegment segment : trk.getSegments()) {
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 7005)
@@ -128,5 +128,5 @@
         boolean hasTracks = layer.data.tracks != null && !layer.data.tracks.isEmpty();
         boolean hasWaypoints = layer.data.waypoints != null && !layer.data.waypoints.isEmpty();
-        Collection<WayPoint> waypoints = new ArrayList<WayPoint>();
+        Collection<WayPoint> waypoints = new ArrayList<>();
         boolean timedMarkersOmitted = false;
         boolean untimedMarkersOmitted = false;
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java	(revision 7005)
@@ -57,5 +57,5 @@
             File[] sel = fc.getSelectedFiles();
             if (sel != null && sel.length > 0) {
-                LinkedList<File> files = new LinkedList<File>();
+                LinkedList<File> files = new LinkedList<>();
                 addRecursiveFiles(files, sel);
                 importer.importDataHandleExceptions(files, NullProgressMonitor.INSTANCE);
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 7005)
@@ -88,5 +88,5 @@
         // will make gui for it so I'm keeping it here
 
-        private static final Map<String, TemplateEntryProperty> CACHE = new HashMap<String, TemplateEntryProperty>();
+        private static final Map<String, TemplateEntryProperty> CACHE = new HashMap<>();
 
         // Legacy code - convert label from int to template engine expression
@@ -185,5 +185,5 @@
      * stuff).
      */
-    public static final List<MarkerProducers> markerProducers = new LinkedList<MarkerProducers>();
+    public static final List<MarkerProducers> markerProducers = new LinkedList<>();
 
     // Add one Marker specifying the default behaviour.
@@ -468,5 +468,5 @@
             result = dataProvider.getTemplateKeys();
         } else {
-            result = new ArrayList<String>();
+            result = new ArrayList<>();
         }
         result.add(MARKER_FORMATTED_OFFSET);
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 7005)
@@ -75,5 +75,5 @@
         super(name);
         this.setAssociatedFile(associatedFile);
-        this.data = new ArrayList<Marker>();
+        this.data = new ArrayList<>();
         this.fromLayer = fromLayer;
         double firstTime = -1.0;
@@ -239,5 +239,5 @@
 
     @Override public Action[] getMenuEntries() {
-        Collection<Action> components = new ArrayList<Action>();
+        Collection<Action> components = new ArrayList<>();
         components.add(LayerListDialog.getInstance().createShowHideLayerAction());
         components.add(new ShowHideMarkerText(this));
@@ -324,5 +324,5 @@
 
         // insert it at the right place in a copy the collection
-        Collection<Marker> newData = new ArrayList<Marker>();
+        Collection<Marker> newData = new ArrayList<>();
         am = null;
         AudioMarker ret = newAudioMarker; // save to have return value
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 7005)
@@ -23,5 +23,5 @@
     public static final Cascade EMPTY_CASCADE = new Cascade();
 
-    protected Map<String, Object> prop = new HashMap<String, Object>();
+    protected Map<String, Object> prop = new HashMap<>();
 
     private static final Pattern HEX_COLOR_PATTERN = Pattern.compile("#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})");
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java	(revision 7005)
@@ -141,5 +141,5 @@
     }
 
-    private static final Map<FontDescriptor, Font> FONT_MAP = new HashMap<FontDescriptor, Font>();
+    private static final Map<FontDescriptor, Font> FONT_MAP = new HashMap<>();
     private static Font getCachedFont(FontDescriptor fd) {
         Font f = FONT_MAP.get(fd);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 7005)
@@ -34,5 +34,5 @@
      */
     public ElemStyles() {
-        styleSources = new ArrayList<StyleSource>();
+        styleSources = new ArrayList<>();
     }
 
@@ -176,5 +176,5 @@
                     boolean hasIndependentLineStyle = false;
                     if (!isOuterWayOfSomeMP) { // do this only one time
-                        List<ElemStyle> tmp = new ArrayList<ElemStyle>(p.a.size());
+                        List<ElemStyle> tmp = new ArrayList<>(p.a.size());
                         for (ElemStyle s : p.a) {
                             if (s instanceof AreaElemStyle) {
@@ -305,5 +305,5 @@
     public Pair<StyleList, Range> generateStyles(OsmPrimitive osm, double scale, OsmPrimitive multipolyOuterWay, boolean pretendWayIsClosed) {
 
-        List<ElemStyle> sl = new ArrayList<ElemStyle>();
+        List<ElemStyle> sl = new ArrayList<>();
         MultiCascade mc = new MultiCascade();
         Environment env = new Environment(osm, mc, null, null);
@@ -351,5 +351,5 @@
             }
         }
-        return new Pair<StyleList, Range>(new StyleList(sl), mc.range);
+        return new Pair<>(new StyleList(sl), mc.range);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java	(revision 7005)
@@ -169,6 +169,6 @@
         };
 
-        private List<String> nameTags = new ArrayList<String>();
-        private List<String> nameComplementTags = new ArrayList<String>();
+        private List<String> nameTags = new ArrayList<>();
+        private List<String> nameComplementTags = new ArrayList<>();
 
         /**
@@ -188,5 +188,5 @@
                 nameTags = Collections.emptyList();
             }
-            ArrayList<String> result = new ArrayList<String>();
+            ArrayList<String> result = new ArrayList<>();
             for(String tag: nameTags) {
                 if (tag == null) {
@@ -248,11 +248,11 @@
         public final void initNameTagsFromPreferences() {
             if (Main.pref == null){
-                this.nameTags = new ArrayList<String>(Arrays.asList(DEFAULT_NAME_TAGS));
-                this.nameComplementTags = new ArrayList<String>(Arrays.asList(DEFAULT_NAME_COMPLEMENT_TAGS));
+                this.nameTags = new ArrayList<>(Arrays.asList(DEFAULT_NAME_TAGS));
+                this.nameComplementTags = new ArrayList<>(Arrays.asList(DEFAULT_NAME_COMPLEMENT_TAGS));
             } else {
-                this.nameTags = new ArrayList<String>(
+                this.nameTags = new ArrayList<>(
                         Main.pref.getCollection("mappaint.nameOrder", Arrays.asList(DEFAULT_NAME_TAGS))
                 );
-                this.nameComplementTags = new ArrayList<String>(
+                this.nameComplementTags = new ArrayList<>(
                         Main.pref.getCollection("mappaint.nameComplementOrder", Arrays.asList(DEFAULT_NAME_COMPLEMENT_TAGS))
                 );
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java	(revision 7005)
@@ -76,5 +76,5 @@
         }
     }
-    private final Map<String, MapPaintAction> actions = new HashMap<String, MapPaintAction>();
+    private final Map<String, MapPaintAction> actions = new HashMap<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 7005)
@@ -161,5 +161,5 @@
 
     public static List<String> getIconSourceDirs(StyleSource source) {
-        List<String> dirs = new LinkedList<String>();
+        List<String> dirs = new LinkedList<>();
 
         String sourceDir = source.getLocalSourceDir();
@@ -217,5 +217,5 @@
         MirroredInputStream in = null;
         try {
-            Set<String> mimes = new HashSet<String>();
+            Set<String> mimes = new HashSet<>();
             mimes.addAll(Arrays.asList(XmlStyleSource.XML_STYLE_MIME_TYPES.split(", ")));
             mimes.addAll(Arrays.asList(MapCSSStyleSource.MAPCSS_STYLE_MIME_TYPES.split(", ")));
@@ -274,5 +274,5 @@
      */
     public static void reloadStyles(final int... sel) {
-        List<StyleSource> toReload = new ArrayList<StyleSource>();
+        List<StyleSource> toReload = new ArrayList<>();
         List<StyleSource> data = styles.getStyleSources();
         for (int i : sel) {
@@ -334,5 +334,5 @@
         int[] selSorted = Arrays.copyOf(sel, sel.length);
         Arrays.sort(selSorted);
-        List<StyleSource> data = new ArrayList<StyleSource>(styles.getStyleSources());
+        List<StyleSource> data = new ArrayList<>(styles.getStyleSources());
         for (int row: selSorted) {
             StyleSource t1 = data.get(row);
@@ -401,5 +401,5 @@
 
     protected static final CopyOnWriteArrayList<MapPaintSylesUpdateListener> listeners
-            = new CopyOnWriteArrayList<MapPaintSylesUpdateListener>();
+            = new CopyOnWriteArrayList<>();
 
     public static void addMapPaintSylesUpdateListener(MapPaintSylesUpdateListener listener) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MultiCascade.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MultiCascade.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MultiCascade.java	(revision 7005)
@@ -23,5 +23,5 @@
      */
     public MultiCascade() {
-        layers = new HashMap<String, Cascade>();
+        layers = new HashMap<>();
         range = Range.ZERO_TO_INFINITY;
     }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 7005)
@@ -25,19 +25,19 @@
     private final List<StyleList> data;
 
-    private static final Storage<StyleCache> internPool = new Storage<StyleCache>(); // TODO: clean up the intern pool from time to time (after purge or layer removal)
+    private static final Storage<StyleCache> internPool = new Storage<>(); // TODO: clean up the intern pool from time to time (after purge or layer removal)
 
     public static final StyleCache EMPTY_STYLECACHE = (new StyleCache()).intern();
 
     private StyleCache() {
-        bd = new ArrayList<Double>();
+        bd = new ArrayList<>();
         bd.add(0.0);
         bd.add(Double.POSITIVE_INFINITY);
-        data = new ArrayList<StyleList>();
+        data = new ArrayList<>();
         data.add(null);
     }
 
     private StyleCache(StyleCache s) {
-        bd = new ArrayList<Double>(s.bd);
-        data = new ArrayList<StyleList>(s.data);
+        bd = new ArrayList<>(s.bd);
+        data = new ArrayList<>(s.data);
     }
 
@@ -45,22 +45,24 @@
      * List of Styles, immutable
      */
-    public static class StyleList implements Iterable<ElemStyle>
-    {
+    public static class StyleList implements Iterable<ElemStyle> {
         private List<ElemStyle> lst;
 
+        /**
+         * Constructs a new {@code StyleList}.
+         */
         public StyleList() {
-            lst = new ArrayList<ElemStyle>();
+            lst = new ArrayList<>();
         }
 
         public StyleList(ElemStyle... init) {
-            lst = new ArrayList<ElemStyle>(Arrays.asList(init));
+            lst = new ArrayList<>(Arrays.asList(init));
         }
 
         public StyleList(Collection<ElemStyle> sl) {
-            lst = new ArrayList<ElemStyle>(sl);
+            lst = new ArrayList<>(sl);
         }
 
         public StyleList(StyleList sl, ElemStyle s) {
-            lst = new ArrayList<ElemStyle>(sl.lst);
+            lst = new ArrayList<>(sl.lst);
             lst.add(s);
         }
@@ -121,5 +123,5 @@
         for (int i=0; i<data.size(); ++i) {
             if (bd.get(i) < scale && scale <= bd.get(i+1)) {
-                return new Pair<StyleList, Range>(data.get(i), new Range(bd.get(i), bd.get(i+1)));
+                return new Pair<>(data.get(i), new Range(bd.get(i), bd.get(i+1)));
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java	(revision 7005)
@@ -29,5 +29,5 @@
 public abstract class StyleSource extends SourceEntry {
 
-    private List<Throwable> errors = new ArrayList<Throwable>();
+    private List<Throwable> errors = new ArrayList<>();
     public File zipIcons;
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/CSSColors.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/CSSColors.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/CSSColors.java	(revision 7005)
@@ -7,5 +7,5 @@
 
 public final class CSSColors {
-    private static final Map<String, Color> CSS_COLORS = new HashMap<String, Color>();
+    private static final Map<String, Color> CSS_COLORS = new HashMap<>();
     static {
         Object[][] CSSCOLORS_INIT = new Object[][] {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 7005)
@@ -51,6 +51,6 @@
 
     static {
-        arrayFunctions = new ArrayList<Method>();
-        parameterFunctions = new ArrayList<Method>();
+        arrayFunctions = new ArrayList<>();
+        parameterFunctions = new ArrayList<>();
         for (Method m : Functions.class.getDeclaredMethods()) {
             Class<?>[] paramTypes = m.getParameterTypes();
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 7005)
@@ -49,10 +49,10 @@
     public MapCSSStyleSource(String url, String name, String shortdescription) {
         super(url, name, shortdescription);
-        rules = new ArrayList<MapCSSRule>();
+        rules = new ArrayList<>();
     }
 
     public MapCSSStyleSource(SourceEntry entry) {
         super(entry);
-        rules = new ArrayList<MapCSSRule>();
+        rules = new ArrayList<>();
     }
 
@@ -68,5 +68,5 @@
         CheckParameterUtil.ensureParameterNotNull(css);
         this.css = css;
-        rules = new ArrayList<MapCSSRule>();
+        rules = new ArrayList<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 7005)
@@ -41,12 +41,12 @@
     public static final String XML_STYLE_MIME_TYPES = "application/xml, text/xml, text/plain; q=0.8, application/zip, application/octet-stream; q=0.5";
 
-    protected final Map<String, IconPrototype> icons = new HashMap<String, IconPrototype>();
-    protected final Map<String, LinePrototype> lines = new HashMap<String, LinePrototype>();
-    protected final Map<String, LinemodPrototype> modifiers = new HashMap<String, LinemodPrototype>();
-    protected final Map<String, AreaPrototype> areas = new HashMap<String, AreaPrototype>();
-    protected final List<IconPrototype> iconsList = new LinkedList<IconPrototype>();
-    protected final List<LinePrototype> linesList = new LinkedList<LinePrototype>();
-    protected final List<LinemodPrototype> modifiersList = new LinkedList<LinemodPrototype>();
-    protected final List<AreaPrototype> areasList = new LinkedList<AreaPrototype>();
+    protected final Map<String, IconPrototype> icons = new HashMap<>();
+    protected final Map<String, LinePrototype> lines = new HashMap<>();
+    protected final Map<String, LinemodPrototype> modifiers = new HashMap<>();
+    protected final Map<String, AreaPrototype> areas = new HashMap<>();
+    protected final List<IconPrototype> iconsList = new LinkedList<>();
+    protected final List<LinePrototype> linesList = new LinkedList<>();
+    protected final List<LinemodPrototype> modifiersList = new LinkedList<>();
+    protected final List<AreaPrototype> areasList = new LinkedList<>();
 
     public XmlStyleSource(String url, String name, String shortdescription) {
@@ -182,5 +182,5 @@
     private void get(OsmPrimitive primitive, boolean closed, WayPrototypesRecord p, Double scale, MultiCascade mc) {
         String lineIdx = null;
-        HashMap<String, LinemodPrototype> overlayMap = new HashMap<String, LinemodPrototype>();
+        HashMap<String, LinemodPrototype> overlayMap = new HashMap<>();
         boolean isNotArea = primitive.isKeyFalse("area");
         for (String key : primitive.keySet()) {
@@ -254,5 +254,5 @@
         overlayMap.remove(lineIdx); // do not use overlay if linestyle is from the same rule (example: railway=tram)
         if (!overlayMap.isEmpty()) {
-            List<LinemodPrototype> tmp = new LinkedList<LinemodPrototype>();
+            List<LinemodPrototype> tmp = new LinkedList<>();
             if (p.linemods != null) {
                 tmp.addAll(p.linemods);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java	(revision 7005)
@@ -161,5 +161,5 @@
                 if (c.key != null) {
                     if(rule.conditions == null) {
-                        rule.conditions = new LinkedList<XmlCondition>();
+                        rule.conditions = new LinkedList<>();
                     }
                     rule.conditions.add(new XmlCondition(rule.cond));
Index: trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 7005)
@@ -375,5 +375,5 @@
             connection.setUseCaches(false);
 
-            Map<String,String> parameters = new HashMap<String, String>();
+            Map<String,String> parameters = new HashMap<>();
             parameters.put("username", userName);
             parameters.put("password", password);
@@ -436,5 +436,5 @@
 
     protected void sendAuthorisationRequest(SessionId sessionId, OAuthToken requestToken, OsmPrivileges privileges) throws OsmOAuthAuthorizationException {
-        Map<String, String> parameters = new HashMap<String, String>();
+        Map<String, String> parameters = new HashMap<>();
         fetchOAuthToken(sessionId, requestToken);
         parameters.put("oauth_token", requestToken.getKey());
Index: trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 7005)
@@ -142,12 +142,12 @@
 
     // all created tabs
-    private final List<PreferenceTab> tabs = new ArrayList<PreferenceTab>();
-    private static final Collection<PreferenceSettingFactory> settingsFactory = new LinkedList<PreferenceSettingFactory>();
-    private final List<PreferenceSetting> settings = new ArrayList<PreferenceSetting>();
+    private final List<PreferenceTab> tabs = new ArrayList<>();
+    private static final Collection<PreferenceSettingFactory> settingsFactory = new LinkedList<>();
+    private final List<PreferenceSetting> settings = new ArrayList<>();
 
     // distinct list of tabs that have been initialized (we do not initialize tabs until they are displayed to speed up dialog startup)
-    private final List<PreferenceSetting> settingsInitialized = new ArrayList<PreferenceSetting>();
-
-    List<ValidationListener> validationListeners = new ArrayList<ValidationListener>();
+    private final List<PreferenceSetting> settingsInitialized = new ArrayList<>();
+
+    List<ValidationListener> validationListeners = new ArrayList<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 7005)
@@ -127,5 +127,5 @@
         DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
         this.availableSourcesModel = new AvailableSourcesListModel(selectionModel);
-        this.lstAvailableSources = new JList<ExtendedSourceEntry>(availableSourcesModel);
+        this.lstAvailableSources = new JList<>(availableSourcesModel);
         this.lstAvailableSources.setSelectionModel(selectionModel);
         this.lstAvailableSources.setCellRenderer(new SourceEntryListCellRenderer());
@@ -446,5 +446,5 @@
 
         public AvailableSourcesListModel(DefaultListSelectionModel selectionModel) {
-            data = new ArrayList<ExtendedSourceEntry>();
+            data = new ArrayList<>();
             this.selectionModel = selectionModel;
         }
@@ -483,5 +483,5 @@
 
         public List<ExtendedSourceEntry> getSelected() {
-            List<ExtendedSourceEntry> ret = new ArrayList<ExtendedSourceEntry>();
+            List<ExtendedSourceEntry> ret = new ArrayList<>();
             for(int i=0; i<data.size();i++) {
                 if (selectionModel.isSelectedIndex(i)) {
@@ -499,5 +499,5 @@
         public ActiveSourcesModel(DefaultListSelectionModel selectionModel) {
             this.selectionModel = selectionModel;
-            this.data = new ArrayList<SourceEntry>();
+            this.data = new ArrayList<>();
         }
 
@@ -575,5 +575,5 @@
 
         public void removeIdxs(Collection<Integer> idxs) {
-            List<SourceEntry> newData = new ArrayList<SourceEntry>();
+            List<SourceEntry> newData = new ArrayList<>();
             for (int i=0; i<data.size(); ++i) {
                 if (!idxs.contains(i)) {
@@ -601,5 +601,5 @@
 
         public List<SourceEntry> getSources() {
-            return new ArrayList<SourceEntry>(data);
+            return new ArrayList<>(data);
         }
 
@@ -983,5 +983,5 @@
             int josmVersion = Version.getInstance().getVersion();
             if (josmVersion != Version.JOSM_UNKNOWN_VERSION) {
-                Collection<String> messages = new ArrayList<String>();
+                Collection<String> messages = new ArrayList<>();
                 for (ExtendedSourceEntry entry : sources) {
                     if (entry.minJosmVersion != null && entry.minJosmVersion > josmVersion) {
@@ -1054,5 +1054,5 @@
         public IconPathTableModel(DefaultListSelectionModel selectionModel) {
             this.selectionModel = selectionModel;
-            this.data = new ArrayList<String>();
+            this.data = new ArrayList<>();
         }
 
@@ -1145,5 +1145,5 @@
 
         public List<String> getIconPaths() {
-            return new ArrayList<String>(data);
+            return new ArrayList<>(data);
         }
     }
@@ -1237,5 +1237,5 @@
         private BufferedReader reader;
         private boolean canceled;
-        private final List<ExtendedSourceEntry> sources = new ArrayList<ExtendedSourceEntry>();
+        private final List<ExtendedSourceEntry> sources = new ArrayList<>();
 
         public SourceLoader(String url, List<SourceProvider> sourceProviders) {
@@ -1423,5 +1423,5 @@
         public FileOrUrlCellEditor(boolean isFile) {
             this.isFile = isFile;
-            listeners = new CopyOnWriteArrayList<CellEditorListener>();
+            listeners = new CopyOnWriteArrayList<>();
             build();
         }
@@ -1575,7 +1575,7 @@
                 return new ArrayList<SourceEntry>(getDefault());
 
-            List<SourceEntry> entries = new ArrayList<SourceEntry>();
+            List<SourceEntry> entries = new ArrayList<>();
             for (Map<String, String> sourcePref : src) {
-                SourceEntry e = deserialize(new HashMap<String, String>(sourcePref));
+                SourceEntry e = deserialize(new HashMap<>(sourcePref));
                 if (e != null) {
                     entries.add(e);
@@ -1586,5 +1586,5 @@
 
         public boolean put(Collection<? extends SourceEntry> entries) {
-            Collection<Map<String, String>> setting = new ArrayList<Map<String, String>>(entries.size());
+            Collection<Map<String, String>> setting = new ArrayList<>(entries.size());
             for (SourceEntry e : entries) {
                 setting.add(serialize(e));
@@ -1598,5 +1598,5 @@
          */
         public final Set<String> getActiveUrls() {
-            Set<String> urls = new HashSet<String>();
+            Set<String> urls = new HashSet<>();
             for (SourceEntry e : get()) {
                 if (e.active) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 7005)
@@ -83,5 +83,5 @@
         private String icon = "";
         private ImageIcon ico = null;
-        private final Map<String, Object> parameters = new HashMap<String, Object>();
+        private final Map<String, Object> parameters = new HashMap<>();
 
         public ActionDefinition(Action action) {
@@ -204,5 +204,5 @@
 
                 ParameterizedAction parametrizedAction = (ParameterizedAction)action;
-                Map<String, ActionParameter<?>> actionParams = new HashMap<String, ActionParameter<?>>();
+                Map<String, ActionParameter<?>> actionParams = new HashMap<>();
                 for (ActionParameter<?> param: parametrizedAction.getActionParameters()) {
                     actionParams.put(param.getName(), param);
@@ -400,5 +400,5 @@
             @Override
             public void actionPerformed(ActionEvent e) {
-                                Collection<String> t = new LinkedList<String>(getToolString());
+                                Collection<String> t = new LinkedList<>(getToolString());
                                 ActionParser parser = new ActionParser(null);
                                 // get text definition of current action
@@ -467,11 +467,11 @@
      * Value: The action to execute.
      */
-    private final Map<String, Action> actions = new HashMap<String, Action>();
-    private final Map<String, Action> regactions = new HashMap<String, Action>();
+    private final Map<String, Action> actions = new HashMap<>();
+    private final Map<String, Action> regactions = new HashMap<>();
 
     private final DefaultMutableTreeNode rootActionsNode = new DefaultMutableTreeNode(tr("Actions"));
 
     public JToolBar control = new JToolBar();
-    private final Map<Object, ActionDefinition> buttonActions = new HashMap<Object, ActionDefinition>(30);
+    private final Map<Object, ActionDefinition> buttonActions = new HashMap<>(30);
 
     @Override
@@ -552,6 +552,6 @@
         private final Move moveAction = new Move();
 
-        private final DefaultListModel<ActionDefinition> selected = new DefaultListModel<ActionDefinition>();
-        private final JList<ActionDefinition> selectedList = new JList<ActionDefinition>(selected);
+        private final DefaultListModel<ActionDefinition> selected = new DefaultListModel<>();
+        private final JList<ActionDefinition> selectedList = new JList<>(selected);
 
         private final DefaultTreeModel actionsTreeModel;
@@ -655,5 +655,5 @@
                 @Override
                 protected Transferable createTransferable(JComponent c) {
-                    List<ActionDefinition> actions = new ArrayList<ActionDefinition>();
+                    List<ActionDefinition> actions = new ArrayList<>();
                     for (ActionDefinition o: ((JList<ActionDefinition>)c).getSelectedValuesList()) {
                         actions.add(o);
@@ -768,5 +768,5 @@
                 protected Transferable createTransferable(JComponent c) {
                     TreePath[] paths = actionsTree.getSelectionPaths();
-                    List<ActionDefinition> dragActions = new ArrayList<ActionDefinition>();
+                    List<ActionDefinition> dragActions = new ArrayList<>();
                     for (TreePath path : paths) {
                         DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
@@ -856,5 +856,5 @@
         @Override
         public boolean ok() {
-            Collection<String> t = new LinkedList<String>();
+            Collection<String> t = new LinkedList<>();
             ActionParser parser = new ActionParser(null);
             for (int i = 0; i < selected.size(); ++i) {
@@ -971,9 +971,9 @@
         loadActions();
 
-        Map<String, Action> allActions = new HashMap<String, Action>(regactions);
+        Map<String, Action> allActions = new HashMap<>(regactions);
         allActions.putAll(actions);
         ActionParser actionParser = new ActionParser(allActions);
 
-        Collection<ActionDefinition> result = new ArrayList<ActionDefinition>();
+        Collection<ActionDefinition> result = new ArrayList<>();
 
         for (String s : getToolString()) {
@@ -1062,5 +1062,5 @@
      */
     public void addCustomButton(String definitionText, int preferredIndex, boolean removeIfExists) {
-        LinkedList<String> t = new LinkedList<String>(getToolString());
+        LinkedList<String> t = new LinkedList<>(getToolString());
         if (t.contains(definitionText)) {
             if (!removeIfExists) return; // do nothing
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 7005)
@@ -73,5 +73,5 @@
 
     protected List<PrefEntry> allData;
-    protected List<PrefEntry> displayData = new ArrayList<PrefEntry>();
+    protected List<PrefEntry> displayData = new ArrayList<>();
     protected JosmTextField txtFilter;
     protected PreferencesTable table;
@@ -206,5 +206,5 @@
 
     private void exportSelectedToXML() {
-        List<String> keys = new ArrayList<String>();
+        List<String> keys = new ArrayList<>();
         boolean hasLists = false;
 
@@ -277,5 +277,5 @@
 
     private List<PrefEntry> prepareData(Map<String, Setting> loaded, Map<String, Setting> orig, Map<String, Setting> defaults) {
-        List<PrefEntry> data = new ArrayList<PrefEntry>();
+        List<PrefEntry> data = new ArrayList<>();
         for (Entry<String, Setting> e : loaded.entrySet()) {
             Setting value = e.getValue();
@@ -309,5 +309,5 @@
     }
 
-    Map<String,String> profileTypes = new LinkedHashMap<String, String>();
+    Map<String,String> profileTypes = new LinkedHashMap<>();
 
     private JPopupMenu buildPopupMenu() {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java	(revision 7005)
@@ -41,5 +41,5 @@
     @Override
     public void actionPerformed(ActionEvent ae) {
-        List<String> keys = new ArrayList<String>();
+        List<String> keys = new ArrayList<>();
         Map<String, Setting> all = prefs.getAllSettings();
         for (String key: all.keySet()) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListEditor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListEditor.java	(revision 7005)
@@ -42,7 +42,7 @@
         List<String> orig = setting.getValue();
         if (orig != null) {
-            data = new ArrayList<String>(orig);
+            data = new ArrayList<>(orig);
         } else {
-            data = new ArrayList<String>();
+            data = new ArrayList<>();
         }
         setButtonIcons(new String[] {"ok.png", "cancel.png"});
@@ -56,5 +56,5 @@
      */
     public List<String> getData() {
-        return new ArrayList<String>(Utils.filter(data, new Predicate<String>() {
+        return new ArrayList<>(Utils.filter(data, new Predicate<String>() {
             @Override
             public boolean evaluate(String object) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListListEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListListEditor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListListEditor.java	(revision 7005)
@@ -56,8 +56,8 @@
         this.entry = entry;
         List<List<String>> orig = setting.getValue();
-        data = new ArrayList<List<String>>();
+        data = new ArrayList<>();
         if (orig != null) {
             for (List<String> l : orig) {
-                data.add(new ArrayList<String>(l));
+                data.add(new ArrayList<>(l));
             }
         }
@@ -82,5 +82,5 @@
 
         entryModel = new EntryListModel();
-        entryList = new JList<String>(entryModel);
+        entryList = new JList<>(entryModel);
         entryList.getSelectionModel().addListSelectionListener(new EntryListener());
         JScrollPane scroll = new JScrollPane(entryList);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java	(revision 7005)
@@ -58,10 +58,10 @@
         List<Map<String, String>> orig = setting.getValue();
 
-        dataKeys = new ArrayList<List<String>>();
-        dataValues = new ArrayList<List<String>>();
+        dataKeys = new ArrayList<>();
+        dataValues = new ArrayList<>();
         if (orig != null) {
             for (Map<String, String> m : orig) {
-                List<String> keys = new ArrayList<String>();
-                List<String> values = new ArrayList<String>();
+                List<String> keys = new ArrayList<>();
+                List<String> values = new ArrayList<>();
                 for (Entry<String, String> e : m.entrySet()) {
                     keys.add(e.getKey());
@@ -82,7 +82,7 @@
      */
     public List<Map<String,String>> getData() {
-        List<Map<String,String>> data = new ArrayList<Map<String,String>>();
+        List<Map<String,String>> data = new ArrayList<>();
         for (int i=0; i < dataKeys.size(); ++i) {
-            Map<String,String> m = new LinkedHashMap<String, String>();
+            Map<String,String> m = new LinkedHashMap<>();
             for (int j=0; j < dataKeys.get(i).size(); ++j) {
                 m.put(dataKeys.get(i).get(j), dataValues.get(i).get(j));
@@ -100,5 +100,5 @@
 
         entryModel = new EntryListModel();
-        entryList = new JList<String>(entryModel);
+        entryList = new JList<>(entryModel);
         entryList.getSelectionModel().addListSelectionListener(new EntryListener());
         JScrollPane scroll = new JScrollPane(entryList);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java	(revision 7005)
@@ -74,5 +74,5 @@
      */
     public List<PrefEntry> getSelectedItems() {
-        List<PrefEntry> entries = new ArrayList<PrefEntry>();
+        List<PrefEntry> entries = new ArrayList<>();
         for (int row : getSelectedRows()) {
             PrefEntry p = (PrefEntry) model.getValueAt(row, -1);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 7005)
@@ -67,5 +67,5 @@
     private DefaultTableModel tableModel;
     private JTable colors;
-    private List<String> del = new ArrayList<String>();
+    private List<String> del = new ArrayList<>();
 
     private JButton colorEdit;
@@ -92,7 +92,7 @@
         }
         // fill model with colors:
-        Map<String, String> colorKeyList = new TreeMap<String, String>();
-        Map<String, String> colorKeyList_mappaint = new TreeMap<String, String>();
-        Map<String, String> colorKeyList_layer = new TreeMap<String, String>();
+        Map<String, String> colorKeyList = new TreeMap<>();
+        Map<String, String> colorKeyList_mappaint = new TreeMap<>();
+        Map<String, String> colorKeyList_layer = new TreeMap<>();
         for (String key : colorMap.keySet()) {
             if (key.startsWith("layer ")) {
@@ -115,5 +115,5 @@
     private void addColorRows(Map<String, String> colorMap, Map<String, String> keyMap) {
         for (String value : keyMap.values()) {
-            Vector<Object> row = new Vector<Object>(2);
+            Vector<Object> row = new Vector<>(2);
             String html = colorMap.get(value);
             Color color = ColorHelper.html2color(html);
@@ -134,5 +134,5 @@
         String key;
         String value;
-        Map<String, String> colorMap = new HashMap<String, String>();
+        Map<String, String> colorMap = new HashMap<>();
         for(int row = 0; row < tableModel.getRowCount(); ++row) {
             key = (String)tableModel.getValueAt(row, 0);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java	(revision 7005)
@@ -76,5 +76,5 @@
 
     private static class LanguageComboBoxModel extends DefaultComboBoxModel {
-        private final List<Locale> data = new ArrayList<Locale>();
+        private final List<Locale> data = new ArrayList<>();
 
         public LanguageComboBoxModel(){
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java	(revision 7005)
@@ -30,5 +30,5 @@
     protected final JosmTextField name = new JosmTextField();
 
-    protected final Collection<ContentValidationListener> listeners = new ArrayList<ContentValidationListener>();
+    protected final Collection<ContentValidationListener> listeners = new ArrayList<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 7005)
@@ -376,6 +376,6 @@
 
             private DefListSelectionListener() {
-                this.mapRectangles = new HashMap<Integer, MapRectangle>();
-                this.mapPolygons = new HashMap<Integer, List<MapPolygon>>();
+                this.mapRectangles = new HashMap<>();
+                this.mapPolygons = new HashMap<>();
             }
 
@@ -408,5 +408,5 @@
                         if (defaultTable.getSelectionModel().isSelectedIndex(i)) {
                             if (!mapPolygons.containsKey(i)) {
-                                List<MapPolygon> list = new ArrayList<MapPolygon>();
+                                List<MapPolygon> list = new ArrayList<>();
                                 mapPolygons.put(i, list);
                                 // Add new map polygons
@@ -542,5 +542,5 @@
                 }
 
-                Set<String> acceptedEulas = new HashSet<String>();
+                Set<String> acceptedEulas = new HashSet<>();
 
                 outer:
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSLayerTree.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSLayerTree.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSLayerTree.java	(revision 7005)
@@ -27,5 +27,5 @@
     private final DefaultTreeModel treeData = new DefaultTreeModel(treeRootNode);
     private final JTree layerTree = new JTree(treeData);
-    private final List<WMSImagery.LayerDetails> selectedLayers = new LinkedList<WMSImagery.LayerDetails>();
+    private final List<WMSImagery.LayerDetails> selectedLayers = new LinkedList<>();
     private boolean previouslyShownUnsupportedCrsError = false;
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 7005)
@@ -41,5 +41,5 @@
     private JCheckBox enableIconDefault;
 
-    private static final List<SourceProvider> styleSourceProviders = new ArrayList<SourceProvider>();
+    private static final List<SourceProvider> styleSourceProviders = new ArrayList<>();
 
     /**
@@ -215,5 +215,5 @@
             boolean changed = false;
 
-            Collection<String> knownDefaults = new TreeSet<String>(Main.pref.getCollection("mappaint.style.known-defaults"));
+            Collection<String> knownDefaults = new TreeSet<>(Main.pref.getCollection("mappaint.style.known-defaults"));
 
             Collection<ExtendedSourceEntry> defaults = getDefault();
@@ -264,5 +264,5 @@
         @Override
         public Map<String, String> serialize(SourceEntry entry) {
-            Map<String, String> res = new HashMap<String, String>();
+            Map<String, String> res = new HashMap<>();
             res.put("url", entry.url);
             res.put("title", entry.title == null ? "" : entry.title);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 7005)
@@ -64,5 +64,5 @@
     }
 
-    private static final List<SourceProvider> presetSourceProviders = new ArrayList<SourceProvider>();
+    private static final List<SourceProvider> presetSourceProviders = new ArrayList<>();
     
     /**
@@ -88,5 +88,5 @@
         public boolean validatePreferences() {
             if (sources.hasActiveSourcesChanged()) {
-                List<Integer> sourcesToRemove = new ArrayList<Integer>();
+                List<Integer> sourcesToRemove = new ArrayList<>();
                 int i = -1;
                 SOURCES:
@@ -294,5 +294,5 @@
         } else {
             AutoCompletionManager.cachePresets(taggingPresets);
-            HashMap<TaggingPresetMenu,JMenu> submenus = new HashMap<TaggingPresetMenu,JMenu>();
+            HashMap<TaggingPresetMenu,JMenu> submenus = new HashMap<>();
             for (final TaggingPreset p : taggingPresets) {
                 JMenu m = p.group != null ? submenus.get(p.group) : Main.main.menu.presetsMenu;
@@ -344,5 +344,5 @@
         @Override
         public Map<String, String> serialize(SourceEntry entry) {
-            Map<String, String> res = new HashMap<String, String>();
+            Map<String, String> res = new HashMap<>();
             res.put("url", entry.url);
             res.put("title", entry.title == null ? "" : entry.title);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 7005)
@@ -151,5 +151,5 @@
             // If the plugin has been unselected, was it required by other plugins still selected ?
             else if (!cb.isSelected()) {
-                Set<String> otherPlugins = new HashSet<String>();
+                Set<String> otherPlugins = new HashSet<>();
                 for (PluginInformation pi : model.getAvailablePlugins()) {
                     if (!pi.equals(cb.pi) && pi.requires != null && model.isSelectedPlugin(pi.getName())) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java	(revision 7005)
@@ -280,5 +280,5 @@
         pnlPluginUpdatePolicy.rememberInPreferences();
         if (model.isActivePluginsChanged()) {
-            LinkedList<String> l = new LinkedList<String>(model.getSelectedPluginNames());
+            LinkedList<String> l = new LinkedList<>(model.getSelectedPluginNames());
             Collections.sort(l);
             Main.pref.putCollection("plugins", l);
@@ -494,9 +494,9 @@
             setLayout(new GridBagLayout());
             add(new JLabel(tr("Add JOSM Plugin description URL.")), GBC.eol());
-            model = new DefaultListModel<String>();
+            model = new DefaultListModel<>();
             for (String s : Main.pref.getPluginSites()) {
                 model.addElement(s);
             }
-            final JList<String> list = new JList<String>(model);
+            final JList<String> list = new JList<>(model);
             add(new JScrollPane(list), GBC.std().fill());
             JPanel buttons = new JPanel(new GridBagLayout());
@@ -565,5 +565,5 @@
         public List<String> getUpdateSites() {
             if (model.getSize() == 0) return Collections.emptyList();
-            List<String> ret = new ArrayList<String>(model.getSize());
+            List<String> ret = new ArrayList<>(model.getSize());
             for (int i=0; i< model.getSize();i++){
                 ret.add((String)model.get(i));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java	(revision 7005)
@@ -25,8 +25,8 @@
  */
 public class PluginPreferencesModel extends Observable {
-    private final List<PluginInformation> availablePlugins = new ArrayList<PluginInformation>();
-    private final List<PluginInformation> displayedPlugins = new ArrayList<PluginInformation>();
-    private final Map<PluginInformation, Boolean> selectedPluginsMap = new HashMap<PluginInformation, Boolean>();
-    private Set<String> pendingDownloads = new HashSet<String>();
+    private final List<PluginInformation> availablePlugins = new ArrayList<>();
+    private final List<PluginInformation> displayedPlugins = new ArrayList<>();
+    private final Map<PluginInformation, Boolean> selectedPluginsMap = new HashMap<>();
+    private Set<String> pendingDownloads = new HashSet<>();
     private String filterExpression;
     private Set<String> currentActivePlugins;
@@ -36,5 +36,5 @@
      */
     public PluginPreferencesModel() {
-        currentActivePlugins = new HashSet<String>();
+        currentActivePlugins = new HashSet<>();
         currentActivePlugins.addAll(Main.pref.getCollection("plugins", currentActivePlugins));
     }
@@ -77,5 +77,5 @@
         sort();
         filterDisplayedPlugins(filterExpression);
-        Set<String> activePlugins = new HashSet<String>();
+        Set<String> activePlugins = new HashSet<>();
         activePlugins.addAll(Main.pref.getCollection("plugins", activePlugins));
         for (PluginInformation pi: availablePlugins) {
@@ -119,5 +119,5 @@
      */
     public List<PluginInformation> getSelectedPlugins() {
-        List<PluginInformation> ret = new LinkedList<PluginInformation>();
+        List<PluginInformation> ret = new LinkedList<>();
         for (PluginInformation pi: availablePlugins) {
             if (selectedPluginsMap.get(pi) == null) {
@@ -137,5 +137,5 @@
      */
     public Set<String> getSelectedPluginNames() {
-        Set<String> ret = new HashSet<String>();
+        Set<String> ret = new HashSet<>();
         for (PluginInformation pi: getSelectedPlugins()) {
             ret.add(pi.name);
@@ -177,5 +177,5 @@
      */
     public List<PluginInformation> getPluginsScheduledForUpdateOrDownload() {
-        List<PluginInformation> ret = new ArrayList<PluginInformation>();
+        List<PluginInformation> ret = new ArrayList<>();
         for (String plugin: pendingDownloads) {
             PluginInformation pi = getPluginInformation(plugin);
@@ -274,5 +274,5 @@
      */
     public List<PluginInformation> getNewlyActivatedPlugins() {
-        List<PluginInformation> ret = new LinkedList<PluginInformation>();
+        List<PluginInformation> ret = new LinkedList<>();
         for (Entry<PluginInformation, Boolean> entry: selectedPluginsMap.entrySet()) {
             PluginInformation pi = entry.getKey();
@@ -292,5 +292,5 @@
      */
     public List<PluginInformation> getNewlyDeactivatedPlugins() {
-        List<PluginInformation> ret = new LinkedList<PluginInformation>();
+        List<PluginInformation> ret = new LinkedList<>();
         for (PluginInformation pi: availablePlugins) {
             if (!currentActivePlugins.contains(pi.name)) {
@@ -310,5 +310,5 @@
      */
     public List<PluginInformation> getAvailablePlugins() {
-        return new LinkedList<PluginInformation>(availablePlugins);
+        return new LinkedList<>(availablePlugins);
     }
 
@@ -320,5 +320,5 @@
      */
     public Set<String> getNewlyActivatedPluginNames() {
-        Set<String> ret = new HashSet<String>();
+        Set<String> ret = new HashSet<>();
         List<PluginInformation> plugins = getNewlyActivatedPlugins();
         for (PluginInformation pi: plugins) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java	(revision 7005)
@@ -68,5 +68,5 @@
 
         ButtonGroup bgVersionBasedUpdatePolicy = new ButtonGroup();
-        rbVersionBasedUpatePolicy = new HashMap<Policy, JRadioButton>();
+        rbVersionBasedUpatePolicy = new HashMap<>();
         JRadioButton btn = new JRadioButton(tr("Ask before updating"));
         rbVersionBasedUpatePolicy.put(Policy.ASK, btn);
@@ -109,5 +109,5 @@
 
         ButtonGroup bgTimeBasedUpdatePolicy = new ButtonGroup();
-        rbTimeBasedUpatePolicy = new HashMap<Policy, JRadioButton>();
+        rbTimeBasedUpatePolicy = new HashMap<>();
         JRadioButton btn = new JRadioButton(tr("Ask before updating"));
         btn.addChangeListener(changeListener);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java	(revision 7005)
@@ -56,7 +56,7 @@
         public CodeSelectionPanel(String initialCode, ActionListener listener) {
             this.listener = listener;
-            data = new ArrayList<String>(Projections.getAllProjectionCodes());
+            data = new ArrayList<>(Projections.getAllProjectionCodes());
             Collections.sort(data, new CodeComparator());
-            filteredData = new ArrayList<String>(data);
+            filteredData = new ArrayList<>(data);
             build();
             setCode(initialCode != null ? initialCode : DEFAULT_CODE);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java	(revision 7005)
@@ -71,5 +71,5 @@
                     "+proj=lonlat +ellps=WGS84 +datum=WGS84 +bounds=-180,-90,180,90",
                     "+proj=tmerc +lat_0=0 +lon_0=9 +k_0=1 +x_0=3500000 +y_0=0 +ellps=bessel +nadgrids=BETA2007.gsb");
-            List<String> inputHistory = new LinkedList<String>(Main.pref.getCollection("projection.custom.value.history", samples));
+            List<String> inputHistory = new LinkedList<>(Main.pref.getCollection("projection.custom.value.history", samples));
             Collections.reverse(inputHistory);
             cbInput.setPossibleItems(inputHistory);
@@ -194,5 +194,5 @@
 
         private String listKeys(Map<String, ?> map) {
-            List<String> keys = new ArrayList<String>(map.keySet());
+            List<String> keys = new ArrayList<>(map.keySet());
             Collections.sort(keys);
             return Utils.join(", ", keys);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java	(revision 7005)
@@ -67,6 +67,6 @@
     }
 
-    private static List<ProjectionChoice> projectionChoices = new ArrayList<ProjectionChoice>();
-    private static Map<String, ProjectionChoice> projectionChoicesById = new HashMap<String, ProjectionChoice>();
+    private static List<ProjectionChoice> projectionChoices = new ArrayList<>();
+    private static Map<String, ProjectionChoice> projectionChoicesById = new HashMap<>();
 
     // some ProjectionChoices that are referenced from other parts of the code
@@ -247,5 +247,5 @@
     private static final CollectionProperty PROP_SUB_PROJECTION = new CollectionProperty("projection.sub", null);
     public static final StringProperty PROP_SYSTEM_OF_MEASUREMENT = new StringProperty("system_of_measurement", "Metric");
-    private static final String[] unitsValues = (new ArrayList<String>(SystemOfMeasurement.ALL_SYSTEMS.keySet())).toArray(new String[0]);
+    private static final String[] unitsValues = (new ArrayList<>(SystemOfMeasurement.ALL_SYSTEMS.keySet())).toArray(new String[0]);
     private static final String[] unitsValuesTr = new String[unitsValues.length];
     static {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java	(revision 7005)
@@ -33,5 +33,5 @@
     private Hemisphere hemisphere;
 
-    private static final List<String> cbEntries = new ArrayList<String>();
+    private static final List<String> cbEntries = new ArrayList<>();
     static {
         for (int i = 1; i <= 60; i++) {
@@ -117,5 +117,5 @@
     @Override
     public String[] allCodes() {
-        List<String> projections = new ArrayList<String>(60*4);
+        List<String> projections = new ArrayList<>(60*4);
         for (int zone = 1;zone <= 60; zone++) {
             for (Hemisphere hemisphere : Hemisphere.values()) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreference.java	(revision 7005)
@@ -57,6 +57,5 @@
         }
     }
-    private final Map<PermissionPrefWithDefault, JCheckBox> prefs =
-            new LinkedHashMap<PermissionPrefWithDefault, JCheckBox>();
+    private final Map<PermissionPrefWithDefault, JCheckBox> prefs = new LinkedHashMap<>();
     private JCheckBox enableRemoteControl;
     private JCheckBox loadInNewLayer = new JCheckBox(tr("Download objects to new layer"));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreference.java	(revision 7005)
@@ -29,5 +29,5 @@
     }
 
-    private static Set<ProxyPreferenceListener> listeners = new HashSet<ProxyPreferenceListener>();
+    private static Set<ProxyPreferenceListener> listeners = new HashSet<>();
     
     private ProxyPreferencesPanel pnlProxyPreferences;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java	(revision 7005)
@@ -237,5 +237,5 @@
 
         ButtonGroup bgProxyPolicy = new ButtonGroup();
-        rbProxyPolicy = new HashMap<ProxyPolicy, JRadioButton>();
+        rbProxyPolicy = new HashMap<>();
         ProxyPolicyChangeListener policyChangeListener = new ProxyPolicyChangeListener();
         for (ProxyPolicy pp: ProxyPolicy.values()) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java	(revision 7005)
@@ -71,5 +71,5 @@
 
     private static Map<Integer, String> setKeyList() {
-        Map<Integer, String> list = new LinkedHashMap<Integer, String>();
+        Map<Integer, String> list = new LinkedHashMap<>();
         String unknown = Toolkit.getProperty("AWT.unknown", "Unknown");
         // Assume all known keys are declared in KeyEvent as "public static int VK_*"
@@ -367,5 +367,5 @@
                     expr = expr.replace("+", "\\+");
                     // split search string on whitespace, do case-insensitive AND search
-                    List<RowFilter<Object, Object>> andFilters = new ArrayList<RowFilter<Object, Object>>();
+                    List<RowFilter<Object, Object>> andFilters = new ArrayList<>();
                     for (String word : expr.split("\\s+")) {
                         andFilters.add(RowFilter.regexFilter("(?i)" + word));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreference.java	(revision 7005)
@@ -42,5 +42,5 @@
     }
 
-    private static final List<SourceProvider> ruleSourceProviders = new ArrayList<SourceProvider>();
+    private static final List<SourceProvider> ruleSourceProviders = new ArrayList<>();
 
     /**
@@ -135,5 +135,5 @@
         @Override
         public Collection<ExtendedSourceEntry> getDefault() {
-            List<ExtendedSourceEntry> def = new ArrayList<ExtendedSourceEntry>();
+            List<ExtendedSourceEntry> def = new ArrayList<>();
             
             addDefault(def, "addresses",    tr("Addresses"),           tr("Checks for errors on addresses"));
@@ -162,5 +162,5 @@
         @Override
         public Map<String, String> serialize(SourceEntry entry) {
-            Map<String, String> res = new HashMap<String, String>();
+            Map<String, String> res = new HashMap<>();
             res.put("url", entry.url);
             res.put("title", entry.title == null ? "" : entry.title);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreference.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreference.java	(revision 7005)
@@ -100,6 +100,6 @@
     @Override
     public boolean ok() {
-        Collection<String> tests = new LinkedList<String>();
-        Collection<String> testsBeforeUpload = new LinkedList<String>();
+        Collection<String> tests = new LinkedList<>();
+        Collection<String> testsBeforeUpload = new LinkedList<>();
 
         for (Test test : allTests) {
@@ -115,5 +115,5 @@
         // later in ValidatorTagCheckerRulesPreference.ok(),
         // after its list of rules has been saved to preferences
-        List<Test> testsToInitialize = new ArrayList<Test>(allTests);
+        List<Test> testsToInitialize = new ArrayList<>(allTests);
         testsToInitialize.remove(OsmValidator.getTest(MapCSSTagChecker.class));
         OsmValidator.initializeTests(testsToInitialize);
Index: trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java	(revision 7005)
@@ -39,5 +39,5 @@
     private boolean intermediateTask;
 
-    private Queue<Request> requests = new LinkedList<Request>();
+    private Queue<Request> requests = new LinkedList<>();
     private AbstractProgressMonitor currentChild;
     private Request requestedState = new Request();
Index: trunk/src/org/openstreetmap/josm/gui/progress/CancelHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/progress/CancelHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/progress/CancelHandler.java	(revision 7005)
@@ -10,5 +10,5 @@
 
     private boolean isCanceled;
-    private List<CancelListener> listeners = new ArrayList<CancelListener>();
+    private List<CancelListener> listeners = new ArrayList<>();
 
     public synchronized void cancel() {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java	(revision 7005)
@@ -36,5 +36,5 @@
 
     /** the list holding the tags */
-    protected final List<TagModel> tags =new ArrayList<TagModel>();
+    protected final List<TagModel> tags =new ArrayList<>();
 
     /** indicates whether the model is dirty */
@@ -312,5 +312,5 @@
         if (tags == null)
             return;
-        ArrayList<TagModel> toDelete = new ArrayList<TagModel>();
+        ArrayList<TagModel> toDelete = new ArrayList<>();
         for (int tagIdx : tagIndices) {
             TagModel tag = tags.get(tagIdx);
@@ -443,5 +443,5 @@
 
     public Map<String,String> getTags(boolean keepEmpty) {
-        Map<String,String> tags = new HashMap<String, String>();
+        Map<String,String> tags = new HashMap<>();
         applyToTags(tags, keepEmpty);
         return tags;
@@ -490,5 +490,5 @@
 
         List<String> currentkeys = getKeys();
-        ArrayList<Command> commands = new ArrayList<Command>();
+        ArrayList<Command> commands = new ArrayList<>();
 
         for (OsmPrimitive primitive : primitives) {
@@ -516,5 +516,5 @@
      */
     public List<String> getKeys() {
-        ArrayList<String> keys = new ArrayList<String>();
+        ArrayList<String> keys = new ArrayList<>();
         for (TagModel tag: tags) {
             if (!tag.getName().trim().isEmpty()) {
@@ -584,5 +584,5 @@
             return;
 
-        Map<String, TagModel> modelTags = new HashMap<String, TagModel>();
+        Map<String, TagModel> modelTags = new HashMap<>();
         for (int i=0; i<getRowCount(); i++) {
             TagModel tagModel = get(i);
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagModel.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagModel.java	(revision 7005)
@@ -17,5 +17,5 @@
      */
     public TagModel() {
-        values = new ArrayList<String>();
+        values = new ArrayList<>();
         setName("");
         setValue("");
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 7005)
@@ -65,5 +65,5 @@
      * cell editing this table.
      */
-    private final CopyOnWriteArrayList<Component> doNotStopCellEditingWhenFocused = new CopyOnWriteArrayList<Component>();
+    private final CopyOnWriteArrayList<Component> doNotStopCellEditingWhenFocused = new CopyOnWriteArrayList<>();
     private CellEditorRemover editorRemover;
 
@@ -346,5 +346,5 @@
                     TextTagParser.showBadBufferMessage(ht("/Action/PasteTags"));
                  } else if (TextTagParser.validateTags(tags)) {
-                     List<Tag> newTags = new ArrayList<Tag>();
+                     List<Tag> newTags = new ArrayList<>();
                      for (Map.Entry<String, String> entry: tags.entrySet()) {
                         String k = entry.getKey();
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 7005)
@@ -83,5 +83,5 @@
      */
     public EnumSet<TaggingPresetType> types;
-    public List<TaggingPresetItem> data = new LinkedList<TaggingPresetItem>();
+    public List<TaggingPresetItem> data = new LinkedList<>();
     public Roles roles;
     public TemplateEntry nameTemplate;
@@ -209,6 +209,6 @@
             return null;
         PresetPanel p = new PresetPanel();
-        LinkedList<TaggingPresetItem> l = new LinkedList<TaggingPresetItem>();
-        LinkedList<TaggingPresetItem> presetLink = new LinkedList<TaggingPresetItem>();
+        LinkedList<TaggingPresetItem> l = new LinkedList<>();
+        LinkedList<TaggingPresetItem> presetLink = new LinkedList<>();
         if(types != null){
             JPanel pp = new JPanel();
@@ -299,5 +299,5 @@
         } else if (answer == DIALOG_ANSWER_NEW_RELATION) {
             final Relation r = new Relation();
-            final Collection<RelationMember> members = new HashSet<RelationMember>();
+            final Collection<RelationMember> members = new HashSet<>();
             for(Tag t : getChangedTags()) {
                 r.put(t.getKey(), t.getValue());
@@ -387,5 +387,5 @@
     public Collection<OsmPrimitive> createSelection(Collection<OsmPrimitive> participants) {
         originalSelectionEmpty = participants.isEmpty();
-        Collection<OsmPrimitive> sel = new LinkedList<OsmPrimitive>();
+        Collection<OsmPrimitive> sel = new LinkedList<>();
         for (OsmPrimitive osm : participants)
         {
@@ -419,5 +419,5 @@
 
     public List<Tag> getChangedTags() {
-        List<Tag> result = new ArrayList<Tag>();
+        List<Tag> result = new ArrayList<>();
         for (TaggingPresetItem i: data) {
             i.addCommands(result);
@@ -427,5 +427,5 @@
 
     public static Command createCommand(Collection<OsmPrimitive> sel, List<Tag> changedTags) {
-        List<Command> cmds = new ArrayList<Command>();
+        List<Command> cmds = new ArrayList<>();
         for (Tag tag: changedTags) {
             cmds.add(new ChangePropertyCommand(sel, tag.getKey(), tag.getValue()));
@@ -511,5 +511,5 @@
             super("", ImageProvider.get("styles/standard/waypoint","pin"));
             putValue(SHORT_DESCRIPTION, tr("Add or remove toolbar button"));
-            LinkedList<String> t = new LinkedList<String>(ToolbarPreferences.getToolString());
+            LinkedList<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 7004)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 7005)
@@ -77,11 +77,10 @@
 
     // 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>> typeCache =
-            new LinkedHashMap<String, EnumSet<TaggingPresetType>>(16, 1.1f, true);
+    private static final Map<String,EnumSet<TaggingPresetType>> typeCache = new LinkedHashMap<>(16, 1.1f, true);
 
     /**
      * Last value of each key used in presets, used for prefilling corresponding fields
      */
-    private static final Map<String,String> lastValue = new HashMap<String,String>();
+    private static final Map<String,String> lastValue = new HashMap<>();
 
     public static class PresetListEntry {
@@ -428,5 +427,5 @@
     public static class Roles extends TaggingPresetItem {
 
-        public final List<Role> roles = new LinkedList<Role>();
+        public final List<Role> roles = new LinkedList<>();
 
         @Override
@@ -761,5 +760,5 @@
          * List of checkboxes
          */
-        public final List<Check> checks = new LinkedList<Check>();
+        public final List<Check> checks = new LinkedList<>();
 
         @Override
@@ -910,5 +909,5 @@
 
         protected JComponent component;
-        protected final Map<String, PresetListEntry> lhm = new LinkedHashMap<String, PresetListEntry>();
+        protected final Map<String, PresetListEntry> lhm = new LinkedHashMap<>();
         private boolean initialized = false;
         protected Usage usage;
@@ -1328,5 +1327,5 @@
             } else {
                 String s = o.toString();
-                TreeSet<String> parts = new TreeSet<String>(Arrays.asList(s.split(delimiter)));
+                TreeSet<String> parts = new TreeSet<>(Arrays.asList(s.split(delimiter)));
                 ListModel lm = getModel();
                 int[] intParts = new int[lm.getSize()];
@@ -1389,5 +1388,5 @@
         if (s == null)
             return new String[0];
-        List<String> result = new ArrayList<String>();
+        List<String> result = new ArrayList<>();
         boolean backslash = false;
         StringBuilder item = new StringBuilder();
@@ -1415,5 +1414,5 @@
     static Usage determineTextUsage(Collection<OsmPrimitive> sel, String key) {
         Usage returnValue = new Usage();
-        returnValue.values = new TreeSet<String>();
+        returnValue.values = new TreeSet<>();
         for (OsmPrimitive s : sel) {
             String v = s.get(key);
@@ -1432,5 +1431,5 @@
 
         Usage returnValue = new Usage();
-        returnValue.values = new TreeSet<String>();
+        returnValue.values = new TreeSet<>();
         for (OsmPrimitive s : sel) {
             String booleanValue = OsmUtils.getNamedOsmBoolean(s.get(key));
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java	(revision 7005)
@@ -81,5 +81,5 @@
         Component[] items = menu.getMenuComponents();
         PresetTextComparator comp = new PresetTextComparator();
-        List<JMenuItem> sortarray = new ArrayList<JMenuItem>();
+        List<JMenuItem> sortarray = new ArrayList<>();
         int lastSeparator = 0;
         for (int i = 0; i < items.length; i++) {
@@ -103,5 +103,5 @@
                         pos++;
                     }
-                    sortarray = new ArrayList<JMenuItem>();
+                    sortarray = new ArrayList<>();
                     lastSeparator = 0;
                 }
@@ -119,5 +119,5 @@
                     pos++;
                 }
-                sortarray = new ArrayList<JMenuItem>();
+                sortarray = new ArrayList<>();
                 lastSeparator = i;
             }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java	(revision 7005)
@@ -94,13 +94,13 @@
         parser.map("reference", Reference.class);
 
-        LinkedList<TaggingPreset> all = new LinkedList<TaggingPreset>();
+        LinkedList<TaggingPreset> all = new LinkedList<>();
         TaggingPresetMenu lastmenu = null;
         TaggingPresetItems.Roles lastrole = null;
-        final List<TaggingPresetItems.Check> checks = new LinkedList<TaggingPresetItems.Check>();
-        List<TaggingPresetItems.PresetListEntry> listEntries = new LinkedList<TaggingPresetItems.PresetListEntry>();
-        final Map<String, List<Object>> byId = new HashMap<String, List<Object>>();
-        final Stack<String> lastIds = new Stack<String>();
+        final List<TaggingPresetItems.Check> checks = new LinkedList<>();
+        List<TaggingPresetItems.PresetListEntry> listEntries = new LinkedList<>();
+        final Map<String, List<Object>> byId = new HashMap<>();
+        final Stack<String> lastIds = new Stack<>();
         /** lastIdIterators contains non empty iterators of items to be handled before obtaining the next item from the XML parser */
-        final Stack<Iterator<Object>> lastIdIterators = new Stack<Iterator<Object>>();
+        final Stack<Iterator<Object>> lastIdIterators = new Stack<>();
 
         if (validate) {
@@ -131,5 +131,5 @@
                     String lastId = ((Chunk) o).id;
                     lastIds.push(lastId);
-                    byId.put(lastId, new ArrayList<Object>());
+                    byId.put(lastId, new ArrayList<>());
                     continue;
                 }
@@ -209,5 +209,5 @@
                             }
                         }
-                        listEntries = new LinkedList<TaggingPresetItems.PresetListEntry>();
+                        listEntries = new LinkedList<>();
                         lastrole = null;
                     }
@@ -261,5 +261,5 @@
      */
     public static Collection<TaggingPreset> readAll(Collection<String> sources, boolean validate, boolean displayErrMsg) {
-        LinkedList<TaggingPreset> allPresets = new LinkedList<TaggingPreset>();
+        LinkedList<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 7004)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchPrimitiveDialog.java	(revision 7005)
@@ -62,5 +62,5 @@
             TaggingPreset preset = selector.getSelectedPreset();
             if (preset != null) {
-                final HashSet<OsmPrimitive> matching = new HashSet<OsmPrimitive>(Utils.filter(Main.main.getCurrentDataSet().allPrimitives(), preset));
+                final HashSet<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 7004)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java	(revision 7005)
@@ -74,5 +74,5 @@
     private final EnumSet<TaggingPresetType> typesInSelection = EnumSet.noneOf(TaggingPresetType.class);
     private boolean typesInSelectionDirty = true;
-    private final List<PresetClassification> classifications = new ArrayList<PresetClassification>();
+    private final List<PresetClassification> classifications = new ArrayList<>();
     private ResultListModel lsResultModel = new ResultListModel();
 
@@ -94,5 +94,5 @@
     private static class ResultListModel extends AbstractListModel<TaggingPreset> {
 
-        private List<PresetClassification> presets = new ArrayList<PresetClassification>();
+        private List<PresetClassification> presets = new ArrayList<>();
 
         public void setPresets(List<PresetClassification> presets) {
@@ -120,7 +120,7 @@
         public int classification;
         public int favoriteIndex;
-        private final Collection<String> groups = new HashSet<String>();
-        private final Collection<String> names = new HashSet<String>();
-        private final Collection<String> tags = new HashSet<String>();
+        private final Collection<String> groups = new HashSet<>();
+        private final Collection<String> names = new HashSet<>();
+        private final Collection<String> tags = new HashSet<>();
 
         PresetClassification(TaggingPreset preset) {
@@ -245,5 +245,5 @@
         add(edSearchText, BorderLayout.NORTH);
 
-        lsResult = new JList<TaggingPreset>();
+        lsResult = new JList<>();
         lsResult.setModel(lsResultModel);
         lsResult.setCellRenderer(new ResultListCellRenderer());
@@ -337,5 +337,5 @@
         boolean inTags = ckSearchInTags != null && ckSearchInTags.isSelected();
 
-        List<PresetClassification> result = new ArrayList<PresetClassification>();
+        List<PresetClassification> result = new ArrayList<>();
         PRESET_LOOP:
             for (PresetClassification presetClasification: classifications) {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java	(revision 7005)
@@ -43,7 +43,7 @@
      */
     public AutoCompletionList() {
-        list = new ArrayList<AutoCompletionListItem>();
-        filtered = new ArrayList<AutoCompletionListItem>();
-        valutToItemMap = new HashMap<String, AutoCompletionListItem>();
+        list = new ArrayList<>();
+        filtered = new ArrayList<>();
+        valutToItemMap = new HashMap<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java	(revision 7005)
@@ -66,5 +66,5 @@
      * can be accessed directly
      */
-    protected static final MultiMap<String, String> presetTagCache = new MultiMap<String, String>();
+    protected static final MultiMap<String, String> presetTagCache = new MultiMap<>();
     /**
      * the cached list of member roles
@@ -77,5 +77,5 @@
      * can be accessed directly
      */
-    protected static final Set<String> presetRoleCache = new HashSet<String>();
+    protected static final Set<String> presetRoleCache = new HashSet<>();
 
     public AutoCompletionManager(DataSet ds) {
@@ -105,6 +105,6 @@
      */
     protected void rebuild() {
-        tagCache = new MultiMap<String, String>();
-        roleCache = new HashSet<String>();
+        tagCache = new MultiMap<>();
+        roleCache = new HashSet<>();
         cachePrimitives(ds.allNonDeletedCompletePrimitives());
     }
@@ -178,9 +178,9 @@
      */
     protected List<String> getDataKeys() {
-        return new ArrayList<String>(getTagCache().keySet());
+        return new ArrayList<>(getTagCache().keySet());
     }
 
     protected List<String> getPresetKeys() {
-        return new ArrayList<String>(presetTagCache.keySet());
+        return new ArrayList<>(presetTagCache.keySet());
     }
 
@@ -193,9 +193,9 @@
      */
     protected List<String> getDataValues(String key) {
-        return new ArrayList<String>(getTagCache().getValues(key));
+        return new ArrayList<>(getTagCache().getValues(key));
     }
 
     protected static List<String> getPresetValues(String key) {
-        return new ArrayList<String>(presetTagCache.getValues(key));
+        return new ArrayList<>(presetTagCache.getValues(key));
     }
 
@@ -206,5 +206,5 @@
      */
     public List<String> getMemberRoles() {
-        return new ArrayList<String>(getRoleCache());
+        return new ArrayList<>(getRoleCache());
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/util/AdjustmentSynchronizer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/AdjustmentSynchronizer.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/util/AdjustmentSynchronizer.java	(revision 7005)
@@ -37,6 +37,6 @@
      */
     public AdjustmentSynchronizer() {
-        synchronizedAdjustables = new ArrayList<Adjustable>();
-        enabledMap = new HashMap<Adjustable, Boolean>();
+        synchronizedAdjustables = new ArrayList<>();
+        enabledMap = new HashMap<>();
         observable = new Observable();
     }
Index: trunk/src/org/openstreetmap/josm/gui/util/CellEditorSupport.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/CellEditorSupport.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/util/CellEditorSupport.java	(revision 7005)
@@ -25,10 +25,10 @@
     public CellEditorSupport(CellEditor editor) {
         this.editor = editor;
-        this.listeners = new LinkedList<CellEditorListener>();
+        this.listeners = new LinkedList<>();
     }
 
     protected List<CellEditorListener> getListeners() {
         synchronized (this) {
-            return new ArrayList<CellEditorListener>(listeners);
+            return new ArrayList<>(listeners);
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/util/HighlightHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/HighlightHelper.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/util/HighlightHelper.java	(revision 7005)
@@ -18,5 +18,5 @@
  */
 public class HighlightHelper {
-    Set<OsmPrimitive> highlightedPrimitives = new HashSet<OsmPrimitive>();
+    Set<OsmPrimitive> highlightedPrimitives = new HashSet<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java	(revision 7005)
@@ -14,5 +14,5 @@
     private int maxSize = 10;
 
-    private List<HistoryChangedListener> listeners = new ArrayList<HistoryChangedListener>();
+    private List<HistoryChangedListener> listeners = new ArrayList<>();
 
     public ComboBoxHistory(int size) {
@@ -89,5 +89,5 @@
 
     public List<String> asStringList() {
-        List<String> list = new ArrayList<String>(maxSize);
+        List<String> list = new ArrayList<>(maxSize);
         for (AutoCompletionListItem item : this) {
             list.add(item.getValue());
Index: trunk/src/org/openstreetmap/josm/gui/widgets/DateEditorWithSlider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/DateEditorWithSlider.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/DateEditorWithSlider.java	(revision 7005)
@@ -32,5 +32,5 @@
     private boolean watchSlider = true;
     
-    private List<ChangeListener> listeners = new ArrayList<ChangeListener>();
+    private List<ChangeListener> listeners = new ArrayList<>();
 
     public DateEditorWithSlider(String labelText) {
Index: trunk/src/org/openstreetmap/josm/gui/widgets/DisableShortcutsOnFocusGainedTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/DisableShortcutsOnFocusGainedTextField.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/DisableShortcutsOnFocusGainedTextField.java	(revision 7005)
@@ -102,6 +102,6 @@
     }
 
-    private final List<Pair<Action,Shortcut>> unregisteredActionShortcuts = new ArrayList<Pair<Action,Shortcut>>();
-    private final Set<JosmAction> disabledMenuActions = new HashSet<JosmAction>();
+    private final List<Pair<Action,Shortcut>> unregisteredActionShortcuts = new ArrayList<>();
+    private final Set<JosmAction> disabledMenuActions = new HashSet<>();
 
     protected final void init() {
@@ -163,5 +163,5 @@
                 if (action != null) {
                     Main.unregisterActionShortcut(action, shortcut);
-                    unregisteredActionShortcuts.add(new Pair<Action,Shortcut>(action,shortcut));
+                    unregisteredActionShortcuts.add(new Pair<>(action,shortcut));
                 }
             }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/EditableList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/EditableList.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/EditableList.java	(revision 7005)
@@ -27,5 +27,5 @@
 
     public final String title;
-    public final JList<String> sourcesList = new JList<String>(new DefaultListModel<String>());
+    public final JList<String> sourcesList = new JList<>(new DefaultListModel<String>());
     public final JButton addSrcButton = new JButton(tr("Add"));
     public final JButton editSrcButton = new JButton(tr("Edit"));
@@ -131,5 +131,5 @@
 
     public List<String> getItems() {
-        final List<String> items = new ArrayList<String>(sourcesList.getModel().getSize());
+        final List<String> items = new ArrayList<>(sourcesList.getModel().getSize());
         for (int i = 0; i < sourcesList.getModel().getSize(); ++i) {
             items.add(sourcesList.getModel().getElementAt(i));
Index: trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java	(revision 7005)
@@ -81,5 +81,5 @@
     public JosmComboBox(ComboBoxModel aModel) {
         super(aModel);
-        List<Object> list = new ArrayList<Object>(aModel.getSize());
+        List<Object> list = new ArrayList<>(aModel.getSize());
         for (int i = 0; i<aModel.getSize(); i++) {
             list.add(aModel.getElementAt(i));
Index: trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java	(revision 7005)
@@ -72,5 +72,5 @@
  */
 public class MultiSplitLayout implements LayoutManager {
-    private final Map<String, Component> childMap = new HashMap<String, Component>();
+    private final Map<String, Component> childMap = new HashMap<>();
     private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
     private Node model;
@@ -803,5 +803,5 @@
     private List<Divider> dividersThatOverlap(Node root, Rectangle r) {
         if (nodeOverlapsRectangle(root, r) && (root instanceof Split)) {
-            List<Divider> dividers = new ArrayList<Divider>();
+            List<Divider> dividers = new ArrayList<>();
             for(Node child : ((Split)root).getChildren()) {
                 if (child instanceof Divider) {
@@ -1001,5 +1001,5 @@
          */
         public List<Node> getChildren() {
-            return new ArrayList<Node>(children);
+            return new ArrayList<>(children);
         }
 
@@ -1021,5 +1021,5 @@
                 child.parent_set(null);
             }
-            this.children = new ArrayList<Node>(children);
+            this.children = new ArrayList<>(children);
             for(Node child : this.children) {
                 child.parent_set(this);
@@ -1183,5 +1183,5 @@
 
     private static void addSplitChild(Split parent, Node child) {
-        List<Node> children = new ArrayList<Node>(parent.getChildren());
+        List<Node> children = new ArrayList<>(parent.getChildren());
         if (children.isEmpty()) {
             children.add(child);
Index: trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java	(revision 7005)
@@ -43,5 +43,5 @@
      */
     public final List<PrimitiveId> getIds() {
-        return new ArrayList<PrimitiveId>(validator.ids);
+        return new ArrayList<>(validator.ids);
     }
 
@@ -61,5 +61,5 @@
     public static class OsmIdValidator extends AbstractTextComponentValidator {
 
-        private final List<PrimitiveId> ids = new ArrayList<PrimitiveId>();
+        private final List<PrimitiveId> ids = new ArrayList<>();
         private OsmPrimitiveType type;
 
Index: trunk/src/org/openstreetmap/josm/io/AbstractReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/AbstractReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/AbstractReader.java	(revision 7005)
@@ -41,15 +41,15 @@
      * to identify primitives unknown to the OSM server
      */
-    protected final Map<PrimitiveId, OsmPrimitive> externalIdMap = new HashMap<PrimitiveId, OsmPrimitive>();
+    protected final Map<PrimitiveId, OsmPrimitive> externalIdMap = new HashMap<>();
 
     /**
      * Data structure for the remaining way objects
      */
-    protected final Map<Long, Collection<Long>> ways = new HashMap<Long, Collection<Long>>();
+    protected final Map<Long, Collection<Long>> ways = new HashMap<>();
 
     /**
      * Data structure for relation objects
      */
-    protected final Map<Long, Collection<RelationMemberData>> relations = new HashMap<Long, Collection<RelationMemberData>>();
+    protected final Map<Long, Collection<RelationMemberData>> relations = new HashMap<>();
     
     /**
@@ -84,5 +84,5 @@
         for (Long externalWayId: ways.keySet()) {
             Way w = (Way)externalIdMap.get(new SimplePrimitiveId(externalWayId, OsmPrimitiveType.WAY));
-            List<Node> wayNodes = new ArrayList<Node>();
+            List<Node> wayNodes = new ArrayList<>();
             for (long id : ways.get(externalWayId)) {
                 Node n = (Node)externalIdMap.get(new SimplePrimitiveId(id, OsmPrimitiveType.NODE));
@@ -137,5 +137,5 @@
                     new SimplePrimitiveId(externalRelationId, OsmPrimitiveType.RELATION)
             );
-            List<RelationMember> relationMembers = new ArrayList<RelationMember>();
+            List<RelationMember> relationMembers = new ArrayList<>();
             for (RelationMemberData rm : relations.get(externalRelationId)) {
                 OsmPrimitive primitive = null;
Index: trunk/src/org/openstreetmap/josm/io/CacheFiles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CacheFiles.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/CacheFiles.java	(revision 7005)
@@ -245,5 +245,5 @@
         if(!this.enabled || maxsize == -1) return;
 
-        TreeMap<Long, File> modtime = new TreeMap<Long, File>();
+        TreeMap<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 7004)
+++ trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 7005)
@@ -95,5 +95,5 @@
         } else {
             if (! capabilities.containsKey(element))  {
-                HashMap<String,String> h = new HashMap<String, String>();
+                HashMap<String,String> h = new HashMap<>();
                 capabilities.put(element, h);
             }
@@ -104,6 +104,6 @@
 
     public final void clear() {
-        capabilities = new HashMap<String, HashMap<String,String>>();
-        imageryBlacklist = new ArrayList<String>();
+        capabilities = new HashMap<>();
+        imageryBlacklist = new ArrayList<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 7005)
@@ -401,5 +401,5 @@
             return value == null || value.isEmpty()
                     ? Collections.<Long>emptySet() :
-                    new HashSet<Long>(Utils.transform(Arrays.asList(value.split(",")), new Utils.Function<String, Long>() {
+                    new HashSet<>(Utils.transform(Arrays.asList(value.split(",")), new Utils.Function<String, Long>() {
                         @Override
                         public Long apply(String x) {
@@ -457,5 +457,5 @@
 
         protected Map<String,String> createMapFromQueryString(String query) {
-            Map<String,String> queryParams  = new HashMap<String, String>();
+            Map<String,String> queryParams  = new HashMap<>();
             String[] keyValuePairs = query.split("&");
             for (String keyValuePair: keyValuePairs) {
Index: trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java	(revision 7005)
@@ -64,6 +64,6 @@
     private ProxySelector delegate;
 
-    private final Set<String> errorResources = new HashSet<String>();
-    private final Set<String> errorMessages = new HashSet<String>();
+    private final Set<String> errorResources = new HashSet<>();
+    private final Set<String> errorMessages = new HashSet<>();
     private Set<String> proxyExceptions;
 
@@ -140,5 +140,5 @@
             }
         }
-        proxyExceptions = new HashSet<String>(
+        proxyExceptions = new HashSet<>(
             Main.pref.getCollection(ProxyPreferencesPanel.PROXY_EXCEPTIONS,
                     Arrays.asList(new String[]{"localhost", "127.0.0.1"}))
@@ -161,5 +161,5 @@
      */
     public final Set<String> getErrorResources() {
-        return new TreeSet<String>(errorResources);
+        return new TreeSet<>(errorResources);
     }
 
@@ -170,5 +170,5 @@
      */
     public final Set<String> getErrorMessages() {
-        return new TreeSet<String>(errorMessages);
+        return new TreeSet<>(errorMessages);
     }
 
Index: trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java	(revision 7005)
@@ -42,5 +42,5 @@
      * replied by the server
      */
-    private Map<PrimitiveId, DiffResultEntry> diffResults = new HashMap<PrimitiveId, DiffResultEntry>();
+    private Map<PrimitiveId, DiffResultEntry> diffResults = new HashMap<>();
     /**
      * the set of processed primitives *after* the new id, the new version and the new changeset id
@@ -64,5 +64,5 @@
         }
         this.primitives = primitives;
-        this.processed = new HashSet<IPrimitive>();
+        this.processed = new HashSet<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java	(revision 7005)
@@ -58,5 +58,5 @@
     public String write(boolean pretty) {
         StringWriter stringWriter = new StringWriter();
-        Map<String, Object> config = new HashMap<String, Object>(1);
+        Map<String, Object> config = new HashMap<>(1);
         config.put(JsonGenerator.PRETTY_PRINTING, pretty);
         JsonWriter writer = Json.createWriterFactory(config).createWriter(stringWriter);
Index: trunk/src/org/openstreetmap/josm/io/GpxExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxExporter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/GpxExporter.java	(revision 7005)
@@ -290,5 +290,5 @@
                         "GNU Lesser Public License (LGPL)",
                         "BSD License (MIT/X11)"};
-                JList<String> l = new JList<String>(licenses);
+                JList<String> l = new JList<>(licenses);
                 l.setVisibleRowCount(licenses.length);
                 l.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
Index: trunk/src/org/openstreetmap/josm/io/GpxReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 7005)
@@ -67,5 +67,5 @@
         private Extensions currentExtensions;
         private Stack<State> states;
-        private final Stack<String> elements = new Stack<String>();
+        private final Stack<String> elements = new Stack<>();
 
         private StringBuffer accumulator = new StringBuffer();
@@ -75,5 +75,5 @@
         @Override public void startDocument() {
             accumulator = new StringBuffer();
-            states = new Stack<State>();
+            states = new Stack<>();
             data = new GpxData();
         }
@@ -123,6 +123,6 @@
                     states.push(currentState);
                     currentState = State.trk;
-                    currentTrack = new ArrayList<Collection<WayPoint>>();
-                    currentTrackAttr = new HashMap<String, Object>();
+                    currentTrack = new ArrayList<>();
+                    currentTrackAttr = new HashMap<>();
                 } else if (localName.equals("extensions")) {
                     states.push(currentState);
@@ -164,5 +164,5 @@
                     states.push(currentState);
                     currentState = State.trkseg;
-                    currentTrackSeg = new ArrayList<WayPoint>();
+                    currentTrackSeg = new ArrayList<>();
                 } else if (localName.equals("link")) {
                     states.push(currentState);
@@ -415,5 +415,5 @@
 
         public void tryToFinish() throws SAXException {
-            List<String> remainingElements = new ArrayList<String>(elements);
+            List<String> remainingElements = new ArrayList<>(elements);
             for (int i=remainingElements.size() - 1; i >= 0; i--) {
                 endElement(null, remainingElements.get(i), remainingElements.get(i));
Index: trunk/src/org/openstreetmap/josm/io/JpgImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/JpgImporter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/JpgImporter.java	(revision 7005)
@@ -71,6 +71,6 @@
         progressMonitor.beginTask(tr("Looking for image files"), 1);
         try {
-            List<File> files = new ArrayList<File>();
-            Set<String> visitedDirs = new HashSet<String>();
+            List<File> files = new ArrayList<>();
+            Set<String> visitedDirs = new HashSet<>();
             addRecursiveFiles(files, visitedDirs, sel, progressMonitor.createSubTaskMonitor(1, true));
 
Index: trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 7005)
@@ -236,5 +236,5 @@
             if (!url.getProtocol().equals("file")) {
                 String prefKey = getPrefKey(url, destDir);
-                List<String> localPath = new ArrayList<String>(Main.pref.getCollection(prefKey));
+                List<String> localPath = new ArrayList<>(Main.pref.getCollection(prefKey));
                 if (localPath.size() == 2) {
                     File lfile = new File(localPath.get(1));
@@ -269,5 +269,5 @@
         long age = 0L;
         File localFile = null;
-        List<String> localPathEntry = new ArrayList<String>(Main.pref.getCollection(prefKey));
+        List<String> localPathEntry = new ArrayList<>(Main.pref.getCollection(prefKey));
         if (localPathEntry.size() == 2) {
             localFile = new File(localPathEntry.get(1));
Index: trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 7005)
@@ -75,9 +75,9 @@
      */
     public MultiFetchServerObjectReader() {
-        nodes = new LinkedHashSet<Long>();
-        ways = new LinkedHashSet<Long>();
-        relations = new LinkedHashSet<Long>();
+        nodes = new LinkedHashSet<>();
+        ways = new LinkedHashSet<>();
+        relations = new LinkedHashSet<>();
         this.outputDataSet = new DataSet();
-        this.missingPrimitives = new LinkedHashSet<PrimitiveId>();
+        this.missingPrimitives = new LinkedHashSet<>();
     }
 
@@ -238,5 +238,5 @@
      */
     protected Set<Long> extractIdPackage(Set<Long> ids) {
-        HashSet<Long> pkg = new HashSet<Long>();
+        HashSet<Long> pkg = new HashSet<>();
         if (ids.isEmpty())
             return pkg;
@@ -333,5 +333,5 @@
         progressMonitor.setTicks(0);
         // The complete set containg all primitives to fetch
-        Set<Long> toFetch = new HashSet<Long>(ids);
+        Set<Long> toFetch = new HashSet<>(ids);
         // Build a list of fetchers that will  download smaller sets containing only MAX_IDS_PER_REQUEST (200) primitives each.
         // we will run up to MAX_DOWNLOAD_THREADS concurrent fetchers.
@@ -339,6 +339,6 @@
         threadsNumber = Math.min(Math.max(threadsNumber, 1), OsmApi.MAX_DOWNLOAD_THREADS);
         Executor exec = Executors.newFixedThreadPool(threadsNumber);
-        CompletionService<FetchResult> ecs = new ExecutorCompletionService<FetchResult>(exec);
-        List<Future<FetchResult>> jobs = new ArrayList<Future<FetchResult>>();
+        CompletionService<FetchResult> ecs = new ExecutorCompletionService<>(exec);
+        List<Future<FetchResult>> jobs = new ArrayList<>();
         while (!toFetch.isEmpty()) {
             jobs.add(ecs.submit(new Fetcher(type, extractIdPackage(toFetch), progressMonitor)));
@@ -388,5 +388,5 @@
         progressMonitor.beginTask(trn("Downloading {0} object from ''{1}''", "Downloading {0} objects from ''{1}''", n, n, OsmApi.getOsmApi().getBaseUrl()));
         try {
-            missingPrimitives = new HashSet<PrimitiveId>();
+            missingPrimitives = new HashSet<>();
             if (isCanceled()) return null;
             fetchPrimitives(ways,OsmPrimitiveType.WAY, progressMonitor);
Index: trunk/src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 7005)
@@ -172,5 +172,5 @@
         // create the data tree
         data = new GpxData();
-        Collection<Collection<WayPoint>> currentTrack = new ArrayList<Collection<WayPoint>>();
+        Collection<Collection<WayPoint>> currentTrack = new ArrayList<>();
 
         BufferedReader rd = null;
@@ -214,5 +214,5 @@
     }
     private static class NMEAParserState {
-        protected Collection<WayPoint> waypoints = new ArrayList<WayPoint>();
+        protected Collection<WayPoint> waypoints = new ArrayList<>();
         protected String p_Time;
         protected String p_Date;
Index: trunk/src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 7005)
@@ -76,5 +76,5 @@
 
     // The collection of instantiated OSM APIs
-    private static Map<String, OsmApi> instances = new HashMap<String, OsmApi>();
+    private static Map<String, OsmApi> instances = new HashMap<>();
 
     private URL url = null;
Index: trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 7005)
@@ -44,5 +44,5 @@
 
     private OsmChangesetParser() {
-        changesets = new LinkedList<Changeset>();
+        changesets = new LinkedList<>();
     }
 
Index: trunk/src/org/openstreetmap/josm/io/OsmExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmExporter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmExporter.java	(revision 7005)
@@ -6,5 +6,4 @@
 import java.io.File;
 import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
Index: trunk/src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 7005)
@@ -60,5 +60,5 @@
     public static void registerPostprocessor(OsmServerReadPostprocessor pp) {
         if (postprocessors == null) {
-            postprocessors = new ArrayList<OsmServerReadPostprocessor>();
+            postprocessors = new ArrayList<>();
         }
         postprocessors.add(pp);
@@ -223,5 +223,5 @@
         externalIdMap.put(wd.getPrimitiveId(), w);
 
-        Collection<Long> nodeIds = new ArrayList<Long>();
+        Collection<Long> nodeIds = new ArrayList<>();
         while (true) {
             int event = parser.next();
@@ -240,5 +240,5 @@
         if (w.isDeleted() && !nodeIds.isEmpty()) {
             Main.info(tr("Deleted way {0} contains nodes", w.getUniqueId()));
-            nodeIds = new ArrayList<Long>();
+            nodeIds = new ArrayList<>();
         }
         ways.put(wd.getUniqueId(), nodeIds);
@@ -270,5 +270,5 @@
         externalIdMap.put(rd.getPrimitiveId(), r);
 
-        Collection<RelationMemberData> members = new ArrayList<RelationMemberData>();
+        Collection<RelationMemberData> members = new ArrayList<>();
         while (true) {
             int event = parser.next();
@@ -287,5 +287,5 @@
         if (r.isDeleted() && !members.isEmpty()) {
             Main.info(tr("Deleted relation {0} contains members", r.getUniqueId()));
-            members = new ArrayList<RelationMemberData>();
+            members = new ArrayList<>();
         }
         relations.put(rd.getUniqueId(), members);
Index: trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 7005)
@@ -213,5 +213,5 @@
         progressMonitor.beginTask(null, 2);
         try {
-            Collection<Way> waysToCheck = new ArrayList<Way>(ds.getWays());
+            Collection<Way> waysToCheck = new ArrayList<>(ds.getWays());
             if (isReadFull() ||primitiveType.equals(OsmPrimitiveType.NODE)) {
                 for (Way way: waysToCheck) {
@@ -225,5 +225,5 @@
             }
             if (isReadFull()) {
-                Collection<Relation> relationsToCheck  = new ArrayList<Relation>(ds.getRelations());
+                Collection<Relation> relationsToCheck  = new ArrayList<>(ds.getRelations());
                 for (Relation relation: relationsToCheck) {
                     if (!relation.isNew() && relation.hasIncompleteMembers()) {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java	(revision 7005)
@@ -128,5 +128,5 @@
             monitor.beginTask(trn("Downloading {0} changeset ...", "Downloading {0} changesets ...",ids.size(),ids.size()));
             monitor.setTicksCount(ids.size());
-            List<Changeset> ret = new ArrayList<Changeset>();
+            List<Changeset> ret = new ArrayList<>();
             int i=0;
             for (int id : ids) {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java	(revision 7005)
@@ -106,5 +106,5 @@
             NodeList xmlNodeList = (NodeList)xpath.compile("/osm/user[1]/languages[1]/lang/text()").evaluate(document, XPathConstants.NODESET);
             if (xmlNodeList != null) {
-                List<String> languages = new LinkedList<String>();
+                List<String> languages = new LinkedList<>();
                 for (int i=0; i < xmlNodeList.getLength(); i++) {
                     languages.add(xmlNodeList.item(i).getNodeValue());
Index: trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 7005)
@@ -40,5 +40,5 @@
     public static void registerPostprocessor(OsmServerWritePostprocessor pp) {
         if (postprocessors == null) {
-            postprocessors = new ArrayList<OsmServerWritePostprocessor>();
+            postprocessors = new ArrayList<>();
         }
         postprocessors.add(pp);
@@ -152,5 +152,5 @@
         try {
             progressMonitor.beginTask(tr("Starting to upload in chunks..."));
-            List<IPrimitive> chunk = new ArrayList<IPrimitive>(chunkSize);
+            List<IPrimitive> chunk = new ArrayList<>(chunkSize);
             Iterator<? extends IPrimitive> it = primitives.iterator();
             int numChunks = (int)Math.ceil((double)primitives.size() / (double)chunkSize);
@@ -192,5 +192,5 @@
     public void uploadOsm(UploadStrategySpecification strategy, Collection<? extends IPrimitive> primitives, Changeset changeset, ProgressMonitor monitor) throws OsmTransferException {
         CheckParameterUtil.ensureParameterNotNull(changeset, "changeset");
-        processed = new LinkedList<IPrimitive>();
+        processed = new LinkedList<>();
         monitor = monitor == null ? NullProgressMonitor.INSTANCE : monitor;
         monitor.beginTask(tr("Uploading data ..."));
Index: trunk/src/org/openstreetmap/josm/io/OsmWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmWriter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/OsmWriter.java	(revision 7005)
@@ -94,5 +94,5 @@
 
     protected <T extends OsmPrimitive> Collection<T> sortById(Collection<T> primitives) {
-        List<T> result = new ArrayList<T>(primitives.size());
+        List<T> result = new ArrayList<>(primitives.size());
         result.addAll(primitives);
         Collections.sort(result, byIdComparator);
@@ -255,5 +255,5 @@
                 out.println(">");
             }
-            List<Entry<String, String>> entries = new ArrayList<Entry<String,String>>(osm.getKeys().entrySet());
+            List<Entry<String, String>> entries = new ArrayList<>(osm.getKeys().entrySet());
             Collections.sort(entries, byKeyComparator);
             for (Entry<String, String> e : entries) {
Index: trunk/src/org/openstreetmap/josm/io/XmlWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/XmlWriter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/XmlWriter.java	(revision 7005)
@@ -66,5 +66,5 @@
      * The output writer to save the values to.
      */
-    private static final Map<Character, String> encoding = new HashMap<Character, String>();
+    private static final Map<Character, String> encoding = new HashMap<>();
     static {
         encoding.put('<', "&lt;");
Index: trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java	(revision 7005)
@@ -12,5 +12,5 @@
 public abstract class AbstractCredentialsAgent implements CredentialsAgent {
 
-    protected Map<RequestorType, PasswordAuthentication> memoryCredentialsCache = new HashMap<RequestorType, PasswordAuthentication>();
+    protected Map<RequestorType, PasswordAuthentication> memoryCredentialsCache = new HashMap<>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java	(revision 7005)
@@ -33,5 +33,5 @@
     }
 
-    private final Map<RequestorType, Boolean> credentialsTried = new HashMap<RequestorType, Boolean>();
+    private final Map<RequestorType, Boolean> credentialsTried = new HashMap<>();
     private boolean enabled = true;
 
Index: trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java	(revision 7005)
@@ -33,5 +33,5 @@
         Main.info("Grabbing HTML " + (attempt > 1? "(attempt " + attempt + ") ":"") + url);
 
-        List<String> cmdParams = new ArrayList<String>();
+        List<String> cmdParams = new ArrayList<>();
         StringTokenizer st = new StringTokenizer(MessageFormat.format(PROP_BROWSER.get(), urlstring));
         while (st.hasMoreTokens()) {
Index: trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 7005)
@@ -2,5 +2,4 @@
 package org.openstreetmap.josm.io.imagery;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
 import static org.openstreetmap.josm.tools.Utils.equal;
 
@@ -85,7 +84,7 @@
             accumulator = new StringBuffer();
             skipEntry = false;
-            states = new Stack<State>();
+            states = new Stack<>();
             states.push(State.INIT);
-            entries = new ArrayList<ImageryInfo>();
+            entries = new ArrayList<>();
             entry = null;
             bounds = null;
@@ -141,5 +140,5 @@
                     newState = State.BOUNDS;
                 } else if (qName.equals("projections")) {
-                    projections = new ArrayList<String>();
+                    projections = new ArrayList<>();
                     newState = State.PROJECTIONS;
                 }
Index: trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java	(revision 7005)
@@ -41,5 +41,5 @@
     protected String baseURL;
     private ImageryInfo info;
-    private Map<String, String> props = new HashMap<String, String>();
+    private Map<String, String> props = new HashMap<>();
 
     public WMSGrabber(MapView mv, WMSLayer layer, boolean localOnly) {
Index: trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 7005)
@@ -175,5 +175,5 @@
             child = getChild(child, "GetMap");
 
-            formats = new ArrayList<String>(Utils.filter(Utils.transform(getChildren(child, "Format"),
+            formats = new ArrayList<>(Utils.filter(Utils.transform(getChildren(child, "Format"),
                     new Utils.Function<Element, String>() {
                         @Override
@@ -226,5 +226,5 @@
         ImageryInfo i = new ImageryInfo(name, buildGetMapUrl(selectedLayers));
         if (selectedLayers != null) {
-            HashSet<String> proj = new HashSet<String>();
+            HashSet<String> proj = new HashSet<>();
             for (WMSImagery.LayerDetails l : selectedLayers) {
                 proj.addAll(l.getProjections());
@@ -236,5 +236,5 @@
 
     private List<LayerDetails> parseLayers(List<Element> children, Set<String> parentCrs) {
-        List<LayerDetails> details = new ArrayList<LayerDetails>(children.size());
+        List<LayerDetails> details = new ArrayList<>(children.size());
         for (Element element : children) {
             details.add(parseLayer(element, parentCrs));
@@ -248,5 +248,5 @@
 
         // The set of supported CRS/SRS for this layer
-        Set<String> crsList = new HashSet<String>();
+        Set<String> crsList = new HashSet<>();
         // ...including this layer's already-parsed parent projections
         crsList.addAll(parentCrs);
@@ -332,5 +332,5 @@
 
     private static List<Element> getChildren(Element parent, String name) {
-        List<Element> retVal = new ArrayList<Element>();
+        List<Element> retVal = new ArrayList<>();
         for (Node child = parent.getFirstChild(); child != null; child = child.getNextSibling()) {
             if (child instanceof Element && name.equals(child.getNodeName())) {
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 7005)
@@ -59,5 +59,5 @@
 
     String sender;
-    static Set<String> trustedSenders = new HashSet<String>();
+    static Set<String> trustedSenders = new HashSet<>();
 
     /**
@@ -81,5 +81,5 @@
         Map<String, Integer> valueCount;
         public ExistingValues(String tag) {
-            this.tag=tag; valueCount=new HashMap<String, Integer>();
+            this.tag=tag; valueCount=new HashMap<>();
         }
 
@@ -303,5 +303,5 @@
                         throw new RuntimeException(e);
                     }
-                    Set<String> tagSet = new HashSet<String>();
+                    Set<String> tagSet = new HashSet<>();
                     for (String tag : tags) {
                         if (!tag.trim().isEmpty() && tag.contains("=")) {
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 7005)
@@ -61,5 +61,5 @@
      * can extend this list by using @see addRequestHandler
      */
-    private static Map<String, Class<? extends RequestHandler>> handlers = new TreeMap<String, Class<? extends RequestHandler>>();
+    private static Map<String, Class<? extends RequestHandler>> handlers = new TreeMap<>();
 
     /**
@@ -174,5 +174,5 @@
             String command = questionPos < 0 ? url : url.substring(0, questionPos);
 
-            Map <String,String> headers = new HashMap<String, String>();
+            Map <String,String> headers = new HashMap<>();
             int k=0, MAX_HEADERS=20;
             while (k<MAX_HEADERS) {
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java	(revision 7005)
@@ -35,5 +35,5 @@
     public static final String command = "add_way";
 
-    private final List<LatLon> allCoordinates = new ArrayList<LatLon>();
+    private final List<LatLon> allCoordinates = new ArrayList<>();
 
     /**
@@ -151,7 +151,7 @@
      */
     private void addWay() {
-        addedNodes = new HashMap<LatLon, Node>();
+        addedNodes = new HashMap<>();
         Way way = new Way();
-        List<Command> commands = new LinkedList<Command>();
+        List<Command> commands = new LinkedList<>();
         for (LatLon ll : allCoordinates) {
             Node node = findOrCreateNode(ll, commands);
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 7005)
@@ -86,5 +86,5 @@
     @Override
     protected void parseArgs() {
-        HashMap<String, String> args = new HashMap<String, String>();
+        HashMap<String, String> args = new HashMap<>();
         if (request.indexOf('?') != -1) {
             String query = request.substring(request.indexOf('?') + 1);
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java	(revision 7005)
@@ -85,5 +85,5 @@
     @Override
     protected void parseArgs() {
-        HashMap<String, String> args = new HashMap<String, String>();
+        HashMap<String, String> args = new HashMap<>();
         if (request.indexOf('?') != -1) {
             String query = request.substring(request.indexOf('?') + 1);
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 7005)
@@ -51,5 +51,5 @@
 
     // Optional argument 'select'
-    private final Set<SimplePrimitiveId> toSelect = new HashSet<SimplePrimitiveId>();
+    private final Set<SimplePrimitiveId> toSelect = new HashSet<>();
 
     @Override
@@ -161,5 +161,5 @@
                 @Override
                 public void run() {
-                    Set<OsmPrimitive> newSel = new HashSet<OsmPrimitive>();
+                    Set<OsmPrimitive> newSel = new HashSet<>();
                     DataSet ds = Main.main.getCurrentDataSet();
                     if(ds == null) // e.g. download failed
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java	(revision 7005)
@@ -27,5 +27,5 @@
     public static final String command = "load_object";
 
-    private final List<PrimitiveId> ps = new LinkedList<PrimitiveId>();
+    private final List<PrimitiveId> ps = new LinkedList<>();
 
     @Override
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 7005)
@@ -194,5 +194,5 @@
         try {
             String req = URLDecoder.decode(this.request, "UTF-8");
-            HashMap<String, String> args = new HashMap<String, String>();
+            HashMap<String, String> args = new HashMap<>();
             if (req.indexOf('?') != -1) {
                 String query = req.substring(req.indexOf('?') + 1);
@@ -217,5 +217,5 @@
         String[] mandatory = getMandatoryParams();
         String[] optional = getOptionalParams();
-        List<String> missingKeys = new LinkedList<String>();
+        List<String> missingKeys = new LinkedList<>();
         boolean error = false;
         if(mandatory != null) for (String key : mandatory) {
@@ -227,5 +227,5 @@
             }
         }
-        HashSet<String> knownParams = new HashSet<String>();
+        HashSet<String> knownParams = new HashSet<>();
         if (mandatory != null) Collections.addAll(knownParams, mandatory);
         if (optional != null) Collections.addAll(knownParams, optional);
Index: trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java	(revision 7005)
@@ -30,5 +30,5 @@
         }
 
-        List<ImageEntry> entries = new ArrayList<ImageEntry>();
+        List<ImageEntry> entries = new ArrayList<>();
         NodeList imgNodes = elem.getChildNodes();
         boolean useThumbs = false;
Index: trunk/src/org/openstreetmap/josm/io/session/ImagerySessionImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/ImagerySessionImporter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/session/ImagerySessionImporter.java	(revision 7005)
@@ -31,5 +31,5 @@
             throw new IllegalDataException(tr("Version ''{0}'' of meta data for imagery layer is not supported. Expected: 0.1", version));
         }
-        Map<String, String> attributes = new HashMap<String, String>();
+        Map<String, String> attributes = new HashMap<>();
 
         NodeList nodes = elem.getChildNodes();
Index: trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 7005)
@@ -57,5 +57,5 @@
 public class SessionReader {
 
-    private static Map<String, Class<? extends SessionLayerImporter>> sessionLayerImporters = new HashMap<String, Class<? extends SessionLayerImporter>>();
+    private static Map<String, Class<? extends SessionLayerImporter>> sessionLayerImporters = new HashMap<>();
     static {
         registerSessionLayerImporter("osm-data", OsmDataSessionImporter.class);
@@ -86,7 +86,7 @@
     private boolean zip; // true, if session file is a .joz file; false if it is a .jos file
     private ZipFile zipFile;
-    private List<Layer> layers = new ArrayList<Layer>();
+    private List<Layer> layers = new ArrayList<>();
     private int active = -1;
-    private List<Runnable> postLoadTasks = new ArrayList<Runnable>();
+    private List<Runnable> postLoadTasks = new ArrayList<>();
     private ViewportData viewport;
 
@@ -346,6 +346,6 @@
         }
 
-        MultiMap<Integer, Integer> deps = new MultiMap<Integer, Integer>();
-        Map<Integer, Element> elems = new HashMap<Integer, Element>();
+        MultiMap<Integer, Integer> deps = new MultiMap<>();
+        Map<Integer, Element> elems = new HashMap<>();
 
         NodeList nodes = layersEl.getChildNodes();
@@ -394,7 +394,7 @@
 
         List<Integer> sorted = Utils.topologicalSort(deps);
-        final Map<Integer, Layer> layersMap = new TreeMap<Integer, Layer>(Collections.reverseOrder());
-        final Map<Integer, SessionLayerImporter> importers = new HashMap<Integer, SessionLayerImporter>();
-        final Map<Integer, String> names = new HashMap<Integer, String>();
+        final Map<Integer, Layer> layersMap = new TreeMap<>(Collections.reverseOrder());
+        final Map<Integer, SessionLayerImporter> importers = new HashMap<>();
+        final Map<Integer, String> names = new HashMap<>();
 
         progressMonitor.setTicksCount(sorted.size());
@@ -430,5 +430,5 @@
             } else {
                 importers.put(idx, imp);
-                List<LayerDependency> depsImp = new ArrayList<LayerDependency>();
+                List<LayerDependency> depsImp = new ArrayList<>();
                 for (int d : deps.get(idx)) {
                     SessionLayerImporter dImp = importers.get(d);
@@ -481,5 +481,5 @@
         }
 
-        layers = new ArrayList<Layer>();
+        layers = new ArrayList<>();
         for (int idx : layersMap.keySet()) {
             Layer layer = layersMap.get(idx);
Index: trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 7005)
@@ -48,6 +48,5 @@
 public class SessionWriter {
 
-    private static Map<Class<? extends Layer>, Class<? extends SessionLayerExporter>> sessionLayerExporters =
-            new HashMap<Class<? extends Layer>, Class<? extends SessionLayerExporter>>();
+    private static Map<Class<? extends Layer>, Class<? extends SessionLayerExporter>> sessionLayerExporters = new HashMap<>();
     static {
         registerSessionLayerExporter(OsmDataLayer.class , OsmDataSessionExporter.class);
@@ -210,5 +209,5 @@
             Set<Layer> deps = dependencies.get(layer);
             if (!deps.isEmpty()) {
-                List<Integer> depsInt = new ArrayList<Integer>();
+                List<Integer> depsInt = new ArrayList<>();
                 for (Layer depLayer : deps) {
                     int depIndex = layers.indexOf(depLayer);
Index: trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java	(revision 7005)
@@ -27,5 +27,4 @@
 import org.xml.sax.SAXException;
 
-
 /**
  * Asynchronous task for downloading a collection of plugins.
@@ -43,7 +42,7 @@
     public static final String PLUGIN_MIME_TYPES = "application/java-archive, application/zip; q=0.9, application/octet-stream; q=0.5";
     
-    private final Collection<PluginInformation> toUpdate = new LinkedList<PluginInformation>();
-    private final Collection<PluginInformation> failed = new LinkedList<PluginInformation>();
-    private final Collection<PluginInformation> downloaded = new LinkedList<PluginInformation>();
+    private final Collection<PluginInformation> toUpdate = new LinkedList<>();
+    private final Collection<PluginInformation> failed = new LinkedList<>();
+    private final Collection<PluginInformation> downloaded = new LinkedList<>();
     private Exception lastException;
     private boolean canceled;
Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 7005)
@@ -195,10 +195,10 @@
      * All installed and loaded plugins (resp. their main classes)
      */
-    public static final Collection<PluginProxy> pluginList = new LinkedList<PluginProxy>();
+    public static final Collection<PluginProxy> pluginList = new LinkedList<>();
 
     /**
      * Add here all ClassLoader whose resource should be searched.
      */
-    private static final List<ClassLoader> sources = new LinkedList<ClassLoader>();
+    private static final List<ClassLoader> sources = new LinkedList<>();
 
     static {
@@ -227,5 +227,5 @@
      */
     private static void filterDeprecatedPlugins(Component parent, Collection<String> plugins) {
-        Set<DeprecatedPlugin> removedPlugins = new TreeSet<DeprecatedPlugin>();
+        Set<DeprecatedPlugin> removedPlugins = new TreeSet<>();
         for (DeprecatedPlugin depr : DEPRECATED_PLUGINS) {
             if (plugins.contains(depr.name)) {
@@ -461,5 +461,5 @@
 
         // Add all plugins already loaded (to include early plugins when checking late ones)
-        Collection<PluginInformation> allPlugins = new HashSet<PluginInformation>(plugins);
+        Collection<PluginInformation> allPlugins = new HashSet<>(plugins);
         for (PluginProxy proxy : pluginList) {
             allPlugins.add(proxy.getPluginInformation());
@@ -487,9 +487,9 @@
         //
         if (requires != null) {
-            Set<String> pluginNames = new HashSet<String>();
+            Set<String> pluginNames = new HashSet<>();
             for (PluginInformation pi: plugins) {
                 pluginNames.add(pi.name);
             }
-            Set<String> missingPlugins = new HashSet<String>();
+            Set<String> missingPlugins = new HashSet<>();
             List<String> requiredPlugins = local ? plugin.getLocalRequiredPlugins() : plugin.getRequiredPlugins();
             for (String requiredPlugin : requiredPlugins) {
@@ -515,9 +515,9 @@
     public static ClassLoader createClassLoader(Collection<PluginInformation> plugins) {
         // iterate all plugins and collect all libraries of all plugins:
-        List<URL> allPluginLibraries = new LinkedList<URL>();
+        List<URL> allPluginLibraries = new LinkedList<>();
         File pluginDir = Main.pref.getPluginsDirectory();
 
         // Add all plugins already loaded (to include early plugins in the classloader, allowing late plugins to rely on early ones)
-        Collection<PluginInformation> allPlugins = new HashSet<PluginInformation>(plugins);
+        Collection<PluginInformation> allPlugins = new HashSet<>(plugins);
         for (PluginProxy proxy : pluginList) {
             allPlugins.add(proxy.getPluginInformation());
@@ -592,5 +592,5 @@
             monitor.beginTask(tr("Loading plugins ..."));
             monitor.subTask(tr("Checking plugin preconditions..."));
-            List<PluginInformation> toLoad = new LinkedList<PluginInformation>();
+            List<PluginInformation> toLoad = new LinkedList<>();
             for (PluginInformation pi: plugins) {
                 if (checkLoadPreconditions(parent, plugins, pi)) {
@@ -636,5 +636,5 @@
      */
     public static void loadEarlyPlugins(Component parent, Collection<PluginInformation> plugins, ProgressMonitor monitor) {
-        List<PluginInformation> earlyPlugins = new ArrayList<PluginInformation>(plugins.size());
+        List<PluginInformation> earlyPlugins = new ArrayList<>(plugins.size());
         for (PluginInformation pi: plugins) {
             if (pi.early) {
@@ -654,5 +654,5 @@
      */
     public static void loadLatePlugins(Component parent, Collection<PluginInformation> plugins, ProgressMonitor monitor) {
-        List<PluginInformation> latePlugins = new ArrayList<PluginInformation>(plugins.size());
+        List<PluginInformation> latePlugins = new ArrayList<>(plugins.size());
         for (PluginInformation pi: plugins) {
             if (!pi.early) {
@@ -688,5 +688,5 @@
                 return null;
             }
-            HashMap<String, PluginInformation> ret = new HashMap<String, PluginInformation>();
+            HashMap<String, PluginInformation> ret = new HashMap<>();
             for (PluginInformation pi: task.getAvailablePlugins()) {
                 ret.put(pi.name, pi);
@@ -733,5 +733,5 @@
         try {
             monitor.beginTask(tr("Determine plugins to load..."));
-            Set<String> plugins = new HashSet<String>();
+            Set<String> plugins = new HashSet<>();
             plugins.addAll(Main.pref.getCollection("plugins",  new LinkedList<String>()));
             if (System.getProperty("josm.plugins") != null) {
@@ -743,5 +743,5 @@
             filterUnmaintainedPlugins(parent, plugins);
             Map<String, PluginInformation> infos = loadLocallyAvailablePluginInformation(monitor.createSubTaskMonitor(1,false));
-            List<PluginInformation> ret = new LinkedList<PluginInformation>();
+            List<PluginInformation> ret = new LinkedList<>();
             for (Iterator<String> it = plugins.iterator(); it.hasNext();) {
                 String plugin = it.next();
@@ -791,5 +791,5 @@
     private static Set<PluginInformation> findRequiredPluginsToDownload(
             Collection<PluginInformation> pluginsToUpdate, List<PluginInformation> allPlugins, Set<PluginInformation> pluginsToDownload) {
-        Set<PluginInformation> result = new HashSet<PluginInformation>();
+        Set<PluginInformation> result = new HashSet<>();
         for (PluginInformation pi : pluginsToUpdate) {
             for (String name : pi.getRequiredPlugins()) {
@@ -880,5 +880,5 @@
             // filter plugins which actually have to be updated
             //
-            Collection<PluginInformation> pluginsToUpdate = new ArrayList<PluginInformation>();
+            Collection<PluginInformation> pluginsToUpdate = new ArrayList<>();
             for (PluginInformation pi: plugins) {
                 if (pi.isUpdateRequired()) {
@@ -889,5 +889,5 @@
             if (!pluginsToUpdate.isEmpty()) {
 
-                Set<PluginInformation> pluginsToDownload = new HashSet<PluginInformation>(pluginsToUpdate);
+                Set<PluginInformation> pluginsToDownload = new HashSet<>(pluginsToUpdate);
 
                 if (allPlugins != null) {
@@ -1150,5 +1150,5 @@
 
         try {
-            FutureTask<Integer> task = new FutureTask<Integer>(new Callable<Integer>() {
+            FutureTask<Integer> task = new FutureTask<>(new Callable<Integer>() {
                 @Override
                 public Integer call() {
@@ -1218,5 +1218,5 @@
             return null;
 
-        Set<String> plugins = new HashSet<String>(
+        Set<String> plugins = new HashSet<>(
                 Main.pref.getCollection("plugins",Collections.<String> emptySet())
         );
@@ -1260,5 +1260,5 @@
     public static String getBugReportText() {
         StringBuilder text = new StringBuilder();
-        LinkedList <String> pl = new LinkedList<String>(Main.pref.getCollection("plugins", new LinkedList<String>()));
+        LinkedList <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/PluginInformation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 7005)
@@ -75,6 +75,6 @@
     /** The plugin icon. */
     public ImageIcon icon;
-    public List<URL> libraries = new LinkedList<URL>();
-    public final Map<String, String> attr = new TreeMap<String, String>();
+    public List<URL> libraries = new LinkedList<>();
+    public final Map<String, String> attr = new TreeMap<>();
 
     private static final ImageIcon emptyIcon = new ImageIcon(new BufferedImage(24, 24, BufferedImage.TYPE_INT_ARGB));
@@ -401,5 +401,5 @@
     public static Collection<String> getPluginLocations() {
         Collection<String> locations = Main.pref.getAllPossiblePreferenceDirs();
-        Collection<String> all = new ArrayList<String>(locations.size());
+        Collection<String> all = new ArrayList<>(locations.size());
         for (String s : locations) {
             all.add(s+"plugins");
@@ -497,5 +497,5 @@
 
     private static List<String> getRequiredPlugins(String pluginList) {
-        List<String> requiredPlugins = new ArrayList<String>();
+        List<String> requiredPlugins = new ArrayList<>();
         if (pluginList != null) {
             for (String s : pluginList.split(";")) {
Index: trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java	(revision 7005)
@@ -58,5 +58,5 @@
      */
     public List<PluginInformation> parse(InputStream in) throws PluginListParseException{
-        List<PluginInformation> ret = new LinkedList<PluginInformation>();
+        List<PluginInformation> ret = new LinkedList<>();
         BufferedReader r = null;
         try {
Index: trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java	(revision 7005)
@@ -45,10 +45,10 @@
     public ReadLocalPluginInformationTask() {
         super(tr("Reading local plugin information.."), false);
-        availablePlugins = new HashMap<String, PluginInformation>();
+        availablePlugins = new HashMap<>();
     }
 
     public ReadLocalPluginInformationTask(ProgressMonitor monitor) {
         super(tr("Reading local plugin information.."),monitor, false);
-        availablePlugins = new HashMap<String, PluginInformation>();
+        availablePlugins = new HashMap<>();
     }
 
@@ -237,5 +237,5 @@
      */
     public List<PluginInformation> getAvailablePlugins() {
-        return new ArrayList<PluginInformation>(availablePlugins.values());
+        return new ArrayList<>(availablePlugins.values());
     }
 
Index: trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 7005)
@@ -64,5 +64,5 @@
             this.sites = Collections.emptySet();
         }
-        this.availablePlugins = new LinkedList<PluginInformation>();
+        this.availablePlugins = new LinkedList<>();
         this.displayErrMsg = displayErrMsg;
     }
@@ -350,6 +350,6 @@
      */
     protected List<PluginInformation> filterDeprecatedPlugins(List<PluginInformation> plugins) {
-        List<PluginInformation> ret = new ArrayList<PluginInformation>(plugins.size());
-        HashSet<String> deprecatedPluginNames = new HashSet<String>();
+        List<PluginInformation> ret = new ArrayList<>(plugins.size());
+        HashSet<String> deprecatedPluginNames = new HashSet<>();
         for (PluginHandler.DeprecatedPlugin p : PluginHandler.DEPRECATED_PLUGINS) {
             deprecatedPluginNames.add(p.name);
@@ -389,5 +389,5 @@
 
         // collect old cache files and remove if no longer in use
-        List<File> siteCacheFiles = new LinkedList<File>();
+        List<File> siteCacheFiles = new LinkedList<>();
         for (String location : PluginInformation.getPluginLocations()) {
             File [] f = new File(location).listFiles(
Index: trunk/src/org/openstreetmap/josm/tools/CopyList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/CopyList.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/CopyList.java	(revision 7005)
@@ -116,5 +116,5 @@
     @Override
     public Object clone() {
-        return new CopyList<E>(array, size);
+        return new CopyList<>(array, size);
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/Diff.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 7005)
@@ -96,5 +96,5 @@
      */
     public Diff(Object[] a, Object[] b) {
-        Map<Object,Integer> h = new HashMap<Object,Integer>(a.length + b.length);
+        Map<Object,Integer> h = new HashMap<>(a.length + b.length);
         filevec = new FileData[] { new FileData(a,h),new FileData(b,h) };
     }
Index: trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 7005)
@@ -78,5 +78,5 @@
     public static Pair<OsmPrimitive, Collection<OsmPrimitive>> parsePreconditionFailed(String msg) {
         final String ids = "(\\d+(?:,\\d+)*)";
-        final Collection<OsmPrimitive> refs = new TreeSet<OsmPrimitive>(); // error message can contain several times the same way
+        final Collection<OsmPrimitive> refs = new TreeSet<>(); // error message can contain several times the same way
         Matcher m;
         m = Pattern.compile(".*Node (\\d+) is still used by relations " + ids + ".*").matcher(msg);
Index: trunk/src/org/openstreetmap/josm/tools/FallbackDateParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/FallbackDateParser.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/FallbackDateParser.java	(revision 7005)
@@ -42,5 +42,5 @@
     public FallbackDateParser() {
         // Build a list of candidate date parsers.
-        dateParsers = new ArrayList<DateFormat>(formats.length);
+        dateParsers = new ArrayList<>(formats.length);
         for (String format : formats) {
             dateParsers.add(new SimpleDateFormat(format));
Index: trunk/src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 7005)
@@ -66,9 +66,9 @@
         boolean[] changedWays = new boolean[n];
 
-        Set<Node> intersectionNodes = new LinkedHashSet<Node>();
+        Set<Node> intersectionNodes = new LinkedHashSet<>();
 
         //copy node arrays for local usage.
         for (int pos = 0; pos < n; pos ++) {
-            newNodes[pos] = new ArrayList<Node>(ways.get(pos).getNodes());
+            newNodes[pos] = new ArrayList<>(ways.get(pos).getNodes());
             wayBounds[pos] = getNodesBounds(newNodes[pos]);
             changedWays[pos] = false;
@@ -828,6 +828,6 @@
 
     public static class MultiPolygonMembers {
-        public final Set<Way> outers = new HashSet<Way>();
-        public final Set<Way> inners = new HashSet<Way>();
+        public final Set<Way> outers = new HashSet<>();
+        public final Set<Way> inners = new HashSet<>();
 
         public MultiPolygonMembers(Relation multiPolygon) {
Index: trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 7005)
@@ -129,5 +129,5 @@
     private static Map<String, String> strings = null;
     private static Map<String, String[]> pstrings = null;
-    private static Map<String, PluralMode> languages = new HashMap<String, PluralMode>();
+    private static Map<String, PluralMode> languages = new HashMap<>();
 
     /**
@@ -324,5 +324,5 @@
      */
     public static final Locale[] getAvailableTranslations() {
-        Collection<Locale> v = new ArrayList<Locale>(languages.size());
+        Collection<Locale> v = new ArrayList<>(languages.size());
         if(getTranslationFile("en") != null)
         {
@@ -490,6 +490,6 @@
             p = pstrings;
         } else {
-            s = new HashMap<String, String>();
-            p = new HashMap<String, String[]>();
+            s = new HashMap<>();
+            p = new HashMap<>();
         }
         /* file format:
Index: trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 7005)
@@ -111,10 +111,10 @@
      * The icon cache
      */
-    private static final Map<String, ImageResource> cache = new HashMap<String, ImageResource>();
+    private static final Map<String, ImageResource> cache = new HashMap<>();
 
     /**
      * Caches the image data for rotated versions of the same image.
      */
-    private static final Map<Image, Map<Long, ImageResource>> ROTATE_CACHE = new HashMap<Image, Map<Long, ImageResource>>();
+    private static final Map<Image, Map<Long, ImageResource>> ROTATE_CACHE = new HashMap<>();
 
     private static final ExecutorService IMAGE_FETCHER = Executors.newSingleThreadExecutor();
@@ -677,5 +677,5 @@
         if (path != null && path.startsWith("resource://")) {
             String p = path.substring("resource://".length());
-            Collection<ClassLoader> classLoaders = new ArrayList<ClassLoader>(PluginHandler.getResourceClassLoaders());
+            Collection<ClassLoader> classLoaders = new ArrayList<>(PluginHandler.getResourceClassLoaders());
             if (additionalClassLoaders != null) {
                 classLoaders.addAll(additionalClassLoaders);
@@ -896,5 +896,5 @@
             Map<Long, ImageResource> cacheByAngle = ROTATE_CACHE.get(img);
             if (cacheByAngle == null) {
-                ROTATE_CACHE.put(img, cacheByAngle = new HashMap<Long, ImageResource>());
+                ROTATE_CACHE.put(img, cacheByAngle = new HashMap<>());
             }
 
Index: trunk/src/org/openstreetmap/josm/tools/ImageResource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageResource.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/ImageResource.java	(revision 7005)
@@ -25,5 +25,5 @@
      * Caches the image data for resized versions of the same image.
      */
-    private Map<Dimension, Image> imgCache = new HashMap<Dimension, Image>();
+    private Map<Dimension, Image> imgCache = new HashMap<>();
     private SVGDiagram svg;
     public static final Dimension DEFAULT_DIMENSION = new Dimension(-1, -1);
Index: trunk/src/org/openstreetmap/josm/tools/MultiMap.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/MultiMap.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/MultiMap.java	(revision 7005)
@@ -22,10 +22,17 @@
     private final Map<A, Set<B>> map;
 
+    /**
+     * Constructs a new {@code MultiMap}.
+     */
     public MultiMap() {
-        map = new HashMap<A, Set<B>>();
+        map = new HashMap<>();
     }
 
+    /**
+     * Constructs a new {@code MultiMap} with the specified initial capacity. 
+     * @param capacity the initial capacity
+     */
     public MultiMap(int capacity) {
-        map = new HashMap<A, Set<B>>(capacity);
+        map = new HashMap<>(capacity);
     }
 
@@ -38,5 +45,5 @@
         Set<B> vals = map.get(key);
         if (vals == null) {
-            vals = new LinkedHashSet<B>();
+            vals = new LinkedHashSet<>();
             map.put(key, vals);
         }
@@ -64,5 +71,5 @@
         Set<B> vals = map.get(key);
         if (vals == null) {
-            vals = new LinkedHashSet<B>(values);
+            vals = new LinkedHashSet<>(values);
             map.put(key, vals);
         }
@@ -93,5 +100,5 @@
     public Set<B> getValues(A key) {
         if (!map.containsKey(key))
-            return new LinkedHashSet<B>();
+            return new LinkedHashSet<>();
         return map.get(key);
     }
@@ -161,5 +168,5 @@
     @Override
     public String toString() {
-        List<String> entries = new ArrayList<String>(map.size());
+        List<String> entries = new ArrayList<>(map.size());
         for (A key : map.keySet()) {
             entries.add(key + "->{" + Utils.join(",", map.get(key)) + "}");
Index: trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 7005)
@@ -32,5 +32,5 @@
     private static final String STATUS_BAR_ID = "multikeyShortcut";
 
-    private Map<MultikeyShortcutAction, MyAction> myActions = new HashMap<MultikeyShortcutAction,MyAction>();
+    private Map<MultikeyShortcutAction, MyAction> myActions = new HashMap<>();
 
     private class MyKeyEventDispatcher implements KeyEventDispatcher {
Index: trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 7005)
@@ -44,5 +44,5 @@
         }
         String[] args = url.substring(i+1).split("&");
-        HashMap<String, String> map = new HashMap<String, String>();
+        HashMap<String, String> map = new HashMap<>();
         for (String arg : args) {
             int eq = arg.indexOf('=');
@@ -146,5 +146,5 @@
         final String shortLink = url.substring(SHORTLINK_PREFIX.length());
 
-        final Map<Character, Integer> array = new HashMap<Character, Integer>();
+        final Map<Character, Integer> array = new HashMap<>();
 
         for (int i=0; i<SHORTLINK_CHARS.length; ++i) {
@@ -229,5 +229,5 @@
         double y = Math.floor((1 - Math.log(Math.tan(Math.toRadians(lat)) + 1 / Math.cos(Math.toRadians(lat))) / Math.PI)
                 / 2 * Math.pow(2.0, zoom));
-        return new Pair<Double, Double>(x, y);
+        return new Pair<>(x, y);
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/Pair.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Pair.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/Pair.java	(revision 7005)
@@ -44,5 +44,5 @@
 
     public static <T> ArrayList<T> toArrayList(Pair<T, T> p) {
-        ArrayList<T> l = new ArrayList<T>(2);
+        ArrayList<T> l = new ArrayList<>(2);
         l.add(p.a);
         l.add(p.b);
@@ -71,5 +71,5 @@
      */
     public static <U,V> Pair<U,V> create(U u, V v) {
-        return new Pair<U,V>(u,v);
+        return new Pair<>(u,v);
     }
 }
Index: trunk/src/org/openstreetmap/josm/tools/Shortcut.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 7005)
@@ -148,5 +148,5 @@
     // create a shortcut object from an string as saved in the preferences
     private Shortcut(String prefString) {
-        List<String> s = (new ArrayList<String>(Main.pref.getCollection(prefString)));
+        List<String> s = (new ArrayList<>(Main.pref.getCollection(prefString)));
         this.shortText = prefString.substring(15);
         this.longText = s.get(0);
@@ -232,8 +232,8 @@
 
     // here we store our shortcuts
-    private static Map<String, Shortcut> shortcuts = new LinkedHashMap<String, Shortcut>();
+    private static Map<String, Shortcut> shortcuts = new LinkedHashMap<>();
 
     // and here our modifier groups
-    private static Map<Integer, Integer> groups= new HashMap<Integer, Integer>();
+    private static Map<Integer, Integer> groups= new HashMap<>();
 
     // check if something collides with an existing shortcut
@@ -252,5 +252,5 @@
      */
     public static List<Shortcut> listAll() {
-        List<Shortcut> l = new ArrayList<Shortcut>();
+        List<Shortcut> l = new ArrayList<>();
         for(Shortcut c : shortcuts.values())
         {
@@ -299,5 +299,5 @@
         Main.platform.initSystemShortcuts();
         // (2) User defined shortcuts
-        LinkedList<Shortcut> newshortcuts = new LinkedList<Shortcut>();
+        LinkedList<Shortcut> newshortcuts = new LinkedList<>();
         for(String s : Main.pref.getAllPrefixCollectionKeys("shortcut.entry.")) {
             newshortcuts.add(new Shortcut(s));
Index: trunk/src/org/openstreetmap/josm/tools/TaggingPresetNameTemplateList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/TaggingPresetNameTemplateList.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/TaggingPresetNameTemplateList.java	(revision 7005)
@@ -25,5 +25,5 @@
         return instance;
     }
-    private final List<TaggingPreset> presetsWithPattern = new LinkedList<TaggingPreset>();
+    private final List<TaggingPreset> presetsWithPattern = new LinkedList<>();
 
     private TaggingPresetNameTemplateList() {
Index: trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 7005)
@@ -58,5 +58,5 @@
         Map<String, String>  getFreeParsedTags() {
             String k, v;
-            Map<String, String> tags = new HashMap<String,String>();
+            Map<String, String> tags = new HashMap<>();
 
             while (true) {
@@ -164,5 +164,5 @@
          String[] lines = text.split(splitRegex);
          Pattern p = Pattern.compile(tagRegex);
-         Map<String, String> tags = new HashMap<String,String>();
+         Map<String, String> tags = new HashMap<>();
          String k=null, v=null;
          for (String  line: lines) {
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 7005)
@@ -122,5 +122,5 @@
 
     public static <T> Collection<T> filter(Collection<? extends T> collection, Predicate<? super T> predicate) {
-        return new FilteredCollection<T>(collection, predicate);
+        return new FilteredCollection<>(collection, predicate);
     }
 
@@ -142,5 +142,5 @@
      */
     public static <S, T extends S> SubclassFilteredCollection<S, T> filteredCollection(Collection<S> collection, final Class<T> klass) {
-        return new SubclassFilteredCollection<S, T>(collection, new Predicate<S>() {
+        return new SubclassFilteredCollection<>(collection, new Predicate<S>() {
             @Override
             public boolean evaluate(S o) {
@@ -523,5 +523,5 @@
      */
     public static <T> List<T> topologicalSort(final MultiMap<T,T> dependencies) {
-        MultiMap<T,T> deps = new MultiMap<T,T>();
+        MultiMap<T,T> deps = new MultiMap<>();
         for (T key : dependencies.keySet()) {
             deps.putVoid(key);
@@ -533,5 +533,5 @@
 
         int size = deps.size();
-        List<T> sorted = new ArrayList<T>();
+        List<T> sorted = new ArrayList<>();
         for (int i=0; i<size; ++i) {
             T parentless = null;
@@ -906,5 +906,5 @@
     public static List<String> getMatches(final Matcher m) {
         if (m.matches()) {
-            List<String> result = new ArrayList<String>(m.groupCount() + 1);
+            List<String> result = new ArrayList<>(m.groupCount() + 1);
             for (int i = 0; i <= m.groupCount(); i++) {
                 result.add(m.group(i));
Index: trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 7005)
@@ -66,5 +66,5 @@
 
     private class Parser extends DefaultHandler {
-        Stack<Object> current = new Stack<Object>();
+        Stack<Object> current = new Stack<>();
         StringBuilder characters = new StringBuilder(64);
 
@@ -186,6 +186,6 @@
         boolean onStart;
         boolean both;
-        private final Map<String, Field> fields = new HashMap<String, Field>();
-        private final Map<String, Method> methods = new HashMap<String, Method>();
+        private final Map<String, Field> fields = new HashMap<>();
+        private final Map<String, Method> methods = new HashMap<>();
 
         public Entry(Class<?> klass, boolean onStart, boolean both) {
@@ -226,5 +226,5 @@
     }
 
-    private Map<String, Entry> mapping = new HashMap<String, Entry>();
+    private Map<String, Entry> mapping = new HashMap<>();
     private DefaultHandler parser;
 
@@ -232,5 +232,5 @@
      * The queue of already parsed items from the parsing thread.
      */
-    private List<Object> queue = new LinkedList<Object>();
+    private List<Object> queue = new LinkedList<>();
     private Iterator<Object> queueIterator = null;
 
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/Condition.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/Condition.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/Condition.java	(revision 7005)
@@ -8,5 +8,5 @@
 public class Condition implements TemplateEntry {
 
-    private final List<TemplateEntry> entries = new ArrayList<TemplateEntry>();
+    private final List<TemplateEntry> entries = new ArrayList<>();
 
     public List<TemplateEntry> getEntries() {
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java	(revision 7005)
@@ -66,5 +66,5 @@
             }
 
-            List<OsmPrimitive> result = new ArrayList<OsmPrimitive>();
+            List<OsmPrimitive> result = new ArrayList<>();
             for (OsmPrimitive child: children) {
                 for (OsmPrimitive parent: child.getReferrers(true)) {
@@ -100,5 +100,5 @@
                 parents = Collections.emptyList();
             }
-            List<OsmPrimitive> result = new ArrayList<OsmPrimitive>();
+            List<OsmPrimitive> result = new ArrayList<>();
             for (OsmPrimitive p: parents) {
                 if (p instanceof Way) {
@@ -137,5 +137,5 @@
         @Override
         List<OsmPrimitive> getPrimitives(OsmPrimitive root) {
-            List<OsmPrimitive> result = new ArrayList<OsmPrimitive>();
+            List<OsmPrimitive> result = new ArrayList<>();
             for (OsmPrimitive o: lhs.getPrimitives(root)) {
                 if (condition == null || condition.match(o)) {
@@ -168,5 +168,5 @@
         @Override
         List<OsmPrimitive> getPrimitives(OsmPrimitive root) {
-            List<OsmPrimitive> result = new ArrayList<OsmPrimitive>();
+            List<OsmPrimitive> result = new ArrayList<>();
             List<OsmPrimitive> lhsList = lhs.getPrimitives(root);
             for (OsmPrimitive o: rhs.getPrimitives(root)) {
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateParser.java	(revision 7004)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateParser.java	(revision 7005)
@@ -39,5 +39,5 @@
 
     private TemplateEntry parseExpression(Collection<TokenType> endTokens) throws ParseError {
-        List<TemplateEntry> entries = new ArrayList<TemplateEntry>();
+        List<TemplateEntry> entries = new ArrayList<>();
         while (true) {
             TemplateEntry templateEntry;
