Index: applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java
===================================================================
--- applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java	(revision 30736)
+++ applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java	(revision 30737)
@@ -47,6 +47,6 @@
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> sel = Main.main.getCurrentDataSet().getSelected();
-        Collection<Node> nodesWay1 = new LinkedList<Node>();
-        Collection<Node> nodesWay2 = new LinkedList<Node>();
+        Collection<Node> nodesWay1 = new LinkedList<>();
+        Collection<Node> nodesWay2 = new LinkedList<>();
         if ((sel.size() != 2) || !(sel.toArray()[0] instanceof Way) || !(sel.toArray()[1] instanceof Way)) {
             JOptionPane.showMessageDialog(Main.parent, tr("Select two ways with a node in common"));
@@ -71,5 +71,5 @@
         for (int c=0;c<w1.length;c++)
             w1[c]=new Way();
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
         int c1=0,c2;
         double latDif,lonDif;
Index: applications/editors/josm/plugins/DirectDownload/src/org/openstreetmap/josm/plugins/directdownload/DownloadDataGui.java
===================================================================
--- applications/editors/josm/plugins/DirectDownload/src/org/openstreetmap/josm/plugins/directdownload/DownloadDataGui.java	(revision 30736)
+++ applications/editors/josm/plugins/DirectDownload/src/org/openstreetmap/josm/plugins/directdownload/DownloadDataGui.java	(revision 30737)
@@ -53,5 +53,5 @@
         JPanel panel = new JPanel();
         panel.setLayout(new BorderLayout());
-    
+
         DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
         model = new NamedResultTableModel(selectionModel);
@@ -71,28 +71,30 @@
 
     private static class TrackListHandler extends DefaultHandler {
-        private LinkedList<UserTrack> data = new LinkedList<UserTrack>();
-        
+        private LinkedList<UserTrack> data = new LinkedList<>();
+
         private String cdata = new String();
-    
+
         @Override
         public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
             if (qName.equals("gpx_file")) {
             UserTrack track = new UserTrack();
-    
+
             track.id       = atts.getValue("id");
             track.filename = atts.getValue("name");
             track.datetime = atts.getValue("timestamp").replaceAll("[TZ]", " "); // TODO: do real parsing and time zone conversion
-            
+
             data.addFirst(track);
-            } 
+            }
             cdata = new String();
         }
-    
-        public void characters(char ch[], int start, int length)
+
+        @Override
+		public void characters(char ch[], int start, int length)
             throws SAXException {
             cdata += new String(ch, start, length);
         }
-    
-        public void endElement(String uri, String localName, String qName) throws SAXException {
+
+        @Override
+		public void endElement(String uri, String localName, String qName) throws SAXException {
             if (qName.equals("description")) {
             data.getFirst().description = cdata;
@@ -102,5 +104,5 @@
             data.getFirst().tags = cdata;
             cdata = new String();
-            }    
+            }
             */
         }
@@ -116,14 +118,14 @@
         try {
             URL userTracksUrl = new URL(urlString);
-    
+
             SAXParserFactory spf = SAXParserFactory.newInstance();
             TrackListHandler handler = new TrackListHandler();
-    
+
             //get a new instance of parser
             SAXParser sp = spf.newSAXParser();
-            
+
             //parse the file and also register this class for call backs
             sp.parse(userTracksUrl.openStream(), handler);
-            
+
             return handler.getResult();
         } catch (java.net.MalformedURLException e) {
@@ -141,5 +143,5 @@
         }
 
-        return new LinkedList<UserTrack>();
+        return new LinkedList<>();
     }
 
@@ -149,8 +151,8 @@
 
         public NamedResultTableModel(ListSelectionModel selectionModel) {
-            data = new ArrayList<UserTrack>();
+            data = new ArrayList<>();
             this.selectionModel = selectionModel;
         }
-        
+
         @Override
         public int getRowCount() {
@@ -169,9 +171,9 @@
                 this.data.clear();
             } else {
-                this.data  =new ArrayList<UserTrack>(data);
+                this.data  =new ArrayList<>(data);
             }
             fireTableDataChanged();
         }
-        
+
         @Override
         public boolean isCellEditable(int row, int column) {
@@ -236,5 +238,6 @@
 
     class ListSelectionHandler implements ListSelectionListener {
-        public void valueChanged(ListSelectionEvent lse) {
+        @Override
+		public void valueChanged(ListSelectionEvent lse) {
         }
     }
@@ -262,5 +265,6 @@
         }
 
-        public Component getTableCellRendererComponent(JTable table, Object value,
+        @Override
+		public Component getTableCellRendererComponent(JTable table, Object value,
                 boolean isSelected, boolean hasFocus, int row, int column) {
 
@@ -276,5 +280,5 @@
             case 1:
                 setText(sr.filename);
-                break;        
+                break;
             case 2:
                 setText(sr.description);
Index: applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java
===================================================================
--- applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java	(revision 30736)
+++ applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java	(revision 30737)
@@ -52,5 +52,5 @@
  */
 public class UploadDataGui extends ExtendedDialog {
-    
+
     /**
      * This enum contains the possible values for the visibility field and their
@@ -103,5 +103,5 @@
 
     private boolean canceled = false;
-    
+
     public UploadDataGui() {
         // Initalizes ExtendedDialog
@@ -113,5 +113,5 @@
         JPanel content = initComponents();
         GpxData gpxData = UploadOsmConnection.getInstance().autoSelectTrace();
-        initTitleAndDescriptionFromGpxData(gpxData);    // this is changing some dialog elements, so it (probably) must be before the following  
+        initTitleAndDescriptionFromGpxData(gpxData);    // this is changing some dialog elements, so it (probably) must be before the following
         setContent(content);
         setButtonIcons(new String[] { "uploadtrace.png", "cancel.png" });
@@ -129,5 +129,5 @@
         JLabel visibilityLabel = new JLabel(tr("Visibility"));
         visibilityLabel.setToolTipText(tr("Defines the visibility of your trace for other OSM users."));
-        
+
         visibilityCombo = new JComboBox<>();
         visibilityCombo.setEditable(false);
@@ -142,6 +142,6 @@
         descriptionField = new HistoryComboBox();
         descriptionField.setToolTipText(tr("Please enter Description about your trace."));
-        
-        List<String> descHistory = new LinkedList<String>(Main.pref.getCollection("directupload.description.history", new LinkedList<String>()));
+
+        List<String> descHistory = new LinkedList<>(Main.pref.getCollection("directupload.description.history", new LinkedList<String>()));
         // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
         // XXX this should be handled in HistoryComboBox
@@ -154,5 +154,5 @@
         tagsField.setToolTipText(tr("Please enter tags about your trace."));
 
-        List<String> tagsHistory = new LinkedList<String>(Main.pref.getCollection("directupload.tags.history", new LinkedList<String>()));
+        List<String> tagsHistory = new LinkedList<>(Main.pref.getCollection("directupload.tags.history", new LinkedList<String>()));
         // we have to reverse the history, because ComboBoxHistory will reverse it againin addElement()
         // XXX this should be handled in HistoryComboBox
@@ -199,5 +199,5 @@
       }
       else {
-          description = new SimpleDateFormat("yyMMddHHmmss").format(new Date()); 
+          description = new SimpleDateFormat("yyMMddHHmmss").format(new Date());
           title = tr("No GPX layer selected. Cannot upload a trace.");
       }
@@ -296,6 +296,6 @@
         c.setRequestMethod("POST");
         c.setDoOutput(true);
-        // unfortunately, addAuth() is protected, so we need to subclass OsmConnection 
-        // XXX make addAuth public. 
+        // unfortunately, addAuth() is protected, so we need to subclass OsmConnection
+        // XXX make addAuth public.
         UploadOsmConnection.getInstance().addAuthHack(c);
 
@@ -322,5 +322,5 @@
                 returnMsg += "\n" + c.getHeaderField("Error");
         }
-        
+
         final String returnMsgEDT = returnMsg;
 
@@ -408,5 +408,5 @@
 
         final String errorsEDT = errors;
-        
+
         GuiHelper.runInEDT(new Runnable() {
             @Override public void run() {
@@ -414,5 +414,5 @@
             }
         });
-        
+
         return errors.length() > 0;
     }
@@ -429,8 +429,8 @@
         // Disable Upload button so users can't just upload that track again
         buttons.get(0).setEnabled(false);
-        
+
         // save history
         Main.pref.put("directupload.visibility.last-used", visibility.desc2visi(visibilityCombo.getSelectedItem().toString()).name());
-        
+
         descriptionField.addCurrentItemToHistory();
         Main.pref.putCollection("directupload.description.history", descriptionField.getHistory());
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ColorMap.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ColorMap.java	(revision 30736)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ColorMap.java	(revision 30737)
@@ -16,176 +16,176 @@
  */
 public class ColorMap {
-    private List<ColorMapEntry> colorList;
-    private String name;
-    private static HashMap<String, ColorMap> colorMaps;
+	private List<ColorMapEntry> colorList;
+	private String name;
+	private static HashMap<String, ColorMap> colorMaps;
 
-    static {
-        colorMaps = new HashMap<String, ColorMap>();
-    }
+	static {
+		colorMaps = new HashMap<>();
+	}
 
-    // Private ctor to enforce use of create
-    private ColorMap() {
-    }
+	// Private ctor to enforce use of create
+	private ColorMap() {
+	}
 
-    public String getName() {
-        return name;
-    }
+	public String getName() {
+		return name;
+	}
 
-    public void setName(String name) {
-        this.name = name;
-    }
+	public void setName(String name) {
+		this.name = name;
+	}
 
-    /**
-     * Gets the color according to the given elevation value.
-     *
-     * @param elevation the elevation
-     * @return the color
-     */
-    public Color getColor(int elevation) {
-        // empty color map?
-        if (colorList == null || colorList.size() == 0) {
-            return Color.white;
-        }
+	/**
+	 * Gets the color according to the given elevation value.
+	 *
+	 * @param elevation the elevation
+	 * @return the color
+	 */
+	public Color getColor(int elevation) {
+		// empty color map?
+		if (colorList == null || colorList.size() == 0) {
+			return Color.white;
+		}
 
-        // out of range?
-        if (elevation < colorList.get(0).ele) {
-            return colorList.get(0).getColor();
-        }
+		// out of range?
+		if (elevation < colorList.get(0).ele) {
+			return colorList.get(0).getColor();
+		}
 
-        int last = colorList.size() - 1;
-        if (elevation > colorList.get(last).ele) {
-            return colorList.get(last).getColor();
-        }
+		int last = colorList.size() - 1;
+		if (elevation > colorList.get(last).ele) {
+			return colorList.get(last).getColor();
+		}
 
-        // find elevation section
-        for (int i = 0; i < last; i++) {
-            ColorMapEntry e1 = colorList.get(i);
-            ColorMapEntry e2 = colorList.get(i + 1);
+		// find elevation section
+		for (int i = 0; i < last; i++) {
+			ColorMapEntry e1 = colorList.get(i);
+			ColorMapEntry e2 = colorList.get(i + 1);
 
-            // elevation within range?
-            if (e1.getEle() <= elevation && e2.getEle() >= elevation) {
+			// elevation within range?
+			if (e1.getEle() <= elevation && e2.getEle() >= elevation) {
 
-                // interpolate color between both
-                double val = (elevation - e1.getEle()) / (double)(e2.getEle() - e1.getEle());
-                return interpolate(e1.getColor(), e2.getColor(), val);
-            }
-        }
+				// interpolate color between both
+				double val = (elevation - e1.getEle()) / (double)(e2.getEle() - e1.getEle());
+				return interpolate(e1.getColor(), e2.getColor(), val);
+			}
+		}
 
-        // here we should never end!
-        throw new RuntimeException("Inconsistent color map - found no entry for elevation " + elevation);
-    }
+		// here we should never end!
+		throw new RuntimeException("Inconsistent color map - found no entry for elevation " + elevation);
+	}
 
 
-    /**
-     * Gets the color map with the given name.
-     *
-     * @param name the name
-     * @return the map or <code>null</code>, if no such map exists
-     */
-    public static ColorMap getMap(String name) {
-        if (colorMaps.containsKey(name)) {
-            return colorMaps.get(name);
-        }
-        return null;
-    }
+	/**
+	 * Gets the color map with the given name.
+	 *
+	 * @param name the name
+	 * @return the map or <code>null</code>, if no such map exists
+	 */
+	public static ColorMap getMap(String name) {
+		if (colorMaps.containsKey(name)) {
+			return colorMaps.get(name);
+		}
+		return null;
+	}
 
-    /**
-     * Gets the number of available color maps.
-     *
-     * @return the int
-     */
-    public static int size() {
-        return colorMaps != null ? colorMaps.size() : 0;
-    }
+	/**
+	 * Gets the number of available color maps.
+	 *
+	 * @return the int
+	 */
+	public static int size() {
+		return colorMaps != null ? colorMaps.size() : 0;
+	}
 
 
-    /**
-     * Gets the available color map names.
-     *
-     * @param name the name
-     * @return the map or <code>null</code>, if no such map exists
-     */
-    public static String[] getNames() {
-        return colorMaps.keySet().toArray(new String[size()]);
-    }
+	/**
+	 * Gets the available color map names.
+	 *
+	 * @param name the name
+	 * @return the map or <code>null</code>, if no such map exists
+	 */
+	public static String[] getNames() {
+		return colorMaps.keySet().toArray(new String[size()]);
+	}
 
-    private static void registerColorMap(ColorMap newMap) {
-        CheckParameterUtil.ensureParameterNotNull(newMap);
-        colorMaps.put(newMap.getName(), newMap);
-    }
+	private static void registerColorMap(ColorMap newMap) {
+		CheckParameterUtil.ensureParameterNotNull(newMap);
+		colorMaps.put(newMap.getName(), newMap);
+	}
 
-    public static void unregisterColorMap(String name) {
-        if (colorMaps.containsKey(name)) {
-            colorMaps.remove(name);
-        }
-    }
+	public static void unregisterColorMap(String name) {
+		if (colorMaps.containsKey(name)) {
+			colorMaps.remove(name);
+		}
+	}
 
-    public static Color interpolate(java.awt.Color c1, java.awt.Color c2, double ratio) {
-        double r1 = 1 -ratio;
-        // clip
-        if (r1 < 0) r1 = 0d;
-        if (r1 > 1) r1 = 1d;
-        double r2 = 1 - r1;
+	public static Color interpolate(java.awt.Color c1, java.awt.Color c2, double ratio) {
+		double r1 = 1 -ratio;
+		// clip
+		if (r1 < 0) r1 = 0d;
+		if (r1 > 1) r1 = 1d;
+		double r2 = 1 - r1;
 
-        int r = (int) Math.round((r1 * c1.getRed()) + (r2 * c2.getRed()));
-        int g = (int) Math.round((r1 * c1.getGreen()) + (r2 * c2.getGreen()));
-        int b = (int) Math.round((r1 * c1.getBlue()) + (r2 * c2.getBlue()));
-        return new Color(r, g, b);
-    }
+		int r = (int) Math.round((r1 * c1.getRed()) + (r2 * c2.getRed()));
+		int g = (int) Math.round((r1 * c1.getGreen()) + (r2 * c2.getGreen()));
+		int b = (int) Math.round((r1 * c1.getBlue()) + (r2 * c2.getBlue()));
+		return new Color(r, g, b);
+	}
 
-    /**
-     * Creates a color map using the given colors/elevation values.
-     * Both arrays must have same length.
-     *
-     * @param name the name of the color map
-     * @param colors the array containing the colors
-     * @param ele the elevation values
-     * @return the color map
-     */
-    public static ColorMap create(String name, Color[] colors, int[] ele) {
-        CheckParameterUtil.ensureParameterNotNull(colors);
-        CheckParameterUtil.ensureParameterNotNull(ele);
+	/**
+	 * Creates a color map using the given colors/elevation values.
+	 * Both arrays must have same length.
+	 *
+	 * @param name the name of the color map
+	 * @param colors the array containing the colors
+	 * @param ele the elevation values
+	 * @return the color map
+	 */
+	public static ColorMap create(String name, Color[] colors, int[] ele) {
+		CheckParameterUtil.ensureParameterNotNull(colors);
+		CheckParameterUtil.ensureParameterNotNull(ele);
 
-        if (colors.length != ele.length) {
-            throw new IllegalArgumentException("Arrays colors and ele must have same length: " + colors.length + " vs " + ele.length);
-        }
+		if (colors.length != ele.length) {
+			throw new IllegalArgumentException("Arrays colors and ele must have same length: " + colors.length + " vs " + ele.length);
+		}
 
-        ColorMap map = new ColorMap();
-        map.colorList = new ArrayList<ColorMap.ColorMapEntry>();
-        map.name = name;
-        for (int i = 0; i < ele.length; i++) {
-            map.colorList.add(map.new ColorMapEntry(colors[i], ele[i]));
-        }
+		ColorMap map = new ColorMap();
+		map.colorList = new ArrayList<>();
+		map.name = name;
+		for (int i = 0; i < ele.length; i++) {
+			map.colorList.add(map.new ColorMapEntry(colors[i], ele[i]));
+		}
 
-        // sort by elevation
-        Collections.sort(map.colorList);
+		// sort by elevation
+		Collections.sort(map.colorList);
 
-        registerColorMap(map);
-        return map;
-    }
+		registerColorMap(map);
+		return map;
+	}
 
 
-    class ColorMapEntry implements Comparable<ColorMapEntry> {
-        private final int ele; // limit
-        private final Color color;
+	class ColorMapEntry implements Comparable<ColorMapEntry> {
+		private final int ele; // limit
+		private final Color color;
 
-        public ColorMapEntry(Color color, int ele) {
-            super();
-            this.color = color;
-            this.ele = ele;
-        }
+		public ColorMapEntry(Color color, int ele) {
+			super();
+			this.color = color;
+			this.ele = ele;
+		}
 
-        public int getEle() {
-            return ele;
-        }
+		public int getEle() {
+			return ele;
+		}
 
-        public Color getColor() {
-            return color;
-        }
+		public Color getColor() {
+			return color;
+		}
 
-        @Override
-        public int compareTo(ColorMapEntry o) {
-            return this.ele - o.ele;
-        }
-    }
+		@Override
+		public int compareTo(ColorMapEntry o) {
+			return this.ele - o.ele;
+		}
+	}
 }
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationHelper.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationHelper.java	(revision 30736)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationHelper.java	(revision 30737)
@@ -19,282 +19,282 @@
  */
 public class ElevationHelper {
-    public static double METER_TO_FEET = 3.280948;
-
-    /* Countries which use the imperial system instead of the metric system. */
-    private static String IMPERIAL_SYSTEM_COUNTRIES[] = {
-        "en_US",     /* USA */
-        "en_CA",    /* Canada */
-        "en_AU",    /* Australia */
-        "en_NZ",    /* New Zealand */
-        //        "de_DE",    /* for testing only */
-        "en_ZA"    /* South Africa */
-    };
-
-    /** The 'no elevation' data magic. */
-    public static double NO_ELEVATION = Double.NaN;
-
-    /**
-     * The name of the elevation height of a way point.
-     */
-    public static final String HEIGHT_ATTRIBUTE = "ele";
-
-    private static UnitMode unitMode = UnitMode.NotSelected;
-
-    private static GeoidCorrectionKind geoidKind = GeoidCorrectionKind.None;
-
-    /** The HGT reader instance. */
-    private static HgtReader hgt = new HgtReader();
-
-    /**
-     * Gets the current mode of GEOID correction.
-     * @return
-     */
-    public static GeoidCorrectionKind getGeoidKind() {
-        return geoidKind;
-    }
-
-    public static void setGeoidKind(GeoidCorrectionKind geoidKind) {
-        ElevationHelper.geoidKind = geoidKind;
-    }
-
-    /**
-     * Gets the current unit mode (metric or imperial).
-     * @return
-     */
-    public static UnitMode getUnitMode() {
-        //TODO: Use this until /JOSM/src/org/openstreetmap/josm/gui/NavigatableComponent.java
-        // has a an appropriate method
-
-        // unit mode already determined?
-        if (unitMode != UnitMode.NotSelected) {
-            return unitMode;
-        }
-
-        // Set default
-        unitMode = UnitMode.Metric;
-
-        // Check if user could prefer imperial system
-        Locale l = Locale.getDefault();
-        for (int i = 0; i < IMPERIAL_SYSTEM_COUNTRIES.length; i++) {
-            String ctry = l.toString();
-            if (IMPERIAL_SYSTEM_COUNTRIES[i].equals(ctry)) {
-                unitMode = UnitMode.Imperial;
-            }
-        }
-
-        return unitMode;
-    }
-
-    /**
-     * Gets the unit string for elevation ("m" or "ft").
-     * @return
-     */
-    public static String getUnit() {
-        switch (getUnitMode()) {
-        case Metric:
-            return "m";
-        case Imperial:
-            return "ft";
-        default:
-            throw new RuntimeException("Invalid or unsupported unit mode: " + unitMode);
-        }
-    }
-
-    /**
-     * Checks if given value is a valid elevation value.
-     *
-     * @param ele the ele
-     * @return true, if is valid elevation
-     */
-    public static boolean isValidElevation(double ele) {
-        return !Double.isNaN(ele);
-    }
-
-    /**
-     * Gets the elevation (Z coordinate) of a GPX way point in meter or feet (for
-     * US, UK, ZA, AU, NZ and CA).
-     * 
-     * @param wpt
-     *            The way point instance.
-     * @return The x coordinate or <code>NO_ELEVATION</code>, if the given way point is null or contains
-     *         not height attribute.
-     */
-    public static double getElevation(WayPoint wpt) {
-        if (wpt == null) return NO_ELEVATION;
-
-        // try to get elevation from HGT file
-        double eleInt = getSrtmElevation(wpt.getCoor());
-        if (isValidElevation(eleInt)) {
-            return convert(eleInt);
-        }
-
-        // no HGT, check for elevation data in GPX
-        if (!wpt.attr.containsKey(HEIGHT_ATTRIBUTE)) {
-            // GPX has no elevation data :-(
-            return NO_ELEVATION;
-        }
-
-        // Parse elevation from GPX data
-        String height = wpt.getString(ElevationHelper.HEIGHT_ATTRIBUTE);
-        try {
-            double z = Double.parseDouble(height);
-
-            return convert(z);
-        } catch (NumberFormatException e) {
-            System.err.println(String.format(
-                    "Cannot parse double from '%s': %s", height, e
-                    .getMessage()));
-            return NO_ELEVATION;
-        }
-    }
-
-
-    private static double getElevation(LatLon ll) {
-        double ele = getSrtmElevation(ll);
-        //System.out.println("Get elevation " + ll + " => " + ele);
-        return convert(ele);
-    }
-
-    /**
-     * Converts the value to feet, if required.
-     *
-     * @param ele the elevation to convert
-     * @return the double
-     */
-    private static double convert(double ele) {
-        if (isValidElevation(ele)) {
-            if (getUnitMode() == UnitMode.Imperial) {
-                // translate to feet
-                return meter2Feet(ele);
-            } else {
-                // keep 'as is'
-                return ele;
-            }
-        }
-        return NO_ELEVATION;
-    }
-
-    /**
-     * Computes the slope <b>in percent</b> between two way points. E. g. an elevation gain of 12m
-     * within a distance of 100m is equal to a slope of 12%.
-     *
-     * @param w1 the first way point
-     * @param w2 the second way point
-     * @return the slope in percent
-     */
-    public static double computeSlope(LatLon w1, LatLon w2) {
-        // same coordinates? -> return 0, if yes
-        if (w1.equals(w2)) return 0;
-
-        // get distance in meters and divide it by 100 in advance
-        double distInMeter = convert(w1.greatCircleDistance(w2) / 100.0);
-
-        // get elevation (difference) - is converted automatically to feet
-        int ele1 = (int) ElevationHelper.getElevation(w1);
-        int ele2 = (int) ElevationHelper.getElevation(w2);
-        int dH = ele2 - ele1;
-
-        // Slope in percent is define as elevation gain/loss in meters related to a distance of 100m
-        return dH / distInMeter;
-    }
-
-    /**
-     * Converts meter into feet
-     *
-     * @param meter the meter
-     * @return the double
-     */
-    public static double meter2Feet(double meter) {
-        return meter * METER_TO_FEET;
-    }
-
-    /**
-     * Gets the elevation string for a given elevation, e. g "300m" or "800ft".
-     * @param elevation
-     * @return
-     */
-    public static String getElevationText(int elevation) {
-        return String.format("%d %s", elevation, getUnit());
-    }
-
-    /**
-     * Gets the elevation string for a given elevation, e. g "300m" or "800ft".
-     * @param elevation
-     * @return
-     */
-    public static String getElevationText(double elevation) {
-        return String.format("%d %s", (int)Math.round(elevation), getUnit());
-    }
-
-    /**
-     * Gets the elevation string for a given way point, e. g "300m" or "800ft".
-     *
-     * @param wpt the way point
-     * @return the elevation text
-     */
-    public static String getElevationText(WayPoint wpt) {
-        if (wpt == null) return "-";
-
-        int elevation = (int)Math.round(ElevationHelper.getElevation(wpt));
-        return String.format("%d %s", elevation, getUnit());
-    }
-
-    /**
-     * Get the time string for a given way point.
-     * @param wpt
-     * @return
-     */
-    public static String getTimeText(WayPoint wpt) {
-        if (wpt == null) return null;
-
-        int hour = ElevationHelper.getHourOfWayPoint(wpt);
-        int min = ElevationHelper.getMinuteOfWayPoint(wpt);
-        return String.format("%02d:%02d", hour, min);
-    }
-
-    /**
-     * Gets the SRTM elevation (Z coordinate) of the given coordinate.
-     * 
-     * @param ll
-     *            The coordinate.
-     * @return The z coordinate or {@link Double#NaN}, if elevation value could not be obtained
-     *         not height attribute.
-     */
-    public static double getSrtmElevation(LatLon ll) {
-        if (ll != null) {
-            // Try to read data from SRTM file
-            // TODO: Option to switch this off
-            double eleHgt = hgt.getElevationFromHgt(ll);
-
-            //System.out.println("Get elevation from HGT " + ll + " => " + eleHgt);
-            if (isValidElevation(eleHgt)) {
-                return eleHgt;
-            }
-        }
-        return NO_ELEVATION;
-    }
-
-    /**
-     * Checks given area for SRTM data.
-     *
-     * @param bounds the bounds/area to check
-     * @return true, if SRTM data are present; otherwise false
-     */
-    public static boolean hasSrtmData(Bounds bounds) {
-        if (bounds == null) return false;
-
-        LatLon tl = bounds.getMin();
-        LatLon br = bounds.getMax();
-
-        return     isValidElevation(getSrtmElevation(tl)) &&
-                isValidElevation(getSrtmElevation(br));
-    }
-
-    /*
-     * Gets the geoid height for the given way point. See also {@link
-     * GeoidData}.
-     */
-    public static byte getGeoidCorrection(WayPoint wpt) {
-        /*
+	public static double METER_TO_FEET = 3.280948;
+
+	/* Countries which use the imperial system instead of the metric system. */
+	private static String IMPERIAL_SYSTEM_COUNTRIES[] = {
+		"en_US",     /* USA */
+		"en_CA",    /* Canada */
+		"en_AU",    /* Australia */
+		"en_NZ",    /* New Zealand */
+		//        "de_DE",    /* for testing only */
+		"en_ZA"    /* South Africa */
+	};
+
+	/** The 'no elevation' data magic. */
+	public static double NO_ELEVATION = Double.NaN;
+
+	/**
+	 * The name of the elevation height of a way point.
+	 */
+	public static final String HEIGHT_ATTRIBUTE = "ele";
+
+	private static UnitMode unitMode = UnitMode.NotSelected;
+
+	private static GeoidCorrectionKind geoidKind = GeoidCorrectionKind.None;
+
+	/** The HGT reader instance. */
+	private static HgtReader hgt = new HgtReader();
+
+	/**
+	 * Gets the current mode of GEOID correction.
+	 * @return
+	 */
+	public static GeoidCorrectionKind getGeoidKind() {
+		return geoidKind;
+	}
+
+	public static void setGeoidKind(GeoidCorrectionKind geoidKind) {
+		ElevationHelper.geoidKind = geoidKind;
+	}
+
+	/**
+	 * Gets the current unit mode (metric or imperial).
+	 * @return
+	 */
+	public static UnitMode getUnitMode() {
+		//TODO: Use this until /JOSM/src/org/openstreetmap/josm/gui/NavigatableComponent.java
+		// has a an appropriate method
+
+		// unit mode already determined?
+		if (unitMode != UnitMode.NotSelected) {
+			return unitMode;
+		}
+
+		// Set default
+		unitMode = UnitMode.Metric;
+
+		// Check if user could prefer imperial system
+		Locale l = Locale.getDefault();
+		for (int i = 0; i < IMPERIAL_SYSTEM_COUNTRIES.length; i++) {
+			String ctry = l.toString();
+			if (IMPERIAL_SYSTEM_COUNTRIES[i].equals(ctry)) {
+				unitMode = UnitMode.Imperial;
+			}
+		}
+
+		return unitMode;
+	}
+
+	/**
+	 * Gets the unit string for elevation ("m" or "ft").
+	 * @return
+	 */
+	public static String getUnit() {
+		switch (getUnitMode()) {
+		case Metric:
+			return "m";
+		case Imperial:
+			return "ft";
+		default:
+			throw new RuntimeException("Invalid or unsupported unit mode: " + unitMode);
+		}
+	}
+
+	/**
+	 * Checks if given value is a valid elevation value.
+	 *
+	 * @param ele the ele
+	 * @return true, if is valid elevation
+	 */
+	public static boolean isValidElevation(double ele) {
+		return !Double.isNaN(ele);
+	}
+
+	/**
+	 * Gets the elevation (Z coordinate) of a GPX way point in meter or feet (for
+	 * US, UK, ZA, AU, NZ and CA).
+	 *
+	 * @param wpt
+	 *            The way point instance.
+	 * @return The x coordinate or <code>NO_ELEVATION</code>, if the given way point is null or contains
+	 *         not height attribute.
+	 */
+	public static double getElevation(WayPoint wpt) {
+		if (wpt == null) return NO_ELEVATION;
+
+		// try to get elevation from HGT file
+		double eleInt = getSrtmElevation(wpt.getCoor());
+		if (isValidElevation(eleInt)) {
+			return convert(eleInt);
+		}
+
+		// no HGT, check for elevation data in GPX
+		if (!wpt.attr.containsKey(HEIGHT_ATTRIBUTE)) {
+			// GPX has no elevation data :-(
+			return NO_ELEVATION;
+		}
+
+		// Parse elevation from GPX data
+		String height = wpt.getString(ElevationHelper.HEIGHT_ATTRIBUTE);
+		try {
+			double z = Double.parseDouble(height);
+
+			return convert(z);
+		} catch (NumberFormatException e) {
+			System.err.println(String.format(
+					"Cannot parse double from '%s': %s", height, e
+					.getMessage()));
+			return NO_ELEVATION;
+		}
+	}
+
+
+	private static double getElevation(LatLon ll) {
+		double ele = getSrtmElevation(ll);
+		//System.out.println("Get elevation " + ll + " => " + ele);
+		return convert(ele);
+	}
+
+	/**
+	 * Converts the value to feet, if required.
+	 *
+	 * @param ele the elevation to convert
+	 * @return the double
+	 */
+	private static double convert(double ele) {
+		if (isValidElevation(ele)) {
+			if (getUnitMode() == UnitMode.Imperial) {
+				// translate to feet
+				return meter2Feet(ele);
+			} else {
+				// keep 'as is'
+				return ele;
+			}
+		}
+		return NO_ELEVATION;
+	}
+
+	/**
+	 * Computes the slope <b>in percent</b> between two way points. E. g. an elevation gain of 12m
+	 * within a distance of 100m is equal to a slope of 12%.
+	 *
+	 * @param w1 the first way point
+	 * @param w2 the second way point
+	 * @return the slope in percent
+	 */
+	public static double computeSlope(LatLon w1, LatLon w2) {
+		// same coordinates? -> return 0, if yes
+		if (w1.equals(w2)) return 0;
+
+		// get distance in meters and divide it by 100 in advance
+		double distInMeter = convert(w1.greatCircleDistance(w2) / 100.0);
+
+		// get elevation (difference) - is converted automatically to feet
+		int ele1 = (int) ElevationHelper.getElevation(w1);
+		int ele2 = (int) ElevationHelper.getElevation(w2);
+		int dH = ele2 - ele1;
+
+		// Slope in percent is define as elevation gain/loss in meters related to a distance of 100m
+		return dH / distInMeter;
+	}
+
+	/**
+	 * Converts meter into feet
+	 *
+	 * @param meter the meter
+	 * @return the double
+	 */
+	public static double meter2Feet(double meter) {
+		return meter * METER_TO_FEET;
+	}
+
+	/**
+	 * Gets the elevation string for a given elevation, e. g "300m" or "800ft".
+	 * @param elevation
+	 * @return
+	 */
+	public static String getElevationText(int elevation) {
+		return String.format("%d %s", elevation, getUnit());
+	}
+
+	/**
+	 * Gets the elevation string for a given elevation, e. g "300m" or "800ft".
+	 * @param elevation
+	 * @return
+	 */
+	public static String getElevationText(double elevation) {
+		return String.format("%d %s", (int)Math.round(elevation), getUnit());
+	}
+
+	/**
+	 * Gets the elevation string for a given way point, e. g "300m" or "800ft".
+	 *
+	 * @param wpt the way point
+	 * @return the elevation text
+	 */
+	public static String getElevationText(WayPoint wpt) {
+		if (wpt == null) return "-";
+
+		int elevation = (int)Math.round(ElevationHelper.getElevation(wpt));
+		return String.format("%d %s", elevation, getUnit());
+	}
+
+	/**
+	 * Get the time string for a given way point.
+	 * @param wpt
+	 * @return
+	 */
+	public static String getTimeText(WayPoint wpt) {
+		if (wpt == null) return null;
+
+		int hour = ElevationHelper.getHourOfWayPoint(wpt);
+		int min = ElevationHelper.getMinuteOfWayPoint(wpt);
+		return String.format("%02d:%02d", hour, min);
+	}
+
+	/**
+	 * Gets the SRTM elevation (Z coordinate) of the given coordinate.
+	 *
+	 * @param ll
+	 *            The coordinate.
+	 * @return The z coordinate or {@link Double#NaN}, if elevation value could not be obtained
+	 *         not height attribute.
+	 */
+	public static double getSrtmElevation(LatLon ll) {
+		if (ll != null) {
+			// Try to read data from SRTM file
+			// TODO: Option to switch this off
+			double eleHgt = hgt.getElevationFromHgt(ll);
+
+			//System.out.println("Get elevation from HGT " + ll + " => " + eleHgt);
+			if (isValidElevation(eleHgt)) {
+				return eleHgt;
+			}
+		}
+		return NO_ELEVATION;
+	}
+
+	/**
+	 * Checks given area for SRTM data.
+	 *
+	 * @param bounds the bounds/area to check
+	 * @return true, if SRTM data are present; otherwise false
+	 */
+	public static boolean hasSrtmData(Bounds bounds) {
+		if (bounds == null) return false;
+
+		LatLon tl = bounds.getMin();
+		LatLon br = bounds.getMax();
+
+		return     isValidElevation(getSrtmElevation(tl)) &&
+				isValidElevation(getSrtmElevation(br));
+	}
+
+	/*
+	 * Gets the geoid height for the given way point. See also {@link
+	 * GeoidData}.
+	 */
+	public static byte getGeoidCorrection(WayPoint wpt) {
+		/*
         int lat = (int)Math.round(wpt.getCoor().lat());
         int lon = (int)Math.round(wpt.getCoor().lon());
@@ -303,66 +303,66 @@
         System.out.println(
                 String.format("Geoid(%d, %d) = %d", lat, lon, geoid));
-         */
-        return 0;
-    }
-
-    /**
-     * Reduces a given list of way points to the specified target size.
-     * 
-     * @param origList
-     *            The original list containing the way points.
-     * @param targetSize
-     *            The desired target size of the list. The resulting list may
-     *            contain fewer items, so targetSize should be considered as
-     *            maximum.
-     * @return A list containing the reduced list.
-     */
-    public static List<WayPoint> downsampleWayPoints(List<WayPoint> origList,
-            int targetSize) {
-        if (origList == null)
-            return null;
-        if (targetSize <= 0)
-            throw new IllegalArgumentException(
-                    "targetSize must be greater than zero");
-
-        int origSize = origList.size();
-        if (origSize <= targetSize) {
-            return origList;
-        }
-
-        int delta = (int) Math.max(Math.ceil(origSize / targetSize), 2);
-
-        List<WayPoint> res = new ArrayList<WayPoint>(targetSize);
-        for (int i = 0; i < origSize; i += delta) {
-            res.add(origList.get(i));
-        }
-
-        return res;
-    }
-
-    /**
-     * Gets the hour value of a way point in 24h format.
-     * @param wpt
-     * @return
-     */
-    public static int getHourOfWayPoint(WayPoint wpt) {
-        if (wpt == null) return -1;
-
-        Calendar calendar = GregorianCalendar.getInstance(); // creates a new calendar instance
-        calendar.setTime(wpt.getTime());   // assigns calendar to given date
-        return calendar.get(Calendar.HOUR_OF_DAY);
-    }
-
-    /**
-     * Gets the minute value of a way point in 24h format.
-     * @param wpt
-     * @return
-     */
-    public static int getMinuteOfWayPoint(WayPoint wpt) {
-        if (wpt == null) return -1;
-
-        Calendar calendar = GregorianCalendar.getInstance(); // creates a new calendar instance
-        calendar.setTime(wpt.getTime());   // assigns calendar to given date
-        return calendar.get(Calendar.MINUTE);
-    }
+		 */
+		return 0;
+	}
+
+	/**
+	 * Reduces a given list of way points to the specified target size.
+	 *
+	 * @param origList
+	 *            The original list containing the way points.
+	 * @param targetSize
+	 *            The desired target size of the list. The resulting list may
+	 *            contain fewer items, so targetSize should be considered as
+	 *            maximum.
+	 * @return A list containing the reduced list.
+	 */
+	public static List<WayPoint> downsampleWayPoints(List<WayPoint> origList,
+			int targetSize) {
+		if (origList == null)
+			return null;
+		if (targetSize <= 0)
+			throw new IllegalArgumentException(
+					"targetSize must be greater than zero");
+
+		int origSize = origList.size();
+		if (origSize <= targetSize) {
+			return origList;
+		}
+
+		int delta = (int) Math.max(Math.ceil(origSize / targetSize), 2);
+
+		List<WayPoint> res = new ArrayList<>(targetSize);
+		for (int i = 0; i < origSize; i += delta) {
+			res.add(origList.get(i));
+		}
+
+		return res;
+	}
+
+	/**
+	 * Gets the hour value of a way point in 24h format.
+	 * @param wpt
+	 * @return
+	 */
+	public static int getHourOfWayPoint(WayPoint wpt) {
+		if (wpt == null) return -1;
+
+		Calendar calendar = GregorianCalendar.getInstance(); // creates a new calendar instance
+		calendar.setTime(wpt.getTime());   // assigns calendar to given date
+		return calendar.get(Calendar.HOUR_OF_DAY);
+	}
+
+	/**
+	 * Gets the minute value of a way point in 24h format.
+	 * @param wpt
+	 * @return
+	 */
+	public static int getMinuteOfWayPoint(WayPoint wpt) {
+		if (wpt == null) return -1;
+
+		Calendar calendar = GregorianCalendar.getInstance(); // creates a new calendar instance
+		calendar.setTime(wpt.getTime());   // assigns calendar to given date
+		return calendar.get(Calendar.MINUTE);
+	}
 }
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/HgtReader.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/HgtReader.java	(revision 30736)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/HgtReader.java	(revision 30737)
@@ -17,157 +17,157 @@
 /**
  *  Class HgtReader reads data from SRTM HGT files. Currently this class is restricted to a resolution of 3 arc seconds.
- * 
+ *
  *  SRTM data files are available at the <a href="http://dds.cr.usgs.gov/srtm/version2_1/SRTM3">NASA SRTM site</a>
  *  @author Oliver Wieland <oliver.wieland@online.de>
  */
 public class HgtReader {
-    private static final int SECONDS_PER_MINUTE = 60;
+	private static final int SECONDS_PER_MINUTE = 60;
 
-    public static final String HGT_EXT = ".hgt";
+	public static final String HGT_EXT = ".hgt";
 
-    // alter these values for different SRTM resolutions
-    public static final int HGT_RES = 3; // resolution in arc seconds
-    public static final int HGT_ROW_LENGTH = 1201; // number of elevation values per line
-    public static final int HGT_VOID = -32768; // magic number which indicates 'void data' in HGT file
+	// alter these values for different SRTM resolutions
+	public static final int HGT_RES = 3; // resolution in arc seconds
+	public static final int HGT_ROW_LENGTH = 1201; // number of elevation values per line
+	public static final int HGT_VOID = -32768; // magic number which indicates 'void data' in HGT file
 
-    private final HashMap<String, ShortBuffer> cache = new HashMap<String, ShortBuffer>();
+	private final HashMap<String, ShortBuffer> cache = new HashMap<>();
 
-    public double getElevationFromHgt(LatLon coor) {
-        try {
-            String file = getHgtFileName(coor);
-            // given area in cache?
-            if (!cache.containsKey(file)) {
+	public double getElevationFromHgt(LatLon coor) {
+		try {
+			String file = getHgtFileName(coor);
+			// given area in cache?
+			if (!cache.containsKey(file)) {
 
-                // fill initial cache value. If no file is found, then
-                // we use it as a marker to indicate 'file has been searched
-                // but is not there'
-                cache.put(file, null);
-                // Try all resource directories
-                for (String location : Main.pref.getAllPossiblePreferenceDirs()) {
-                    String fullPath = new File(location + File.separator + "elevation", file).getPath();
-                    File f = new File(fullPath);
-                    if (f.exists()) {
-                        // found something: read HGT file...
-                        ShortBuffer data = readHgtFile(fullPath);
-                        // ... and store result in cache
-                        cache.put(file, data);
-                        break;
-                    }
-                }
-            }
+				// fill initial cache value. If no file is found, then
+				// we use it as a marker to indicate 'file has been searched
+				// but is not there'
+				cache.put(file, null);
+				// Try all resource directories
+				for (String location : Main.pref.getAllPossiblePreferenceDirs()) {
+					String fullPath = new File(location + File.separator + "elevation", file).getPath();
+					File f = new File(fullPath);
+					if (f.exists()) {
+						// found something: read HGT file...
+						ShortBuffer data = readHgtFile(fullPath);
+						// ... and store result in cache
+						cache.put(file, data);
+						break;
+					}
+				}
+			}
 
-            // read elevation value
-            return readElevation(coor);
-        } catch (FileNotFoundException e) {
-            System.err.println("Get elevation from HGT " + coor + " failed: => " + e.getMessage());
-            // no problem... file not there
-            return ElevationHelper.NO_ELEVATION;
-        } catch (Exception ioe) {
-            // oops...
-            ioe.printStackTrace(System.err);
-            // fallback
-            return ElevationHelper.NO_ELEVATION;
-        }
-    }
+			// read elevation value
+			return readElevation(coor);
+		} catch (FileNotFoundException e) {
+			System.err.println("Get elevation from HGT " + coor + " failed: => " + e.getMessage());
+			// no problem... file not there
+			return ElevationHelper.NO_ELEVATION;
+		} catch (Exception ioe) {
+			// oops...
+			ioe.printStackTrace(System.err);
+			// fallback
+			return ElevationHelper.NO_ELEVATION;
+		}
+	}
 
-    @SuppressWarnings("resource")
-    private ShortBuffer readHgtFile(String file) throws Exception {
-        CheckParameterUtil.ensureParameterNotNull(file);
+	@SuppressWarnings("resource")
+	private ShortBuffer readHgtFile(String file) throws Exception {
+		CheckParameterUtil.ensureParameterNotNull(file);
 
-        FileChannel fc = null;
-        ShortBuffer sb = null;
-        try {
-            // Eclipse complains here about resource leak on 'fc' - even with 'finally' clause???
-            fc = new FileInputStream(file).getChannel();
-            // choose the right endianness
+		FileChannel fc = null;
+		ShortBuffer sb = null;
+		try {
+			// Eclipse complains here about resource leak on 'fc' - even with 'finally' clause???
+			fc = new FileInputStream(file).getChannel();
+			// choose the right endianness
 
-            ByteBuffer bb = ByteBuffer.allocateDirect((int) fc.size());
-            while (bb.remaining() > 0) fc.read(bb);
+			ByteBuffer bb = ByteBuffer.allocateDirect((int) fc.size());
+			while (bb.remaining() > 0) fc.read(bb);
 
-            bb.flip();
-            //sb = bb.order(ByteOrder.LITTLE_ENDIAN).asShortBuffer();
-            sb = bb.order(ByteOrder.BIG_ENDIAN).asShortBuffer();
-        } finally {
-            if (fc != null) fc.close();
-        }
+			bb.flip();
+			//sb = bb.order(ByteOrder.LITTLE_ENDIAN).asShortBuffer();
+			sb = bb.order(ByteOrder.BIG_ENDIAN).asShortBuffer();
+		} finally {
+			if (fc != null) fc.close();
+		}
 
-        return sb;
-    }
+		return sb;
+	}
 
-    /**
-     * Reads the elevation value for the given coordinate.
-     *
-     * See also <a href="http://gis.stackexchange.com/questions/43743/how-to-extract-elevation-from-hgt-file">stackexchange.com</a>
-     * @param coor the coordinate to get the elevation data for
-     * @return the elevation value or <code>Double.NaN</code>, if no value is present
-     */
-    public double readElevation(LatLon coor) {
-        String tag = getHgtFileName(coor);
+	/**
+	 * Reads the elevation value for the given coordinate.
+	 *
+	 * See also <a href="http://gis.stackexchange.com/questions/43743/how-to-extract-elevation-from-hgt-file">stackexchange.com</a>
+	 * @param coor the coordinate to get the elevation data for
+	 * @return the elevation value or <code>Double.NaN</code>, if no value is present
+	 */
+	public double readElevation(LatLon coor) {
+		String tag = getHgtFileName(coor);
 
-        ShortBuffer sb = cache.get(tag);
+		ShortBuffer sb = cache.get(tag);
 
-        if (sb == null) {
-            return ElevationHelper.NO_ELEVATION;
-        }
+		if (sb == null) {
+			return ElevationHelper.NO_ELEVATION;
+		}
 
-        // see http://gis.stackexchange.com/questions/43743/how-to-extract-elevation-from-hgt-file
-        double fLat = frac(coor.lat()) * SECONDS_PER_MINUTE;
-        double fLon = frac(coor.lon()) * SECONDS_PER_MINUTE;
+		// see http://gis.stackexchange.com/questions/43743/how-to-extract-elevation-from-hgt-file
+		double fLat = frac(coor.lat()) * SECONDS_PER_MINUTE;
+		double fLon = frac(coor.lon()) * SECONDS_PER_MINUTE;
 
-        // compute offset within HGT file
-        int row = (int)Math.round(fLat * SECONDS_PER_MINUTE / HGT_RES);
-        int col = (int)Math.round(fLon * SECONDS_PER_MINUTE / HGT_RES);
+		// compute offset within HGT file
+		int row = (int)Math.round(fLat * SECONDS_PER_MINUTE / HGT_RES);
+		int col = (int)Math.round(fLon * SECONDS_PER_MINUTE / HGT_RES);
 
-        row = HGT_ROW_LENGTH - row;
-        int cell = (HGT_ROW_LENGTH*  (row - 1)) + col;
+		row = HGT_ROW_LENGTH - row;
+		int cell = (HGT_ROW_LENGTH*  (row - 1)) + col;
 
-        //System.out.println("Read SRTM elevation data from row/col/cell " + row + "," + col + ", " + cell + ", " + sb.limit());
+		//System.out.println("Read SRTM elevation data from row/col/cell " + row + "," + col + ", " + cell + ", " + sb.limit());
 
-        // valid position in buffer?
-        if (cell < sb.limit()) {
-            short ele = sb.get(cell);
-            //System.out.println("==> Read SRTM elevation data from row/col/cell " + row + "," + col + ", " + cell + " = " + ele);
-            // check for data voids
-            if (ele == HGT_VOID) {
-                return ElevationHelper.NO_ELEVATION;
-            } else {
-                return ele;
-            }
-        } else {
-            return ElevationHelper.NO_ELEVATION;
-        }
-    }
+		// valid position in buffer?
+		if (cell < sb.limit()) {
+			short ele = sb.get(cell);
+			//System.out.println("==> Read SRTM elevation data from row/col/cell " + row + "," + col + ", " + cell + " = " + ele);
+			// check for data voids
+			if (ele == HGT_VOID) {
+				return ElevationHelper.NO_ELEVATION;
+			} else {
+				return ele;
+			}
+		} else {
+			return ElevationHelper.NO_ELEVATION;
+		}
+	}
 
-    /**
-     * Gets the associated HGT file name for the given way point. Usually the
-     * format is <tt>[N|S]nn[W|E]mmm.hgt</tt> where <i>nn</i> is the integral latitude
-     * without decimals and <i>mmm</i> is the longitude.
-     *
-     * @param latLon the coordinate to get the filename for
-     * @return the file name of the HGT file
-     */
-    public String getHgtFileName(LatLon latLon) {
-        int lat = (int) latLon.lat();
-        int lon = (int) latLon.lon();
+	/**
+	 * Gets the associated HGT file name for the given way point. Usually the
+	 * format is <tt>[N|S]nn[W|E]mmm.hgt</tt> where <i>nn</i> is the integral latitude
+	 * without decimals and <i>mmm</i> is the longitude.
+	 *
+	 * @param latLon the coordinate to get the filename for
+	 * @return the file name of the HGT file
+	 */
+	public String getHgtFileName(LatLon latLon) {
+		int lat = (int) latLon.lat();
+		int lon = (int) latLon.lon();
 
-        String latPref = "N";
-        if (lat < 0) latPref = "S";
+		String latPref = "N";
+		if (lat < 0) latPref = "S";
 
-        String lonPref = "E";
-        if (lon < 0) {
-            lonPref = "W";
-        }
+		String lonPref = "E";
+		if (lon < 0) {
+			lonPref = "W";
+		}
 
-        return String.format("%s%02d%s%03d%s", latPref, lat, lonPref, lon, HGT_EXT);
-    }
+		return String.format("%s%02d%s%03d%s", latPref, lat, lonPref, lon, HGT_EXT);
+	}
 
-    public static double frac(double d) {
-        long iPart;
-        double fPart;
+	public static double frac(double d) {
+		long iPart;
+		double fPart;
 
-        // Get user input
-        iPart = (long) d;
-        fPart = d - iPart;
-        return fPart;
-    }
+		// Get user input
+		iPart = (long) d;
+		fPart = d - iPart;
+		return fPart;
+	}
 }
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/ElevationModel.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/ElevationModel.java	(revision 30736)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/ElevationModel.java	(revision 30737)
@@ -19,227 +19,227 @@
  * Represents the top-level part of the elevation model. The elevation model
  * breaks done into the tracks/routes of a GPX file.
- * 
+ *
  * @see IElevationModelTrackListener
  * @author Oliver Wieland <oliver.wieland@online.de>
  */
 public class ElevationModel implements IGpxVisitor, IElevationModel {
-    // private int sliceSize;
-    private int trackCounter;
-    private final GpxData gpxData;
-    private final String name;
-    private final WayPointMap profiles = new WayPointMap();
-    private final List<IElevationModelListener> listeners = new ArrayList<IElevationModelListener>();
-    private final List<WayPoint> buffer = new ArrayList<WayPoint>();
-    private int currentProfileIndex = 0;
-    private ElevationProfile curProfile = null;
-
-    /**
-     * Instantiates a new elevation model.
-     */
-    public ElevationModel() {
-        this("", null);
-    }
-
-    /**
-     * Instantiates a new elevation model.
-     *
-     * @param name the name of the model
-     * @param data the GPX data
-     */
-    public ElevationModel(String name, GpxData data) {
-        gpxData = data;
-        this.name = name;
-        GpxIterator.visit(data, this);
-    }
-
-    /**
-     * Gets the GPX data instance used by this model.
-     * 
-     * @return
-     */
-    public GpxData getGpxData() {
-        return gpxData;
-    }
-
-    /**
-     * @return the tracks
-     */
-    protected WayPointMap getTracks() {
-        return profiles;
-    }
-
-    /**
-     * Fires the 'model changed' event to all listeners.
-     */
-    protected void fireModelChanged() {
-        for (IElevationModelListener listener : listeners) {
-            if (profiles != null && profiles.size() > 0)
-                listener.elevationProfileChanged(getCurrentProfile());
-        }
-    }
-
-    @Override
-    public void addModelListener(IElevationModelListener listener) {
-        this.listeners.add(listener);
-    }
-
-    @Override
-    public void removeModelListener(IElevationModelListener listener) {
-        this.listeners.remove(listener);
-    }
-
-    @Override
-    public void removeAllListeners() {
-        this.listeners.clear();
-    }
-
-    @Override
-    public List<IElevationProfile> getProfiles() {
-        return profiles;
-    }
-
-    @Override
-    public IElevationProfile getCurrentProfile() {
-        if (currentProfileIndex < 0 || currentProfileIndex >= profileCount()) return null;
-
-        return profiles.get(currentProfileIndex);
-    }
-
-    @Override
-    public void setCurrentProfile(IElevationProfile newProfile) {
-        CheckParameterUtil.ensureParameterNotNull(newProfile);
-
-        if (!profiles.contains(newProfile)) {
-            profiles.add(newProfile);
-        }
-
-        setCurrentProfile(profiles.indexOf(newProfile));
-    }
-
-    @Override
-    public void setCurrentProfile(int index) {
-        if (index < 0 || index >= profileCount()) throw new RuntimeException("Invalid arg for setCurrentProfile: " + index + ", value must be 0.." + profileCount());
-
-        currentProfileIndex = index;
-        fireModelChanged();
-    }
-
-    @Override
-    public int profileCount() {
-        return profiles != null ? profiles.size() : 0;
-    }
-
-    // Visitor stuff starts here...
-
-    @Override
-    public void beginWayPoints() {
-        // we ignore single way points (elevation profile is quite meaningless...)
-    }
-
-    @Override
-    public void endWayPoints() {
-        // we ignore single way points (elevation profile is quite meaningless...)
-    }
-
-    @Override
-    public void visitWayPoint(WayPoint wp) {
-        // we ignore single way points (elevation profile is quite meaningless...)
-    }
-
-
-    @Override
-    public void beginTrack(GpxTrack track) {
-        createProfile(track);
-    }
-
-    @Override
-    public void endTrack(GpxTrack track) {
-        if (curProfile == null) throw new RuntimeException("Internal error: No elevation profile");
-
-        curProfile.setDistance(track.length());
-        commitProfile();
-    }
-
-    @Override
-    public void beginTrackSegment(GpxTrack track, GpxTrackSegment segment) {
-        // Nothing to do here for now
-    }
-
-    @Override
-    public void endTrackSegment(GpxTrack track, GpxTrackSegment segment) {
-        // Nothing to do here for now
-    }
-
-    @Override
-    public void visitTrackPoint(WayPoint wp, GpxTrack track,
-            GpxTrackSegment segment) {
-
-        processWayPoint(wp);
-    }
-
-    @Override
-    public void beginRoute(GpxRoute route) {
-        createProfile(route);
-    }
-
-    @Override
-    public void endRoute(GpxRoute route) {
-        if (curProfile == null) throw new RuntimeException("Internal error: No elevation profile");
-        // a GpxRoute has no 'length' property
-        curProfile.setDistance(0);
-        commitProfile();
-    }
-
-    @Override
-    public void visitRoutePoint(WayPoint wp, GpxRoute route) {
-        processWayPoint(wp);
-    }
-
-    /**
-     * Creates a new profile.
-     *
-     * @param trackOrRoute the track or route
-     */
-    private void createProfile(IWithAttributes trackOrRoute) {
-        // check GPX data
-        String trackName = (String) trackOrRoute.get("name");
-
-        if (trackName == null) {
-            trackName = (String) trackOrRoute.get(GpxData.META_NAME);
-            if (trackName == null) {
-                // no name given, build artificial one
-                trackName = name + "." + trackCounter;
-            }
-        }
-
-        curProfile = new ElevationProfile(trackName);
-    }
-
-    /**
-     * Adds a track or route to the internal track list.
-     *
-     * @param trackName the track name
-     */
-    private void commitProfile() {
-        if (buffer.size() > 0) {
-            // assign way points to profile...
-            curProfile.setWayPoints(buffer);
-            // ... and add to profile list
-            profiles.add(curProfile);
-            buffer.clear();
-        }
-    }
-
-    /**
-     * Adds the given way point to the current buffer.
-     *
-     * @param wp the wp
-     */
-    private void processWayPoint(WayPoint wp) {
-        if (wp == null) {
-            throw new RuntimeException("WPT must not be null!");
-        }
-
-        buffer.add(wp);
-    }
+	// private int sliceSize;
+	private int trackCounter;
+	private final GpxData gpxData;
+	private final String name;
+	private final WayPointMap profiles = new WayPointMap();
+	private final List<IElevationModelListener> listeners = new ArrayList<>();
+	private final List<WayPoint> buffer = new ArrayList<>();
+	private int currentProfileIndex = 0;
+	private ElevationProfile curProfile = null;
+
+	/**
+	 * Instantiates a new elevation model.
+	 */
+	public ElevationModel() {
+		this("", null);
+	}
+
+	/**
+	 * Instantiates a new elevation model.
+	 *
+	 * @param name the name of the model
+	 * @param data the GPX data
+	 */
+	public ElevationModel(String name, GpxData data) {
+		gpxData = data;
+		this.name = name;
+		GpxIterator.visit(data, this);
+	}
+
+	/**
+	 * Gets the GPX data instance used by this model.
+	 *
+	 * @return
+	 */
+	public GpxData getGpxData() {
+		return gpxData;
+	}
+
+	/**
+	 * @return the tracks
+	 */
+	protected WayPointMap getTracks() {
+		return profiles;
+	}
+
+	/**
+	 * Fires the 'model changed' event to all listeners.
+	 */
+	protected void fireModelChanged() {
+		for (IElevationModelListener listener : listeners) {
+			if (profiles != null && profiles.size() > 0)
+				listener.elevationProfileChanged(getCurrentProfile());
+		}
+	}
+
+	@Override
+	public void addModelListener(IElevationModelListener listener) {
+		this.listeners.add(listener);
+	}
+
+	@Override
+	public void removeModelListener(IElevationModelListener listener) {
+		this.listeners.remove(listener);
+	}
+
+	@Override
+	public void removeAllListeners() {
+		this.listeners.clear();
+	}
+
+	@Override
+	public List<IElevationProfile> getProfiles() {
+		return profiles;
+	}
+
+	@Override
+	public IElevationProfile getCurrentProfile() {
+		if (currentProfileIndex < 0 || currentProfileIndex >= profileCount()) return null;
+
+		return profiles.get(currentProfileIndex);
+	}
+
+	@Override
+	public void setCurrentProfile(IElevationProfile newProfile) {
+		CheckParameterUtil.ensureParameterNotNull(newProfile);
+
+		if (!profiles.contains(newProfile)) {
+			profiles.add(newProfile);
+		}
+
+		setCurrentProfile(profiles.indexOf(newProfile));
+	}
+
+	@Override
+	public void setCurrentProfile(int index) {
+		if (index < 0 || index >= profileCount()) throw new RuntimeException("Invalid arg for setCurrentProfile: " + index + ", value must be 0.." + profileCount());
+
+		currentProfileIndex = index;
+		fireModelChanged();
+	}
+
+	@Override
+	public int profileCount() {
+		return profiles != null ? profiles.size() : 0;
+	}
+
+	// Visitor stuff starts here...
+
+	@Override
+	public void beginWayPoints() {
+		// we ignore single way points (elevation profile is quite meaningless...)
+	}
+
+	@Override
+	public void endWayPoints() {
+		// we ignore single way points (elevation profile is quite meaningless...)
+	}
+
+	@Override
+	public void visitWayPoint(WayPoint wp) {
+		// we ignore single way points (elevation profile is quite meaningless...)
+	}
+
+
+	@Override
+	public void beginTrack(GpxTrack track) {
+		createProfile(track);
+	}
+
+	@Override
+	public void endTrack(GpxTrack track) {
+		if (curProfile == null) throw new RuntimeException("Internal error: No elevation profile");
+
+		curProfile.setDistance(track.length());
+		commitProfile();
+	}
+
+	@Override
+	public void beginTrackSegment(GpxTrack track, GpxTrackSegment segment) {
+		// Nothing to do here for now
+	}
+
+	@Override
+	public void endTrackSegment(GpxTrack track, GpxTrackSegment segment) {
+		// Nothing to do here for now
+	}
+
+	@Override
+	public void visitTrackPoint(WayPoint wp, GpxTrack track,
+			GpxTrackSegment segment) {
+
+		processWayPoint(wp);
+	}
+
+	@Override
+	public void beginRoute(GpxRoute route) {
+		createProfile(route);
+	}
+
+	@Override
+	public void endRoute(GpxRoute route) {
+		if (curProfile == null) throw new RuntimeException("Internal error: No elevation profile");
+		// a GpxRoute has no 'length' property
+		curProfile.setDistance(0);
+		commitProfile();
+	}
+
+	@Override
+	public void visitRoutePoint(WayPoint wp, GpxRoute route) {
+		processWayPoint(wp);
+	}
+
+	/**
+	 * Creates a new profile.
+	 *
+	 * @param trackOrRoute the track or route
+	 */
+	private void createProfile(IWithAttributes trackOrRoute) {
+		// check GPX data
+		String trackName = (String) trackOrRoute.get("name");
+
+		if (trackName == null) {
+			trackName = (String) trackOrRoute.get(GpxData.META_NAME);
+			if (trackName == null) {
+				// no name given, build artificial one
+				trackName = name + "." + trackCounter;
+			}
+		}
+
+		curProfile = new ElevationProfile(trackName);
+	}
+
+	/**
+	 * Adds a track or route to the internal track list.
+	 *
+	 * @param trackName the track name
+	 */
+	private void commitProfile() {
+		if (buffer.size() > 0) {
+			// assign way points to profile...
+			curProfile.setWayPoints(buffer);
+			// ... and add to profile list
+			profiles.add(curProfile);
+			buffer.clear();
+		}
+	}
+
+	/**
+	 * Adds the given way point to the current buffer.
+	 *
+	 * @param wp the wp
+	 */
+	private void processWayPoint(WayPoint wp) {
+		if (wp == null) {
+			throw new RuntimeException("WPT must not be null!");
+		}
+
+		buffer.add(wp);
+	}
 }
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/ElevationProfile.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/ElevationProfile.java	(revision 30736)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/ElevationProfile.java	(revision 30737)
@@ -17,420 +17,420 @@
  * full way point set and then reduces the number of way points to a given
  * amount, if necessary.
- * 
+ *
  * The computation is done via implementing {@link IGpxWaypointVisitor},
  * subclasses may override the {@link ElevationProfile#visitWayPoint(WayPoint)}
  * method to compute own values or run specific actions. The computation is
  * triggered by calling {@link ElevationProfile#updateValues()}.
- * 
+ *
  * Elevation profiles can break down into further child profiles. This is
  * intended to show different levels of details, if the number of way points
  * exceed the display space (which is usually the case).
- * 
+ *
  * {@link IElevationProfile} {@link IGpxWaypointVisitor} {@link GpxIterator}
- * 
+ *
  * @author Oliver Wieland <oliver.wieland@online.de>
- * 
+ *
  */
 public class ElevationProfile implements IElevationProfile,
 IGpxWaypointVisitor {
-    public static final int WAYPOINT_START = 0;
-    public static final int WAYPOINT_END = 1;
-    public static final int WAYPOINT_MIN = 2;
-    public static final int WAYPOINT_MAX = 3;
-
-    private String name;
-    private int minHeight;
-    private int maxHeight;
-    private int avrgHeight;
-    private double dist;
-    private Date start = new Date();
-    private Date end = new Date();
-    private final WayPoint[] importantWayPoints = new WayPoint[4];
-    private IElevationProfile parent;
-    private int sumEle; // temp var for average height
-    private List<WayPoint> wayPoints;
-    private int numWayPoints; // cached value
-    private int gain;
-    private int lastEle;
-    private Bounds bounds;
-
-    private static boolean ignoreZeroHeight = true;
-
-    /**
-     * Creates a name elevation profile without any way points.
-     * 
-     * @param name
-     */
-    public ElevationProfile(String name) {
-        this(name, null, null, 0);
-    }
-
-    /**
-     * Creates a name elevation profile with a given set of way points.
-     * 
-     * @param name
-     *            The name of the profile.
-     * @param parent
-     *            The (optional) parent profile.
-     * @param wayPoints
-     *            The list containing the way points of the profile.
-     * @param sliceSize
-     *            The requested target size of the profile.
-     */
-    public ElevationProfile(String name, IElevationProfile parent,
-            List<WayPoint> wayPoints, int sliceSize) {
-        super();
-        this.name = name;
-        this.parent = parent;
-
-        setWayPoints(wayPoints);
-    }
-
-    /**
-     * Checks if zero elevation should be ignored or not.
-     *
-     * @return true, if is ignore zero height
-     */
-    public static boolean isIgnoreZeroHeight() {
-        return ignoreZeroHeight;
-    }
-
-    /**
-     * Sets the ignore zero height.
-     *
-     * @param ignoreZeroHeight the new ignore zero height
-     */
-    public static void setIgnoreZeroHeight(boolean ignoreZeroHeight) {
-        ElevationProfile.ignoreZeroHeight = ignoreZeroHeight;
-    }
-
-    @Override
-    public void updateElevationData() {
-        updateValues();
-    }
-
-    /**
-     * Revisits all way points and recomputes the characteristic values like
-     * min/max elevation.
-     */
-    protected void updateValues() {
-        if (wayPoints == null)
-            return;
-
-        int n = this.wayPoints.size();
-        if (n == 0)
-            return;
-
-        start = new Date();
-        end = new Date(0L);
-        this.minHeight = Integer.MAX_VALUE;
-        this.maxHeight = Integer.MIN_VALUE;
-        sumEle = 0;
-        gain = 0;
-        lastEle = 0;
-
-        for (WayPoint wayPoint : this.wayPoints) {
-            visitWayPoint(wayPoint);
-        }
-
-        if (this.minHeight == Integer.MAX_VALUE && this.maxHeight == Integer.MIN_VALUE) {
-            // file does not contain elevation data    at all
-            minHeight = 0;
-            maxHeight = 0;
-            setMinWayPoint(wayPoints.get(0));
-            setMaxWayPoint(wayPoints.get(n-1));
-        }
-
-        //if (start.after(end) || start.equals(end)) {
-        // GPX does not contain time stamps -> use sequential order
-        setStart(wayPoints.get(0));
-        setEnd(wayPoints.get(n-1));
-        //}
-
-        avrgHeight = sumEle / n;
-    }
-
-    /**
-     * Gets the name of the profile.
-     */
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Sets the name of the profile.
-     * @param name The new name of the profile.
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     * Sets the way point with the lowest elevation.
-     * @param wp The way point instance having the lowest elevation.
-     */
-    protected void setMinWayPoint(WayPoint wp) {
-        importantWayPoints[WAYPOINT_MIN] = wp;
-        this.minHeight = (int) ElevationHelper.getElevation(wp);
-    }
-
-    /**
-     * Sets the way point with the highest elevation.
-     * @param wp The way point instance having the highest elevation.
-     */
-    protected void setMaxWayPoint(WayPoint wp) {
-        importantWayPoints[WAYPOINT_MAX] = wp;
-        this.maxHeight = (int) ElevationHelper.getElevation(wp);
-    }
-
-    /**
-     * Sets the average height.
-     * @param avrgHeight
-     */
-    protected void setAvrgHeight(int avrgHeight) {
-        this.avrgHeight = avrgHeight;
-    }
-
-    /**
-     * Sets the very first way point.
-     * @param wp
-     */
-    protected void setStart(WayPoint wp) {
-        importantWayPoints[WAYPOINT_START] = wp;
-        this.start = wp.getTime();
-    }
-
-    /**
-     * Sets the very last way point.
-     * @param wp
-     */
-    protected void setEnd(WayPoint wp) {
-        importantWayPoints[WAYPOINT_END] = wp;
-        this.end = wp.getTime();
-    }
-
-    public void setParent(IElevationProfile parent) {
-        this.parent = parent;
-    }
-
-    /**
-     * Sets the way points of this profile.
-     * 
-     * @param wayPoints
-     */
-    public void setWayPoints(List<WayPoint> wayPoints) {
-        if (this.wayPoints != wayPoints) {
-            this.wayPoints = new ArrayList<WayPoint>(wayPoints);
-            numWayPoints = wayPoints != null ? wayPoints.size() : 0;
-            updateValues();
-
-        }
-    }
-
-    /**
-     * Checks if the given index is valid or not.
-     * 
-     * @param index
-     *            The index to check.
-     * @return true, if the given index is valid; otherwise false.
-     */
-    protected boolean checkIndex(int index) {
-        return index >= 0 && index < getNumberOfWayPoints();
-    }
-
-    @Override
-    public int elevationValueAt(int i) {
-        if (checkIndex(i)) {
-            return (int) ElevationHelper.getElevation(wayPoints.get(i));
-        } else {
-            throw new IndexOutOfBoundsException(String.format(
-                    "Invalid index: %d, expected 0..%d", i,
-                    getNumberOfWayPoints()));
-        }
-    }
-
-    @Override
-    public int getAverageHeight() {
-        return avrgHeight;
-    }
-
-    @Override
-    public List<IElevationProfile> getChildren() {
-        return null;
-    }
-
-    @Override
-    public Date getEnd() {
-        return end;
-    }
-
-    @Override
-    public int getMaxHeight() {
-        return maxHeight;
-    }
-
-    @Override
-    public int getMinHeight() {
-        return minHeight;
-    }
-
-    /**
-     * Gets the difference between min and max elevation.
-     * 
-     * @return
-     */
-    @Override
-    public int getHeightDifference() {
-        return maxHeight - minHeight;
-    }
-
-    /**
-     * Gets the elevation gain.
-     * 
-     * @return
-     */
-    @Override
-    public int getGain() {
-        return gain;
-    }
-
-    @Override
-    public double getDistance() {
-        return dist; // dist is in meters
-    }
-
-    /**
-     * Sets the distance of the elevation profile.
-     * @param dist
-     */
-    protected void setDistance(double dist) {
-        this.dist = dist;
-    }
-
-    /**
-     * Returns the time between start and end of the track.
-     * @return
-     */
-    @Override
-    public long getTimeDifference() {
-        WayPoint wp1 = getStartWayPoint();
-        WayPoint wp2 = getEndWayPoint();
-
-        if (wp1 != null && wp2 != null) {
-            long diff = wp2.getTime().getTime() - wp1.getTime().getTime();
-            return diff;
-        }
-
-        return 0L;
-    }
-
-    @Override
-    public IElevationProfile getParent() {
-        return parent;
-    }
-
-    @Override
-    public Date getStart() {
-        return start;
-    }
-
-    @Override
-    public WayPoint getEndWayPoint() {
-        return importantWayPoints[WAYPOINT_END];
-    }
-
-    @Override
-    public WayPoint getMaxWayPoint() {
-        return importantWayPoints[WAYPOINT_MAX];
-    }
-
-    @Override
-    public WayPoint getMinWayPoint() {
-        return importantWayPoints[WAYPOINT_MIN];
-    }
-
-    @Override
-    public WayPoint getStartWayPoint() {
-        return importantWayPoints[WAYPOINT_START];
-    }
-
-    @Override
-    public List<WayPoint> getWayPoints() {
-        return wayPoints;
-    }
-
-    @Override
-    public int getNumberOfWayPoints() {
-        return numWayPoints;// wayPoints != null ? wayPoints.size() : 0;
-    }
-
-    /**
-     * Gets the coordinate bounds of this profile. See {@link Bounds} for details.
-     *
-     * @return the bounds of this elevation profile
-     */
-    @Override
-    public Bounds getBounds() {
-        return bounds;
-    }
-
-    /**
-     * Gets a flag indicating whether the associated way points contained
-     * elevation data or not. This is the case if min and max height or both
-     * zero.
-     * 
-     * @return
-     */
-    @Override
-    public boolean hasElevationData() {
-        return minHeight != maxHeight;
-    }
-
-    /**
-     * Visits a way point in order to update statistical values about the given
-     * way point list.
-     */
-    @Override
-    public void visitWayPoint(WayPoint wp) {
-        if (wp.getTime().after(end)) {
-            setEnd(wp);
-        }
-
-        if (wp.getTime().before(start)) {
-            setStart(wp);
-        }
-
-        // update boundaries
-        if (bounds == null) {
-            bounds = new Bounds(wp.getCoor());
-        } else {
-            bounds.extend(wp.getCoor());
-        }
-
-        int ele = (int) ElevationHelper.getElevation(wp);
-
-        if (!isIgnoreZeroHeight() || ele > 0) {
-            if (ele > maxHeight) {
-                setMaxWayPoint(wp);
-            }
-            if (ele < minHeight) {
-                setMinWayPoint(wp);
-            }
-
-            if (ele > lastEle) {
-                gain += ele - lastEle;
-            }
-
-            sumEle += ele;
-            lastEle = ele;
-        }
-    }
-
-    @Override
-    public String toString() {
-        return name; /*"ElevationProfileBase [start=" + getStart() + ", end=" + getEnd()
+	public static final int WAYPOINT_START = 0;
+	public static final int WAYPOINT_END = 1;
+	public static final int WAYPOINT_MIN = 2;
+	public static final int WAYPOINT_MAX = 3;
+
+	private String name;
+	private int minHeight;
+	private int maxHeight;
+	private int avrgHeight;
+	private double dist;
+	private Date start = new Date();
+	private Date end = new Date();
+	private final WayPoint[] importantWayPoints = new WayPoint[4];
+	private IElevationProfile parent;
+	private int sumEle; // temp var for average height
+	private List<WayPoint> wayPoints;
+	private int numWayPoints; // cached value
+	private int gain;
+	private int lastEle;
+	private Bounds bounds;
+
+	private static boolean ignoreZeroHeight = true;
+
+	/**
+	 * Creates a name elevation profile without any way points.
+	 *
+	 * @param name
+	 */
+	public ElevationProfile(String name) {
+		this(name, null, null, 0);
+	}
+
+	/**
+	 * Creates a name elevation profile with a given set of way points.
+	 *
+	 * @param name
+	 *            The name of the profile.
+	 * @param parent
+	 *            The (optional) parent profile.
+	 * @param wayPoints
+	 *            The list containing the way points of the profile.
+	 * @param sliceSize
+	 *            The requested target size of the profile.
+	 */
+	public ElevationProfile(String name, IElevationProfile parent,
+			List<WayPoint> wayPoints, int sliceSize) {
+		super();
+		this.name = name;
+		this.parent = parent;
+
+		setWayPoints(wayPoints);
+	}
+
+	/**
+	 * Checks if zero elevation should be ignored or not.
+	 *
+	 * @return true, if is ignore zero height
+	 */
+	public static boolean isIgnoreZeroHeight() {
+		return ignoreZeroHeight;
+	}
+
+	/**
+	 * Sets the ignore zero height.
+	 *
+	 * @param ignoreZeroHeight the new ignore zero height
+	 */
+	public static void setIgnoreZeroHeight(boolean ignoreZeroHeight) {
+		ElevationProfile.ignoreZeroHeight = ignoreZeroHeight;
+	}
+
+	@Override
+	public void updateElevationData() {
+		updateValues();
+	}
+
+	/**
+	 * Revisits all way points and recomputes the characteristic values like
+	 * min/max elevation.
+	 */
+	protected void updateValues() {
+		if (wayPoints == null)
+			return;
+
+		int n = this.wayPoints.size();
+		if (n == 0)
+			return;
+
+		start = new Date();
+		end = new Date(0L);
+		this.minHeight = Integer.MAX_VALUE;
+		this.maxHeight = Integer.MIN_VALUE;
+		sumEle = 0;
+		gain = 0;
+		lastEle = 0;
+
+		for (WayPoint wayPoint : this.wayPoints) {
+			visitWayPoint(wayPoint);
+		}
+
+		if (this.minHeight == Integer.MAX_VALUE && this.maxHeight == Integer.MIN_VALUE) {
+			// file does not contain elevation data    at all
+			minHeight = 0;
+			maxHeight = 0;
+			setMinWayPoint(wayPoints.get(0));
+			setMaxWayPoint(wayPoints.get(n-1));
+		}
+
+		//if (start.after(end) || start.equals(end)) {
+		// GPX does not contain time stamps -> use sequential order
+		setStart(wayPoints.get(0));
+		setEnd(wayPoints.get(n-1));
+		//}
+
+		avrgHeight = sumEle / n;
+	}
+
+	/**
+	 * Gets the name of the profile.
+	 */
+	@Override
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * Sets the name of the profile.
+	 * @param name The new name of the profile.
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	/**
+	 * Sets the way point with the lowest elevation.
+	 * @param wp The way point instance having the lowest elevation.
+	 */
+	protected void setMinWayPoint(WayPoint wp) {
+		importantWayPoints[WAYPOINT_MIN] = wp;
+		this.minHeight = (int) ElevationHelper.getElevation(wp);
+	}
+
+	/**
+	 * Sets the way point with the highest elevation.
+	 * @param wp The way point instance having the highest elevation.
+	 */
+	protected void setMaxWayPoint(WayPoint wp) {
+		importantWayPoints[WAYPOINT_MAX] = wp;
+		this.maxHeight = (int) ElevationHelper.getElevation(wp);
+	}
+
+	/**
+	 * Sets the average height.
+	 * @param avrgHeight
+	 */
+	protected void setAvrgHeight(int avrgHeight) {
+		this.avrgHeight = avrgHeight;
+	}
+
+	/**
+	 * Sets the very first way point.
+	 * @param wp
+	 */
+	protected void setStart(WayPoint wp) {
+		importantWayPoints[WAYPOINT_START] = wp;
+		this.start = wp.getTime();
+	}
+
+	/**
+	 * Sets the very last way point.
+	 * @param wp
+	 */
+	protected void setEnd(WayPoint wp) {
+		importantWayPoints[WAYPOINT_END] = wp;
+		this.end = wp.getTime();
+	}
+
+	public void setParent(IElevationProfile parent) {
+		this.parent = parent;
+	}
+
+	/**
+	 * Sets the way points of this profile.
+	 *
+	 * @param wayPoints
+	 */
+	public void setWayPoints(List<WayPoint> wayPoints) {
+		if (this.wayPoints != wayPoints) {
+			this.wayPoints = new ArrayList<>(wayPoints);
+			numWayPoints = wayPoints != null ? wayPoints.size() : 0;
+			updateValues();
+
+		}
+	}
+
+	/**
+	 * Checks if the given index is valid or not.
+	 *
+	 * @param index
+	 *            The index to check.
+	 * @return true, if the given index is valid; otherwise false.
+	 */
+	protected boolean checkIndex(int index) {
+		return index >= 0 && index < getNumberOfWayPoints();
+	}
+
+	@Override
+	public int elevationValueAt(int i) {
+		if (checkIndex(i)) {
+			return (int) ElevationHelper.getElevation(wayPoints.get(i));
+		} else {
+			throw new IndexOutOfBoundsException(String.format(
+					"Invalid index: %d, expected 0..%d", i,
+					getNumberOfWayPoints()));
+		}
+	}
+
+	@Override
+	public int getAverageHeight() {
+		return avrgHeight;
+	}
+
+	@Override
+	public List<IElevationProfile> getChildren() {
+		return null;
+	}
+
+	@Override
+	public Date getEnd() {
+		return end;
+	}
+
+	@Override
+	public int getMaxHeight() {
+		return maxHeight;
+	}
+
+	@Override
+	public int getMinHeight() {
+		return minHeight;
+	}
+
+	/**
+	 * Gets the difference between min and max elevation.
+	 *
+	 * @return
+	 */
+	@Override
+	public int getHeightDifference() {
+		return maxHeight - minHeight;
+	}
+
+	/**
+	 * Gets the elevation gain.
+	 *
+	 * @return
+	 */
+	@Override
+	public int getGain() {
+		return gain;
+	}
+
+	@Override
+	public double getDistance() {
+		return dist; // dist is in meters
+	}
+
+	/**
+	 * Sets the distance of the elevation profile.
+	 * @param dist
+	 */
+	protected void setDistance(double dist) {
+		this.dist = dist;
+	}
+
+	/**
+	 * Returns the time between start and end of the track.
+	 * @return
+	 */
+	@Override
+	public long getTimeDifference() {
+		WayPoint wp1 = getStartWayPoint();
+		WayPoint wp2 = getEndWayPoint();
+
+		if (wp1 != null && wp2 != null) {
+			long diff = wp2.getTime().getTime() - wp1.getTime().getTime();
+			return diff;
+		}
+
+		return 0L;
+	}
+
+	@Override
+	public IElevationProfile getParent() {
+		return parent;
+	}
+
+	@Override
+	public Date getStart() {
+		return start;
+	}
+
+	@Override
+	public WayPoint getEndWayPoint() {
+		return importantWayPoints[WAYPOINT_END];
+	}
+
+	@Override
+	public WayPoint getMaxWayPoint() {
+		return importantWayPoints[WAYPOINT_MAX];
+	}
+
+	@Override
+	public WayPoint getMinWayPoint() {
+		return importantWayPoints[WAYPOINT_MIN];
+	}
+
+	@Override
+	public WayPoint getStartWayPoint() {
+		return importantWayPoints[WAYPOINT_START];
+	}
+
+	@Override
+	public List<WayPoint> getWayPoints() {
+		return wayPoints;
+	}
+
+	@Override
+	public int getNumberOfWayPoints() {
+		return numWayPoints;// wayPoints != null ? wayPoints.size() : 0;
+	}
+
+	/**
+	 * Gets the coordinate bounds of this profile. See {@link Bounds} for details.
+	 *
+	 * @return the bounds of this elevation profile
+	 */
+	@Override
+	public Bounds getBounds() {
+		return bounds;
+	}
+
+	/**
+	 * Gets a flag indicating whether the associated way points contained
+	 * elevation data or not. This is the case if min and max height or both
+	 * zero.
+	 *
+	 * @return
+	 */
+	@Override
+	public boolean hasElevationData() {
+		return minHeight != maxHeight;
+	}
+
+	/**
+	 * Visits a way point in order to update statistical values about the given
+	 * way point list.
+	 */
+	@Override
+	public void visitWayPoint(WayPoint wp) {
+		if (wp.getTime().after(end)) {
+			setEnd(wp);
+		}
+
+		if (wp.getTime().before(start)) {
+			setStart(wp);
+		}
+
+		// update boundaries
+		if (bounds == null) {
+			bounds = new Bounds(wp.getCoor());
+		} else {
+			bounds.extend(wp.getCoor());
+		}
+
+		int ele = (int) ElevationHelper.getElevation(wp);
+
+		if (!isIgnoreZeroHeight() || ele > 0) {
+			if (ele > maxHeight) {
+				setMaxWayPoint(wp);
+			}
+			if (ele < minHeight) {
+				setMinWayPoint(wp);
+			}
+
+			if (ele > lastEle) {
+				gain += ele - lastEle;
+			}
+
+			sumEle += ele;
+			lastEle = ele;
+		}
+	}
+
+	@Override
+	public String toString() {
+		return name; /*"ElevationProfileBase [start=" + getStart() + ", end=" + getEnd()
                 + ", minHeight=" + getMinHeight() + ", maxHeight="
                 + getMaxHeight() + "]";*/
-    }
+	}
 }
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/EleVertex.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/EleVertex.java	(revision 30736)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/EleVertex.java	(revision 30737)
@@ -87,5 +87,5 @@
     System.out.println(newP);
 		 */
-		List<EleVertex> res = new ArrayList<EleVertex>();
+		List<EleVertex> res = new ArrayList<>();
 		res.add(new EleVertex(pI, pK, newP));
 		res.add(new EleVertex(pJ, pK, newP));
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/ElevationGridTile.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/ElevationGridTile.java	(revision 30736)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/ElevationGridTile.java	(revision 30737)
@@ -25,151 +25,151 @@
 
 public class ElevationGridTile extends Tile {
-    private final BlockingDeque<EleVertex> toDo = new LinkedBlockingDeque<EleVertex>();
-    private final BlockingDeque<EleVertex> vertices = new LinkedBlockingDeque<EleVertex>();
+	private final BlockingDeque<EleVertex> toDo = new LinkedBlockingDeque<>();
+	private final BlockingDeque<EleVertex> vertices = new LinkedBlockingDeque<>();
 
-    private Bounds box;
+	private Bounds box;
 
-    public ElevationGridTile(TileSource source, int xtile, int ytile, int zoom) {
-        super(source, xtile, ytile, zoom);
+	public ElevationGridTile(TileSource source, int xtile, int ytile, int zoom) {
+		super(source, xtile, ytile, zoom);
 
-        box = tile2Bounds(xtile, ytile, zoom);
-        initQueue();
-    }
+		box = tile2Bounds(xtile, ytile, zoom);
+		initQueue();
+	}
 
-    public ElevationGridTile(TileSource source, int xtile, int ytile, int zoom,
-            BufferedImage image) {
-        super(source, xtile, ytile, zoom, image);
+	public ElevationGridTile(TileSource source, int xtile, int ytile, int zoom,
+			BufferedImage image) {
+		super(source, xtile, ytile, zoom, image);
 
 
-    }
+	}
 
-    @Override
-    public void loadPlaceholderFromCache(TileCache cache) {
-        // TODO Auto-generated method stub
-        super.loadPlaceholderFromCache(cache);
+	@Override
+	public void loadPlaceholderFromCache(TileCache cache) {
+		// TODO Auto-generated method stub
+		super.loadPlaceholderFromCache(cache);
 
-        //System.out.println("loadPlaceholderFromCache");
-    }
+		//System.out.println("loadPlaceholderFromCache");
+	}
 
-    @Override
-    public String getUrl() throws IOException {
-        // TODO Auto-generated method stub
-        return super.getUrl();
-    }
+	@Override
+	public String getUrl() throws IOException {
+		// TODO Auto-generated method stub
+		return super.getUrl();
+	}
 
-    /**
-     * Use {@link ElevationGridTile#paintTile(Graphics2D, MapView, IVertexRenderer)} to render the tile as grid. This method just issues a debug text.
-     */
-    @Override
-    public void paint(Graphics g, int x, int y) {
-        super.paint(g, x, y);
+	/**
+	 * Use {@link ElevationGridTile#paintTile(Graphics2D, MapView, IVertexRenderer)} to render the tile as grid. This method just issues a debug text.
+	 */
+	@Override
+	public void paint(Graphics g, int x, int y) {
+		super.paint(g, x, y);
 
-        //g.drawString(String.format("EGT %d/%d ", getXtile(), getYtile()), x, y);
-        g.drawString(getStatus(), x, y);
-    }
+		//g.drawString(String.format("EGT %d/%d ", getXtile(), getYtile()), x, y);
+		g.drawString(getStatus(), x, y);
+	}
 
-    /**
-     * Paints the vertices of this tile.
-     *
-     * @param g the graphics context
-     * @param mv the map view
-     * @param vertexRenderer the vertex renderer
-     */
-    public void paintTile(Graphics2D g, MapView mv, IVertexRenderer vertexRenderer) {
-        BlockingDeque<EleVertex> list = getVertices();
-        for (EleVertex eleVertex : list) {
-            Point p0 = mv.getPoint(eleVertex.get(0));
-            Point p1 = mv.getPoint(eleVertex.get(1));
-            Point p2 = mv.getPoint(eleVertex.get(2));
-            Triangle shape = new Triangle(p0, p1, p2);
+	/**
+	 * Paints the vertices of this tile.
+	 *
+	 * @param g the graphics context
+	 * @param mv the map view
+	 * @param vertexRenderer the vertex renderer
+	 */
+	public void paintTile(Graphics2D g, MapView mv, IVertexRenderer vertexRenderer) {
+		BlockingDeque<EleVertex> list = getVertices();
+		for (EleVertex eleVertex : list) {
+			Point p0 = mv.getPoint(eleVertex.get(0));
+			Point p1 = mv.getPoint(eleVertex.get(1));
+			Point p2 = mv.getPoint(eleVertex.get(2));
+			Triangle shape = new Triangle(p0, p1, p2);
 
-            // obtain vertex color
-            g.setColor(vertexRenderer.getElevationColor(eleVertex));
-            // TODO: Move to renderer
-            g.fill(shape);
-        }
-    }
+			// obtain vertex color
+			g.setColor(vertexRenderer.getElevationColor(eleVertex));
+			// TODO: Move to renderer
+			g.fill(shape);
+		}
+	}
 
-    @Override
-    public void loadImage(InputStream input) throws IOException {
-        if (isLoaded()) return;
+	@Override
+	public void loadImage(InputStream input) throws IOException {
+		if (isLoaded()) return;
 
-        // TODO: Save
+		// TODO: Save
 
-        // We abuse the loadImage method to render the vertices...
-        //
-        while (toDo.size() > 0) {
-            EleVertex vertex = toDo.poll();
+		// We abuse the loadImage method to render the vertices...
+		//
+		while (toDo.size() > 0) {
+			EleVertex vertex = toDo.poll();
 
-            if (vertex.isFinished()) {
-                vertices.add(vertex);
-            } else {
-                List<EleVertex> newV = vertex.divide();
-                for (EleVertex eleVertex : newV) {
-                    toDo.add(eleVertex);
-                }
-            }
-        }
-        setLoaded(true);
-    }
+			if (vertex.isFinished()) {
+				vertices.add(vertex);
+			} else {
+				List<EleVertex> newV = vertex.divide();
+				for (EleVertex eleVertex : newV) {
+					toDo.add(eleVertex);
+				}
+			}
+		}
+		setLoaded(true);
+	}
 
-    public BlockingDeque<EleVertex> getVertices() {
-        return vertices;
-    }
+	public BlockingDeque<EleVertex> getVertices() {
+		return vertices;
+	}
 
-    /**
-     * See also <a href="http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Tile_bounding_box">OSM Wiki</a>
-     * @param x the x
-     * @param y the y
-     * @param zoom the zoom
-     * @return the bounds
-     */
-    private Bounds tile2Bounds(final int x, final int y, final int zoom) {
-        Bounds bb = new Bounds(
-                new LatLon(source.tileYToLat(y, zoom), source.tileXToLon(x, zoom)),
-                new LatLon(source.tileYToLat(y + 1, zoom), source.tileXToLon(x + 1, zoom)));
+	/**
+	 * See also <a href="http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Tile_bounding_box">OSM Wiki</a>
+	 * @param x the x
+	 * @param y the y
+	 * @param zoom the zoom
+	 * @return the bounds
+	 */
+	private Bounds tile2Bounds(final int x, final int y, final int zoom) {
+		Bounds bb = new Bounds(
+				new LatLon(source.tileYToLat(y, zoom), source.tileXToLon(x, zoom)),
+				new LatLon(source.tileYToLat(y + 1, zoom), source.tileXToLon(x + 1, zoom)));
 
-        return bb;
-    }
+		return bb;
+	}
 
-    /**
-     * Inits the 'todo' queue with the initial vertices.
-     */
-    private void initQueue() {
-        LatLon min = box.getMin();
-        LatLon max = box.getMax();
+	/**
+	 * Inits the 'todo' queue with the initial vertices.
+	 */
+	private void initQueue() {
+		LatLon min = box.getMin();
+		LatLon max = box.getMax();
 
-        // compute missing coordinates
-        LatLon h1 = new LatLon(min.lat(), max.lon());
-        LatLon h2 = new LatLon(max.lat(), min.lon());
+		// compute missing coordinates
+		LatLon h1 = new LatLon(min.lat(), max.lon());
+		LatLon h2 = new LatLon(max.lat(), min.lon());
 
-        double eleMin = ElevationHelper.getSrtmElevation(min);
-        double eleMax = ElevationHelper.getSrtmElevation(max);
+		double eleMin = ElevationHelper.getSrtmElevation(min);
+		double eleMax = ElevationHelper.getSrtmElevation(max);
 
-        // SRTM files present?
-        if (!ElevationHelper.isValidElevation(eleMax) || !ElevationHelper.isValidElevation(eleMin)) {
-            setError(tr("No SRTM data"));
-            return;
-        }
+		// SRTM files present?
+		if (!ElevationHelper.isValidElevation(eleMax) || !ElevationHelper.isValidElevation(eleMin)) {
+			setError(tr("No SRTM data"));
+			return;
+		}
 
-        // compute elevation coords
-        EleCoordinate p0 = new EleCoordinate(min, eleMin);
-        EleCoordinate p1 = new EleCoordinate(h1, ElevationHelper.getSrtmElevation(h1));
-        EleCoordinate p2 = new EleCoordinate(max, eleMax);
-        EleCoordinate p3 = new EleCoordinate(h2, ElevationHelper.getSrtmElevation(h2));
+		// compute elevation coords
+		EleCoordinate p0 = new EleCoordinate(min, eleMin);
+		EleCoordinate p1 = new EleCoordinate(h1, ElevationHelper.getSrtmElevation(h1));
+		EleCoordinate p2 = new EleCoordinate(max, eleMax);
+		EleCoordinate p3 = new EleCoordinate(h2, ElevationHelper.getSrtmElevation(h2));
 
-        // compute initial vertices
-        EleVertex v1 = new EleVertex(p0, p1, p2);
-        EleVertex v2 = new EleVertex(p2, p3, p0);
-        // enqueue vertices
-        toDo.add(v1);
-        toDo.add(v2);
-    }
+		// compute initial vertices
+		EleVertex v1 = new EleVertex(p0, p1, p2);
+		EleVertex v2 = new EleVertex(p2, p3, p0);
+		// enqueue vertices
+		toDo.add(v1);
+		toDo.add(v2);
+	}
 
-    @Override
-    public String toString() {
-        return "ElevationGridTile [box=" + box + ", xtile=" + xtile
-                + ", ytile=" + ytile + "]";
-    }
+	@Override
+	public String toString() {
+		return "ElevationGridTile [box=" + box + ", xtile=" + xtile
+				+ ", ytile=" + ytile + "]";
+	}
 
 
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/DefaultElevationProfileRenderer.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/DefaultElevationProfileRenderer.java	(revision 30736)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/DefaultElevationProfileRenderer.java	(revision 30737)
@@ -33,510 +33,510 @@
 IElevationProfileRenderer {
 
-    private static final int ROUND_RECT_RADIUS = 6;
-    /**
-     * 
-     */
-    private static final int TRIANGLE_BASESIZE = 24;
-    /**
-     * 
-     */
-    private static final int BASIC_WPT_RADIUS = 1;
-    private static final int BIG_WPT_RADIUS = BASIC_WPT_RADIUS * 16;
-
-    // predefined colors
-    private static final Color HIGH_COLOR = ElevationColors.EPMidBlue;
-    private static final Color LOW_COLOR = ElevationColors.EPMidBlue;
-    private static final Color START_COLOR = Color.GREEN;
-    private static final Color END_POINT = Color.RED;
-    private static final Color LEVEL_GAIN_COLOR = Color.GREEN;
-    private static final Color LEVEL_LOSS_COLOR = Color.RED;
-    private static final Color MARKER_POINT = Color.YELLOW;
-    // Predefined radians
-    private static final double RAD_180 = Math.PI;
-    // private static final double RAD_270 = Math.PI * 1.5;
-    private static final double RAD_90 = Math.PI * 0.5;
-
-    private final List<Rectangle> forbiddenRects = new ArrayList<Rectangle>();
-
-    @Override
-    public Color getColorForWaypoint(IElevationProfile profile, WayPoint wpt,
-            ElevationWayPointKind kind) {
-
-        if (wpt == null || profile == null) {
-            System.err.println(String.format(
-                    "Cannot determine color: prof=%s, wpt=%s", profile, wpt));
-            return null;
-        }
-
-        switch (kind) {
-        case Plain:
-            return Color.LIGHT_GRAY;
-        case ElevationLevelLoss:
-            return LEVEL_LOSS_COLOR;
-        case ElevationLevelGain:
-            return LEVEL_GAIN_COLOR;
-        case Highlighted:
-            return Color.ORANGE;
-        case ElevationGainHigh:
-            return Color.getHSBColor(0.3f, 1.0f, 1.0f); // green
-        case ElevationLossHigh:
-            return Color.getHSBColor(0, 1.0f, 1.0f); // red
-        case ElevationGainLow:
-            return Color.getHSBColor(0.3f, 0.5f, 1.0f); // green with low sat
-        case ElevationLossLow:
-            return Color.getHSBColor(0, 0.5f, 1.0f); // red with low sat
-        case FullHour:
-            return MARKER_POINT;
-        case MaxElevation:
-            return HIGH_COLOR;
-        case MinElevation:
-            return LOW_COLOR;
-        case StartPoint:
-            return START_COLOR;
-        case EndPoint:
-            return END_POINT;
-        default:
-            break;
-        }
-
-        throw new RuntimeException("Unknown way point kind: " + kind);
-    }
-
-    @Override
-    public void renderWayPoint(Graphics g, IElevationProfile profile,
-            MapView mv, WayPoint wpt, ElevationWayPointKind kind) {
-
-        CheckParameterUtil.ensureParameterNotNull(g, "graphics");
-        CheckParameterUtil.ensureParameterNotNull(profile, "profile");
-        CheckParameterUtil.ensureParameterNotNull(mv, "map view");
-
-        if (wpt == null) {
-            System.err.println(String.format(
-                    "Cannot paint: mv=%s, prof=%s, wpt=%s", mv, profile, wpt));
-            return;
-        }
-
-        switch (kind) {
-        case MinElevation:
-        case MaxElevation:
-            renderMinMaxPoint(g, profile, mv, wpt, kind);
-            break;
-        case EndPoint:
-        case StartPoint:
-            renderStartEndPoint(g, profile, mv, wpt, kind);
-            break;
-        default:
-            renderRegularWayPoint(g, profile, mv, wpt, kind);
-            break;
-        }
-    }
-
-    @Override
-    public void renderLine(Graphics g, IElevationProfile profile,
-            MapView mv, WayPoint wpt1, WayPoint wpt2, ElevationWayPointKind kind) {
-
-        CheckParameterUtil.ensureParameterNotNull(g, "graphics");
-        CheckParameterUtil.ensureParameterNotNull(profile, "profile");
-        CheckParameterUtil.ensureParameterNotNull(mv, "map view");
-
-        if (wpt1 == null || wpt2 == null) {
-            System.err.println(String.format(
-                    "Cannot paint line: mv=%s, prof=%s, kind = %s", mv, profile, kind));
-            return;
-        }
-
-        // obtain and set color
-        g.setColor(getColorForWaypoint(profile, wpt2, kind));
-
-        // transform to view
-        Point pnt1 = mv.getPoint(wpt1.getEastNorth());
-        Point pnt2 = mv.getPoint(wpt2.getEastNorth());
-
-        // use thick line, if possible
-        if (g instanceof Graphics2D) {
-            Graphics2D g2 = (Graphics2D) g;
-            Stroke oldS = g2.getStroke();
-            try {
-                g2.setStroke(new BasicStroke(3, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
-                g2.drawLine(pnt1.x, pnt1.y, pnt2.x, pnt2.y);
-            } finally {
-                // must be restored; otherwise other layers may using this style, too
-                g2.setStroke(oldS);
-            }
-        } else {
-            // only poor man's graphics
-            g.drawLine(pnt1.x, pnt1.y, pnt2.x, pnt2.y);
-        }
-    }
-
-    /**
-     * Renders a regular way point.
-     * 
-     * @param g
-     *            The graphics context.
-     * @param profile
-     *            The elevation profile.
-     * @param mv
-     *            The map view instance.
-     * @param wpt
-     *            The way point to render.
-     * @param kind
-     *            The way point kind (start, end, max,...).
-     */
-    private void renderRegularWayPoint(Graphics g, IElevationProfile profile,
-            MapView mv, WayPoint wpt, ElevationWayPointKind kind) {
-
-        Color c = getColorForWaypoint(profile, wpt, kind);
-        Point pnt = mv.getPoint(wpt.getEastNorth());
-
-        /* Paint full hour label */
-        if (kind == ElevationWayPointKind.FullHour) {
-            int hour = ElevationHelper.getHourOfWayPoint(wpt);
-            drawLabel(String.format("%02d:00", hour), pnt.x, pnt.y
-                    + g.getFontMetrics().getHeight(), g);
-        }
-
-        /* Paint label for elevation levels */
-        if (kind == ElevationWayPointKind.ElevationLevelGain || kind == ElevationWayPointKind.ElevationLevelLoss) {
-            int ele = ((int) Math.rint(ElevationHelper.getElevation(wpt) / 100.0)) * 100;
-            drawLabelWithTriangle(ElevationHelper.getElevationText(ele), pnt.x, pnt.y
-                    + g.getFontMetrics().getHeight(), g, Color.darkGray, 8,
-                    getColorForWaypoint(profile, wpt, kind),
-                    kind == ElevationWayPointKind.ElevationLevelGain ? TriangleDir.Up : TriangleDir.Down);
-        }
-
-        /* Paint cursor labels */
-        if (kind == ElevationWayPointKind.Highlighted) {
-            drawSphere(g, Color.WHITE, c, pnt.x, pnt.y, BIG_WPT_RADIUS);
-            drawLabel(ElevationHelper.getTimeText(wpt), pnt.x, pnt.y
-                    - g.getFontMetrics().getHeight() - 5, g);
-            drawLabel(ElevationHelper.getElevationText(wpt), pnt.x, pnt.y
-                    + g.getFontMetrics().getHeight() + 5, g);
-        }
-    }
-
-    /**
-     * Renders a min/max point
-     * 
-     * @param g
-     *            The graphics context.
-     * @param profile
-     *            The elevation profile.
-     * @param mv
-     *            The map view instance.
-     * @param wpt
-     *            The way point to render.
-     * @param kind
-     *            The way point kind (start, end, max,...).
-     */
-    private void renderMinMaxPoint(Graphics g, IElevationProfile profile,
-            MapView mv, WayPoint wpt, ElevationWayPointKind kind) {
-
-        Color c = getColorForWaypoint(profile, wpt, kind);
-        int eleH = (int) ElevationHelper.getElevation(wpt);
-        Point pnt = mv.getPoint(wpt.getEastNorth());
-
-        TriangleDir td = TriangleDir.Up;
-
-        switch (kind) {
-        case MaxElevation:
-            td = TriangleDir.Up;
-            break;
-        case MinElevation:
-            td = TriangleDir.Down;
-            break;
-        case EndPoint:
-            td = TriangleDir.Left;
-            break;
-        case StartPoint:
-            td = TriangleDir.Right;
-            break;
-        default:
-            return; // nothing to do
-        }
-
-        drawRegularTriangle(g, c, td, pnt.x, pnt.y,
-                DefaultElevationProfileRenderer.TRIANGLE_BASESIZE);
-
-        drawLabel(ElevationHelper.getElevationText(eleH), pnt.x, pnt.y
-                + g.getFontMetrics().getHeight(), g, c);
-    }
-
-    /**
-     * Draws a regular triangle.
-     * 
-     * @param g
-     *            The graphics context.
-     * @param c
-     *            The fill color of the triangle.
-     * @param dir
-     *            The direction of the triangle
-     * @param x
-     *            The x coordinate in the graphics context.
-     * @param y
-     *            The y coordinate in the graphics context.
-     * @param baseLength
-     *            The side length in pixel of the triangle.
-     */
-    private void drawRegularTriangle(Graphics g, Color c, TriangleDir dir,
-            int x, int y, int baseLength) {
-        if (baseLength < 2)
-            return; // cannot render triangle
-
-        int b2 = baseLength >> 1;
-
-        // coordinates for upwards directed triangle
-        Point p[] = new Point[3];
-
-        for (int i = 0; i < p.length; i++) {
-            p[i] = new Point();
-        }
-
-        p[0].x = -b2;
-        p[0].y = b2;
-
-        p[1].x = b2;
-        p[1].y = b2;
-
-        p[2].x = 0;
-        p[2].y = -b2;
-
-        Triangle t = new Triangle(p[0], p[1], p[2]);
-
-        // rotation angle in rad
-        double theta = 0.0;
-
-        switch (dir) {
-        case Up:
-            theta = 0.0;
-            break;
-        case Down:
-            theta = RAD_180;
-            break;
-        case Left:
-            theta = -RAD_90;
-            break;
-        case Right:
-            theta = RAD_90;
-            break;
-        }
-
-        // rotate shape
-        AffineTransform at = AffineTransform.getRotateInstance(theta);
-        Shape tRot = at.createTransformedShape(t);
-        // translate shape
-        AffineTransform at2 = AffineTransform.getTranslateInstance(x, y);
-        Shape ts = at2.createTransformedShape(tRot);
-
-        // draw the shape
-        Graphics2D g2 = (Graphics2D) g;
-        if (g2 != null) {
-            Color oldC = g2.getColor();
-            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
-                    RenderingHints.VALUE_ANTIALIAS_ON);
-            g2.setColor(c);
-            g2.fill(ts);
-            g2.setColor(oldC);
-        }
-    }
-
-    /**
-     * Renders a start/end point.
-     * 
-     * @param g
-     *            The graphics context.
-     * @param profile
-     *            The elevation profile.
-     * @param mv
-     *            The map view instance.
-     * @param wpt
-     *            The way point to render.
-     * @param kind
-     *            The way point kind (start, end, max,...).
-     */
-    private void renderStartEndPoint(Graphics g, IElevationProfile profile,
-            MapView mv, WayPoint wpt, ElevationWayPointKind kind) {
-
-        Color c = getColorForWaypoint(profile, wpt, kind);
-        Point pnt = mv.getPoint(wpt.getEastNorth());
-        drawSphere(g, Color.WHITE, c, pnt.x, pnt.y, BIG_WPT_RADIUS);
-    }
-
-    /**
-     * Draws a shaded sphere.
-     * 
-     * @param g
-     *            The graphics context.
-     * @param firstCol
-     *            The focus color (usually white).
-     * @param secondCol
-     *            The sphere color.
-     * @param x
-     *            The x coordinate of the sphere center.
-     * @param y
-     *            The y coordinate of the sphere center.
-     * @param radius
-     *            The radius of the sphere.
-     */
-    private void drawSphere(Graphics g, Color firstCol, Color secondCol, int x,
-            int y, int radius) {
-        Point2D center = new Point2D.Float(x, y);
-        Point2D focus = new Point2D.Float(x - (radius * 0.6f), y
-                - (radius * 0.6f));
-        float[] dist = { 0.1f, 0.2f, 1.0f };
-        Color[] colors = { firstCol, secondCol, Color.DARK_GRAY };
-        RadialGradientPaint p = new RadialGradientPaint(center, radius, focus,
-                dist, colors, CycleMethod.NO_CYCLE);
-
-        Graphics2D g2 = (Graphics2D) g;
-        if (g2 != null) {
-            g2.setPaint(p);
-            int r2 = radius / 2;
-            g2.fillOval(x - r2, y - r2, radius, radius);
-        }
-    }
-
-    /**
-     * Draws a label within a filled rounded rectangle with standard gradient colors.
-     * 
-     * @param s
-     *            The text to draw.
-     * @param x
-     *            The x coordinate of the label.
-     * @param y
-     *            The y coordinate of the label.
-     * @param g
-     *            The graphics context.
-     */
-    private void drawLabel(String s, int x, int y, Graphics g) {
-        drawLabel(s, x, y, g, Color.GRAY);
-    }
-
-    /**
-     * Draws a label within a filled rounded rectangle with the specified second gradient color (first color is <tt>Color.WHITE<tt>).
-     * 
-     * @param s
-     *            The text to draw.
-     * @param x
-     *            The x coordinate of the label.
-     * @param y
-     *            The y coordinate of the label.
-     * @param g
-     *            The graphics context.
-     * @param secondGradColor
-     *            The second color of the gradient.
-     */
-    private void drawLabel(String s, int x, int y, Graphics g,
-            Color secondGradColor) {
-        Graphics2D g2d = (Graphics2D) g;
-
-        int width = g.getFontMetrics(g.getFont()).stringWidth(s) + 10;
-        int height = g.getFont().getSize() + g.getFontMetrics().getLeading()
-                + 5;
-
-        Rectangle r = new Rectangle(x - (width / 2), y - (height / 2), width,
-                height);
-
-        if (isForbiddenArea(r)) {
-            return; // no space left, skip this label
-        }
-
-        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
-                RenderingHints.VALUE_ANTIALIAS_ON);
-        GradientPaint gradient = new GradientPaint(x, y, Color.WHITE, x, y
-                + (height / 2), secondGradColor, false);
-        g2d.setPaint(gradient);
-
-        g2d.fillRoundRect(r.x, r.y, r.width, r.height, ROUND_RECT_RADIUS,
-                ROUND_RECT_RADIUS);
-
-        g2d.setColor(Color.BLACK);
-
-        g2d.drawRoundRect(r.x, r.y, r.width, r.height, ROUND_RECT_RADIUS,
-                ROUND_RECT_RADIUS);
-        g2d.drawString(s, x - (width / 2) + 5, y + (height / 2) - 3);
-
-        forbiddenRects.add(r);
-    }
-
-    /**
-     * Draws a label with an additional triangle on the left side.
-     * 
-     * @param s
-     *            The text to draw.
-     * @param x
-     *            The x coordinate of the label.
-     * @param y
-     *            The y coordinate of the label.
-     * @param g
-     *            The graphics context.
-     * @param secondGradColor
-     *            The second color of the gradient.
-     * @param baseLength
-     *            The base length of the triangle in pixels.
-     * @param triangleColor
-     *            The color of the triangle.
-     * @param triangleDir
-     *            The direction of the triangle.
-     */
-    private void drawLabelWithTriangle(String s, int x, int y, Graphics g,
-            Color secondGradColor, int baseLength, Color triangleColor,
-            TriangleDir triangleDir) {
-        Graphics2D g2d = (Graphics2D) g;
-
-        int width = g.getFontMetrics(g.getFont()).stringWidth(s) + 10 + baseLength + 5;
-        int height = g.getFont().getSize() + g.getFontMetrics().getLeading() + 5;
-
-        Rectangle r = new Rectangle(x - (width / 2), y - (height / 2), width, height);
-
-        if (isForbiddenArea(r)) {
-            return; // no space left, skip this label
-        }
-
-        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
-                RenderingHints.VALUE_ANTIALIAS_ON);
-        GradientPaint gradient = new GradientPaint(x, y, Color.WHITE, x, y
-                + (height / 2), secondGradColor, false);
-        g2d.setPaint(gradient);
-
-        g2d.fillRoundRect(r.x, r.y, r.width, r.height, ROUND_RECT_RADIUS,
-                ROUND_RECT_RADIUS);
-
-        g2d.setColor(Color.BLACK);
-
-        g2d.drawRoundRect(r.x, r.y, r.width, r.height, ROUND_RECT_RADIUS,
-                ROUND_RECT_RADIUS);
-        g2d.drawString(s, x - (width / 2) + 8 + baseLength, y + (height / 2) - 3);
-        drawRegularTriangle(g2d, triangleColor, triangleDir, r.x + baseLength,
-                r.y + baseLength, baseLength);
-
-        forbiddenRects.add(r);
-    }
-
-    /**
-     * Checks, if the rectangle has been 'reserved' by an previous draw action.
-     * 
-     * @param r
-     *            The area to check for.
-     * @return true, if area is already occupied by another rectangle.
-     */
-    private boolean isForbiddenArea(Rectangle r) {
-
-        for (Rectangle rTest : forbiddenRects) {
-            if (r.intersects(rTest))
-                return true;
-        }
-        return false;
-    }
-
-    @Override
-    public void beginRendering() {
-        forbiddenRects.clear();
-    }
-
-    @Override
-    public void finishRendering() {
-        // nothing to do currently
-    }
+	private static final int ROUND_RECT_RADIUS = 6;
+	/**
+	 *
+	 */
+	private static final int TRIANGLE_BASESIZE = 24;
+	/**
+	 *
+	 */
+	private static final int BASIC_WPT_RADIUS = 1;
+	private static final int BIG_WPT_RADIUS = BASIC_WPT_RADIUS * 16;
+
+	// predefined colors
+	private static final Color HIGH_COLOR = ElevationColors.EPMidBlue;
+	private static final Color LOW_COLOR = ElevationColors.EPMidBlue;
+	private static final Color START_COLOR = Color.GREEN;
+	private static final Color END_POINT = Color.RED;
+	private static final Color LEVEL_GAIN_COLOR = Color.GREEN;
+	private static final Color LEVEL_LOSS_COLOR = Color.RED;
+	private static final Color MARKER_POINT = Color.YELLOW;
+	// Predefined radians
+	private static final double RAD_180 = Math.PI;
+	// private static final double RAD_270 = Math.PI * 1.5;
+	private static final double RAD_90 = Math.PI * 0.5;
+
+	private final List<Rectangle> forbiddenRects = new ArrayList<>();
+
+	@Override
+	public Color getColorForWaypoint(IElevationProfile profile, WayPoint wpt,
+			ElevationWayPointKind kind) {
+
+		if (wpt == null || profile == null) {
+			System.err.println(String.format(
+					"Cannot determine color: prof=%s, wpt=%s", profile, wpt));
+			return null;
+		}
+
+		switch (kind) {
+		case Plain:
+			return Color.LIGHT_GRAY;
+		case ElevationLevelLoss:
+			return LEVEL_LOSS_COLOR;
+		case ElevationLevelGain:
+			return LEVEL_GAIN_COLOR;
+		case Highlighted:
+			return Color.ORANGE;
+		case ElevationGainHigh:
+			return Color.getHSBColor(0.3f, 1.0f, 1.0f); // green
+		case ElevationLossHigh:
+			return Color.getHSBColor(0, 1.0f, 1.0f); // red
+		case ElevationGainLow:
+			return Color.getHSBColor(0.3f, 0.5f, 1.0f); // green with low sat
+		case ElevationLossLow:
+			return Color.getHSBColor(0, 0.5f, 1.0f); // red with low sat
+		case FullHour:
+			return MARKER_POINT;
+		case MaxElevation:
+			return HIGH_COLOR;
+		case MinElevation:
+			return LOW_COLOR;
+		case StartPoint:
+			return START_COLOR;
+		case EndPoint:
+			return END_POINT;
+		default:
+			break;
+		}
+
+		throw new RuntimeException("Unknown way point kind: " + kind);
+	}
+
+	@Override
+	public void renderWayPoint(Graphics g, IElevationProfile profile,
+			MapView mv, WayPoint wpt, ElevationWayPointKind kind) {
+
+		CheckParameterUtil.ensureParameterNotNull(g, "graphics");
+		CheckParameterUtil.ensureParameterNotNull(profile, "profile");
+		CheckParameterUtil.ensureParameterNotNull(mv, "map view");
+
+		if (wpt == null) {
+			System.err.println(String.format(
+					"Cannot paint: mv=%s, prof=%s, wpt=%s", mv, profile, wpt));
+			return;
+		}
+
+		switch (kind) {
+		case MinElevation:
+		case MaxElevation:
+			renderMinMaxPoint(g, profile, mv, wpt, kind);
+			break;
+		case EndPoint:
+		case StartPoint:
+			renderStartEndPoint(g, profile, mv, wpt, kind);
+			break;
+		default:
+			renderRegularWayPoint(g, profile, mv, wpt, kind);
+			break;
+		}
+	}
+
+	@Override
+	public void renderLine(Graphics g, IElevationProfile profile,
+			MapView mv, WayPoint wpt1, WayPoint wpt2, ElevationWayPointKind kind) {
+
+		CheckParameterUtil.ensureParameterNotNull(g, "graphics");
+		CheckParameterUtil.ensureParameterNotNull(profile, "profile");
+		CheckParameterUtil.ensureParameterNotNull(mv, "map view");
+
+		if (wpt1 == null || wpt2 == null) {
+			System.err.println(String.format(
+					"Cannot paint line: mv=%s, prof=%s, kind = %s", mv, profile, kind));
+			return;
+		}
+
+		// obtain and set color
+		g.setColor(getColorForWaypoint(profile, wpt2, kind));
+
+		// transform to view
+		Point pnt1 = mv.getPoint(wpt1.getEastNorth());
+		Point pnt2 = mv.getPoint(wpt2.getEastNorth());
+
+		// use thick line, if possible
+		if (g instanceof Graphics2D) {
+			Graphics2D g2 = (Graphics2D) g;
+			Stroke oldS = g2.getStroke();
+			try {
+				g2.setStroke(new BasicStroke(3, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
+				g2.drawLine(pnt1.x, pnt1.y, pnt2.x, pnt2.y);
+			} finally {
+				// must be restored; otherwise other layers may using this style, too
+				g2.setStroke(oldS);
+			}
+		} else {
+			// only poor man's graphics
+			g.drawLine(pnt1.x, pnt1.y, pnt2.x, pnt2.y);
+		}
+	}
+
+	/**
+	 * Renders a regular way point.
+	 *
+	 * @param g
+	 *            The graphics context.
+	 * @param profile
+	 *            The elevation profile.
+	 * @param mv
+	 *            The map view instance.
+	 * @param wpt
+	 *            The way point to render.
+	 * @param kind
+	 *            The way point kind (start, end, max,...).
+	 */
+	private void renderRegularWayPoint(Graphics g, IElevationProfile profile,
+			MapView mv, WayPoint wpt, ElevationWayPointKind kind) {
+
+		Color c = getColorForWaypoint(profile, wpt, kind);
+		Point pnt = mv.getPoint(wpt.getEastNorth());
+
+		/* Paint full hour label */
+		if (kind == ElevationWayPointKind.FullHour) {
+			int hour = ElevationHelper.getHourOfWayPoint(wpt);
+			drawLabel(String.format("%02d:00", hour), pnt.x, pnt.y
+					+ g.getFontMetrics().getHeight(), g);
+		}
+
+		/* Paint label for elevation levels */
+		if (kind == ElevationWayPointKind.ElevationLevelGain || kind == ElevationWayPointKind.ElevationLevelLoss) {
+			int ele = ((int) Math.rint(ElevationHelper.getElevation(wpt) / 100.0)) * 100;
+			drawLabelWithTriangle(ElevationHelper.getElevationText(ele), pnt.x, pnt.y
+					+ g.getFontMetrics().getHeight(), g, Color.darkGray, 8,
+					getColorForWaypoint(profile, wpt, kind),
+					kind == ElevationWayPointKind.ElevationLevelGain ? TriangleDir.Up : TriangleDir.Down);
+		}
+
+		/* Paint cursor labels */
+		if (kind == ElevationWayPointKind.Highlighted) {
+			drawSphere(g, Color.WHITE, c, pnt.x, pnt.y, BIG_WPT_RADIUS);
+			drawLabel(ElevationHelper.getTimeText(wpt), pnt.x, pnt.y
+					- g.getFontMetrics().getHeight() - 5, g);
+			drawLabel(ElevationHelper.getElevationText(wpt), pnt.x, pnt.y
+					+ g.getFontMetrics().getHeight() + 5, g);
+		}
+	}
+
+	/**
+	 * Renders a min/max point
+	 *
+	 * @param g
+	 *            The graphics context.
+	 * @param profile
+	 *            The elevation profile.
+	 * @param mv
+	 *            The map view instance.
+	 * @param wpt
+	 *            The way point to render.
+	 * @param kind
+	 *            The way point kind (start, end, max,...).
+	 */
+	private void renderMinMaxPoint(Graphics g, IElevationProfile profile,
+			MapView mv, WayPoint wpt, ElevationWayPointKind kind) {
+
+		Color c = getColorForWaypoint(profile, wpt, kind);
+		int eleH = (int) ElevationHelper.getElevation(wpt);
+		Point pnt = mv.getPoint(wpt.getEastNorth());
+
+		TriangleDir td = TriangleDir.Up;
+
+		switch (kind) {
+		case MaxElevation:
+			td = TriangleDir.Up;
+			break;
+		case MinElevation:
+			td = TriangleDir.Down;
+			break;
+		case EndPoint:
+			td = TriangleDir.Left;
+			break;
+		case StartPoint:
+			td = TriangleDir.Right;
+			break;
+		default:
+			return; // nothing to do
+		}
+
+		drawRegularTriangle(g, c, td, pnt.x, pnt.y,
+				DefaultElevationProfileRenderer.TRIANGLE_BASESIZE);
+
+		drawLabel(ElevationHelper.getElevationText(eleH), pnt.x, pnt.y
+				+ g.getFontMetrics().getHeight(), g, c);
+	}
+
+	/**
+	 * Draws a regular triangle.
+	 *
+	 * @param g
+	 *            The graphics context.
+	 * @param c
+	 *            The fill color of the triangle.
+	 * @param dir
+	 *            The direction of the triangle
+	 * @param x
+	 *            The x coordinate in the graphics context.
+	 * @param y
+	 *            The y coordinate in the graphics context.
+	 * @param baseLength
+	 *            The side length in pixel of the triangle.
+	 */
+	private void drawRegularTriangle(Graphics g, Color c, TriangleDir dir,
+			int x, int y, int baseLength) {
+		if (baseLength < 2)
+			return; // cannot render triangle
+
+		int b2 = baseLength >> 1;
+
+		// coordinates for upwards directed triangle
+		Point p[] = new Point[3];
+
+		for (int i = 0; i < p.length; i++) {
+			p[i] = new Point();
+		}
+
+		p[0].x = -b2;
+		p[0].y = b2;
+
+		p[1].x = b2;
+		p[1].y = b2;
+
+		p[2].x = 0;
+		p[2].y = -b2;
+
+		Triangle t = new Triangle(p[0], p[1], p[2]);
+
+		// rotation angle in rad
+		double theta = 0.0;
+
+		switch (dir) {
+		case Up:
+			theta = 0.0;
+			break;
+		case Down:
+			theta = RAD_180;
+			break;
+		case Left:
+			theta = -RAD_90;
+			break;
+		case Right:
+			theta = RAD_90;
+			break;
+		}
+
+		// rotate shape
+		AffineTransform at = AffineTransform.getRotateInstance(theta);
+		Shape tRot = at.createTransformedShape(t);
+		// translate shape
+		AffineTransform at2 = AffineTransform.getTranslateInstance(x, y);
+		Shape ts = at2.createTransformedShape(tRot);
+
+		// draw the shape
+		Graphics2D g2 = (Graphics2D) g;
+		if (g2 != null) {
+			Color oldC = g2.getColor();
+			g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+					RenderingHints.VALUE_ANTIALIAS_ON);
+			g2.setColor(c);
+			g2.fill(ts);
+			g2.setColor(oldC);
+		}
+	}
+
+	/**
+	 * Renders a start/end point.
+	 *
+	 * @param g
+	 *            The graphics context.
+	 * @param profile
+	 *            The elevation profile.
+	 * @param mv
+	 *            The map view instance.
+	 * @param wpt
+	 *            The way point to render.
+	 * @param kind
+	 *            The way point kind (start, end, max,...).
+	 */
+	private void renderStartEndPoint(Graphics g, IElevationProfile profile,
+			MapView mv, WayPoint wpt, ElevationWayPointKind kind) {
+
+		Color c = getColorForWaypoint(profile, wpt, kind);
+		Point pnt = mv.getPoint(wpt.getEastNorth());
+		drawSphere(g, Color.WHITE, c, pnt.x, pnt.y, BIG_WPT_RADIUS);
+	}
+
+	/**
+	 * Draws a shaded sphere.
+	 *
+	 * @param g
+	 *            The graphics context.
+	 * @param firstCol
+	 *            The focus color (usually white).
+	 * @param secondCol
+	 *            The sphere color.
+	 * @param x
+	 *            The x coordinate of the sphere center.
+	 * @param y
+	 *            The y coordinate of the sphere center.
+	 * @param radius
+	 *            The radius of the sphere.
+	 */
+	private void drawSphere(Graphics g, Color firstCol, Color secondCol, int x,
+			int y, int radius) {
+		Point2D center = new Point2D.Float(x, y);
+		Point2D focus = new Point2D.Float(x - (radius * 0.6f), y
+				- (radius * 0.6f));
+		float[] dist = { 0.1f, 0.2f, 1.0f };
+		Color[] colors = { firstCol, secondCol, Color.DARK_GRAY };
+		RadialGradientPaint p = new RadialGradientPaint(center, radius, focus,
+				dist, colors, CycleMethod.NO_CYCLE);
+
+		Graphics2D g2 = (Graphics2D) g;
+		if (g2 != null) {
+			g2.setPaint(p);
+			int r2 = radius / 2;
+			g2.fillOval(x - r2, y - r2, radius, radius);
+		}
+	}
+
+	/**
+	 * Draws a label within a filled rounded rectangle with standard gradient colors.
+	 *
+	 * @param s
+	 *            The text to draw.
+	 * @param x
+	 *            The x coordinate of the label.
+	 * @param y
+	 *            The y coordinate of the label.
+	 * @param g
+	 *            The graphics context.
+	 */
+	private void drawLabel(String s, int x, int y, Graphics g) {
+		drawLabel(s, x, y, g, Color.GRAY);
+	}
+
+	/**
+	 * Draws a label within a filled rounded rectangle with the specified second gradient color (first color is <tt>Color.WHITE<tt>).
+	 *
+	 * @param s
+	 *            The text to draw.
+	 * @param x
+	 *            The x coordinate of the label.
+	 * @param y
+	 *            The y coordinate of the label.
+	 * @param g
+	 *            The graphics context.
+	 * @param secondGradColor
+	 *            The second color of the gradient.
+	 */
+	private void drawLabel(String s, int x, int y, Graphics g,
+			Color secondGradColor) {
+		Graphics2D g2d = (Graphics2D) g;
+
+		int width = g.getFontMetrics(g.getFont()).stringWidth(s) + 10;
+		int height = g.getFont().getSize() + g.getFontMetrics().getLeading()
+				+ 5;
+
+		Rectangle r = new Rectangle(x - (width / 2), y - (height / 2), width,
+				height);
+
+		if (isForbiddenArea(r)) {
+			return; // no space left, skip this label
+		}
+
+		g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+				RenderingHints.VALUE_ANTIALIAS_ON);
+		GradientPaint gradient = new GradientPaint(x, y, Color.WHITE, x, y
+				+ (height / 2), secondGradColor, false);
+		g2d.setPaint(gradient);
+
+		g2d.fillRoundRect(r.x, r.y, r.width, r.height, ROUND_RECT_RADIUS,
+				ROUND_RECT_RADIUS);
+
+		g2d.setColor(Color.BLACK);
+
+		g2d.drawRoundRect(r.x, r.y, r.width, r.height, ROUND_RECT_RADIUS,
+				ROUND_RECT_RADIUS);
+		g2d.drawString(s, x - (width / 2) + 5, y + (height / 2) - 3);
+
+		forbiddenRects.add(r);
+	}
+
+	/**
+	 * Draws a label with an additional triangle on the left side.
+	 *
+	 * @param s
+	 *            The text to draw.
+	 * @param x
+	 *            The x coordinate of the label.
+	 * @param y
+	 *            The y coordinate of the label.
+	 * @param g
+	 *            The graphics context.
+	 * @param secondGradColor
+	 *            The second color of the gradient.
+	 * @param baseLength
+	 *            The base length of the triangle in pixels.
+	 * @param triangleColor
+	 *            The color of the triangle.
+	 * @param triangleDir
+	 *            The direction of the triangle.
+	 */
+	private void drawLabelWithTriangle(String s, int x, int y, Graphics g,
+			Color secondGradColor, int baseLength, Color triangleColor,
+			TriangleDir triangleDir) {
+		Graphics2D g2d = (Graphics2D) g;
+
+		int width = g.getFontMetrics(g.getFont()).stringWidth(s) + 10 + baseLength + 5;
+		int height = g.getFont().getSize() + g.getFontMetrics().getLeading() + 5;
+
+		Rectangle r = new Rectangle(x - (width / 2), y - (height / 2), width, height);
+
+		if (isForbiddenArea(r)) {
+			return; // no space left, skip this label
+		}
+
+		g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+				RenderingHints.VALUE_ANTIALIAS_ON);
+		GradientPaint gradient = new GradientPaint(x, y, Color.WHITE, x, y
+				+ (height / 2), secondGradColor, false);
+		g2d.setPaint(gradient);
+
+		g2d.fillRoundRect(r.x, r.y, r.width, r.height, ROUND_RECT_RADIUS,
+				ROUND_RECT_RADIUS);
+
+		g2d.setColor(Color.BLACK);
+
+		g2d.drawRoundRect(r.x, r.y, r.width, r.height, ROUND_RECT_RADIUS,
+				ROUND_RECT_RADIUS);
+		g2d.drawString(s, x - (width / 2) + 8 + baseLength, y + (height / 2) - 3);
+		drawRegularTriangle(g2d, triangleColor, triangleDir, r.x + baseLength,
+				r.y + baseLength, baseLength);
+
+		forbiddenRects.add(r);
+	}
+
+	/**
+	 * Checks, if the rectangle has been 'reserved' by an previous draw action.
+	 *
+	 * @param r
+	 *            The area to check for.
+	 * @return true, if area is already occupied by another rectangle.
+	 */
+	private boolean isForbiddenArea(Rectangle r) {
+
+		for (Rectangle rTest : forbiddenRects) {
+			if (r.intersects(rTest))
+				return true;
+		}
+		return false;
+	}
+
+	@Override
+	public void beginRendering() {
+		forbiddenRects.clear();
+	}
+
+	@Override
+	public void finishRendering() {
+		// nothing to do currently
+	}
 
 
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileDialog.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileDialog.java	(revision 30737)
@@ -47,415 +47,415 @@
 public class ElevationProfileDialog extends ToggleDialog implements LayerChangeListener, ComponentListener {
 
-    private static final String EMPTY_DATA_STRING = "-";
-    private static final long serialVersionUID = -868463893732535577L;
-    /* Elevation profile instance */
-    private IElevationModel model;
-    /* GPX data */
-    private GpxLayer activeLayer = null;
-    private final HashMap<GpxLayer, ElevationModel> layerMap = new HashMap<GpxLayer, ElevationModel>();
-
-    /* UI elements */
-    private final ElevationProfilePanel profPanel;
-    private final JLabel minHeightLabel;
-    private final JLabel maxHeightLabel;
-    private final JLabel avrgHeightLabel;
-    private final JLabel elevationGainLabel;
-    private final JLabel totalTimeLabel;
-    private final JLabel distLabel;
-    private final JComboBox<IElevationProfile> trackCombo;
-    private final JButton zoomButton;
-
-    /* Listener to the elevation model */
-    private final List<IElevationModelListener> listeners = new ArrayList<IElevationModelListener>();
-
-    /**
-     * Corresponding layer instance within map view.
-     */
-    private ElevationProfileLayer profileLayer;
-
-    /**
-     * Default constructor
-     */
-    public ElevationProfileDialog() {
-        this(tr("Elevation Profile"), "elevation",
-                tr("Open the elevation profile window."), null, 200, true);
-    }
-
-    /**
-     * Constructor (see below)
-     */
-    public ElevationProfileDialog(String name, String iconName, String tooltip,
-            Shortcut shortcut, int preferredHeight) {
-        this(name, iconName, tooltip, shortcut, preferredHeight, false);
-    }
-
-    /**
-     * Constructor
-     * 
-     * @param name
-     *            the name of the dialog
-     * @param iconName
-     *            the name of the icon to be displayed
-     * @param tooltip
-     *            the tool tip
-     * @param shortcut
-     *            the shortcut
-     * @param preferredHeight
-     *            the preferred height for the dialog
-     * @param defShow
-     *            if the dialog should be shown by default, if there is no
-     *            preference
-     */
-    public ElevationProfileDialog(String name, String iconName, String tooltip,
-            Shortcut shortcut, int preferredHeight, boolean defShow) {
-        super(name, iconName, tooltip, shortcut, preferredHeight, defShow);
-
-        // create model
-        model = new ElevationModel();
-
-        // top panel
-        JPanel rootPanel = new JPanel();
-        GridLayout gridLayout1 = new GridLayout(2, 1);
-        rootPanel.setLayout(gridLayout1);
-
-        // statistics panel
-        JPanel statPanel = new JPanel();
-        GridLayout gridLayoutStat = new GridLayout(2, 6);
-        statPanel.setLayout(gridLayoutStat);
-
-        // first row: Headlines with bold font
-        String[] labels = new String[]{tr("Min"), tr("Avrg"), tr("Max"), tr("Dist"), tr("Gain"), tr("Time")};
-        for (int i = 0; i < labels.length; i++) {
-            JLabel lbl = new JLabel(labels[i]);
-            lbl.setFont(getFont().deriveFont(Font.BOLD));
-            statPanel.add(lbl);
-        }
-
-        // second row
-        minHeightLabel = new JLabel("0 m");
-        statPanel.add(minHeightLabel);
-        avrgHeightLabel = new JLabel("0 m");
-        statPanel.add(avrgHeightLabel);
-        maxHeightLabel = new JLabel("0 m");
-        statPanel.add(maxHeightLabel);
-        distLabel = new JLabel("0 km");
-        statPanel.add(distLabel);
-        elevationGainLabel = new JLabel("0 m");
-        statPanel.add(elevationGainLabel);
-        totalTimeLabel = new JLabel("0");
-        statPanel.add(totalTimeLabel);
-
-        // track selection panel
-        JPanel trackPanel = new JPanel();
-        FlowLayout fl = new FlowLayout(FlowLayout.LEFT);
-        trackPanel.setLayout(fl);
-
-        JLabel lbTrack = new JLabel(tr("Tracks"));
-        lbTrack.setFont(getFont().deriveFont(Font.BOLD));
-        trackPanel.add(lbTrack);
-
-        zoomButton = new JButton(tr("Zoom"));
-        zoomButton.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent arg0) {
-                if (model != null) {
-                    IElevationProfile profile = model.getCurrentProfile();
-                    if (profile != null) {
-                        Main.map.mapView.zoomTo(profile.getBounds());
-                    }
-                }
-
-            }
-        });
-        zoomButton.setEnabled(false);
-
-        trackCombo = new JComboBox<>(new TrackModel());
-        trackCombo.setPreferredSize(new Dimension(200, 24)); // HACK!
-        trackCombo.setEnabled(false); // we have no model on startup
-
-        trackPanel.add(trackCombo);
-        trackPanel.add(zoomButton);
-
-        // assemble root panel
-        rootPanel.add(statPanel);
-        rootPanel.add(trackPanel);
-
-        JPanel mainPanel = new JPanel(new BorderLayout());
-        mainPanel.add(rootPanel, BorderLayout.PAGE_END);
-
-        // add chart component
-        profPanel = new ElevationProfilePanel(null);
-        mainPanel.add(profPanel, BorderLayout.CENTER);
-        profPanel.addComponentListener(this);
-
-        createLayout(mainPanel, true, null);
-    }
-
-    @Override
-    public void showNotify() {
-        MapView.addLayerChangeListener(this);
-        if (Main.isDisplayingMapView()) {
-            Layer layer = Main.map.mapView.getActiveLayer();
-            if (layer instanceof GpxLayer) {
-                setActiveLayer((GpxLayer) layer);
-            }
-        }
-    }
-
-    @Override
-    public void hideNotify() {
-        MapView.removeLayerChangeListener(this);
-    }
-
-    /**
-     * Gets the elevation model instance.
-     * @return
-     */
-    public IElevationModel getModel() {
-        return model;
-    }
-
-    /**
-     * Sets the elevation model instance.
-     * @param model The new model.
-     */
-    public void setModel(IElevationModel model) {
-        if (this.model != model) {
-            this.model = model;
-            profPanel.setElevationModel(model);
-            updateView();
-        }
-    }
-
-    /**
-     * Gets the associated layer instance of the elevation profile.
-     * @return
-     */
-    public ElevationProfileLayer getProfileLayer() {
-        return profileLayer;
-    }
-
-    /**
-     * Sets the associated layer instance of the elevation profile.
-     * @param profileLayer The elevation profile layer.
-     */
-    public void setProfileLayer(ElevationProfileLayer profileLayer) {
-        if (this.profileLayer != profileLayer) {
-            if (this.profileLayer != null) {
-                profPanel.removeSelectionListener(this.profileLayer);
-            }
-            this.profileLayer = profileLayer;
-            profPanel.addSelectionListener(this.profileLayer);
-        }
-    }
-
-    /**
-     * Refreshes the dialog when model data have changed and notifies clients
-     * that the model has changed.
-     */
-    private void updateView() {
-        if (model == null) {
-            disableView();
-            return;
-        }
-
-        IElevationProfile profile = model.getCurrentProfile();
-        if (profile != null) {
-            // Show name of profile in title
-            setTitle(String.format("%s: %s", tr("Elevation Profile"), profile.getName()));
-
-            if (profile.hasElevationData()) {
-                // Show elevation data
-                minHeightLabel.setText(
-                        ElevationHelper.getElevationText(profile.getMinHeight()));
-                maxHeightLabel.setText(
-                        ElevationHelper.getElevationText(profile.getMaxHeight()));
-                avrgHeightLabel.setText(
-                        ElevationHelper.getElevationText(profile.getAverageHeight()));
-                elevationGainLabel.setText(
-                        ElevationHelper.getElevationText(profile.getGain()));
-            }
-
-            // compute values for time and distance
-            long diff = profile.getTimeDifference();
-            long minutes = diff / (1000 * 60);
-            long hours = minutes / 60;
-            minutes = minutes % 60;
-
-            double dist = profile.getDistance();
-
-            totalTimeLabel.setText(String.format("%d:%02d h", hours, minutes));
-            distLabel.setText(NavigatableComponent.getSystemOfMeasurement().getDistText(dist));
-            trackCombo.setEnabled(model.profileCount() > 1);
-            trackCombo.setModel(new TrackModel());
-            zoomButton.setEnabled(true);
-        } else { // no elevation data, -> switch back to empty view
-            disableView();
-        }
-
-        fireModelChanged();
-        repaint();
-    }
-
-    private void disableView() {
-        setTitle(String.format("%s: (No data)", tr("Elevation Profile")));
-
-        minHeightLabel.setText(EMPTY_DATA_STRING);
-        maxHeightLabel.setText(EMPTY_DATA_STRING);
-        avrgHeightLabel.setText(EMPTY_DATA_STRING);
-        elevationGainLabel.setText(EMPTY_DATA_STRING);
-        totalTimeLabel.setText(EMPTY_DATA_STRING);
-        distLabel.setText(EMPTY_DATA_STRING);
-        trackCombo.setEnabled(false);
-        zoomButton.setEnabled(false);
-    }
-
-    /**
-     * Fires the 'model changed' event to all listeners.
-     */
-    protected void fireModelChanged() {
-        for (IElevationModelListener listener : listeners) {
-            listener.elevationProfileChanged(getModel().getCurrentProfile());
-        }
-    }
-
-    /**
-     * Adds a model listener to this instance.
-     * 
-     * @param listener
-     *            The listener to add.
-     */
-    public void addModelListener(IElevationModelListener listener) {
-        this.listeners.add(listener);
-    }
-
-    /**
-     * Removes a model listener from this instance.
-     * 
-     * @param listener
-     *            The listener to remove.
-     */
-    public void removeModelListener(IElevationModelListener listener) {
-        this.listeners.remove(listener);
-    }
-
-    /**
-     * Removes all listeners from this instance.
-     */
-    public void removeAllListeners() {
-        this.listeners.clear();
-    }
-
-    @Override
-    public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-        if (newLayer instanceof GpxLayer) {
-            setActiveLayer((GpxLayer) newLayer);
-        }
-    }
-
-    private void setActiveLayer(GpxLayer newLayer) {
-        if (activeLayer != newLayer) {
-            activeLayer = newLayer;
-
-            // layer does not exist -> create
-            if (!layerMap.containsKey(newLayer)) {
-                GpxData gpxData = newLayer.data;
-                ElevationModel newEM = new ElevationModel(newLayer.getName(),
-                        gpxData);
-                layerMap.put(newLayer, newEM);
-            }
-
-            ElevationModel em = layerMap.get(newLayer);
-            setModel(em);
-        }
-    }
-
-    @Override
-    public void layerAdded(Layer newLayer) {
-        if (newLayer instanceof GpxLayer) {
-            GpxLayer gpxLayer = (GpxLayer) newLayer;
-            setActiveLayer(gpxLayer);
-        }
-    }
-
-    @Override
-    public void layerRemoved(Layer oldLayer) {
-        if (layerMap.containsKey(oldLayer)) {
-            layerMap.remove(oldLayer);
-        }
-
-        if (layerMap.size() == 0) {
-            setModel(null);
-            if (profileLayer != null) {
-                profileLayer.setProfile(null);
-            }
-        }
-    }
-
-    @Override
-    public void componentHidden(ComponentEvent e) {
-    }
-
-    @Override
-    public void componentMoved(ComponentEvent e) {
-    }
-
-    @Override
-    public void componentResized(ComponentEvent e) {
-    }
-
-    @Override
-    public void componentShown(ComponentEvent e) {
-    }
-
-    class TrackModel implements ComboBoxModel<IElevationProfile> {
-        private Collection<ListDataListener> listeners;
-
-        @Override
-        public void addListDataListener(ListDataListener arg0) {
-            if (listeners == null) {
-                listeners = new ArrayList<ListDataListener>();
-            }
-            listeners.add(arg0);
-        }
-
-        @Override
-        public IElevationProfile getElementAt(int index) {
-            if (model == null) return null;
-
-            IElevationProfile ep = model.getProfiles().get(index);
-            return ep;
-        }
-
-        @Override
-        public int getSize() {
-            if (model == null) return 0;
-
-            return model.profileCount();
-        }
-
-        @Override
-        public void removeListDataListener(ListDataListener listener) {
-            if (listeners == null) return;
-
-            listeners.remove(listener);
-        }
-
-        @Override
-        public IElevationProfile getSelectedItem() {
-            if (model == null) return null;
-
-            return model.getCurrentProfile();
-        }
-
-        @Override
-        public void setSelectedItem(Object selectedObject) {
-            if (model != null && selectedObject instanceof IElevationProfile) {
-                model.setCurrentProfile((IElevationProfile) selectedObject);
-                profileLayer.setProfile(model.getCurrentProfile());
-
-                repaint();
-            }
-        }
-    }
+	private static final String EMPTY_DATA_STRING = "-";
+	private static final long serialVersionUID = -868463893732535577L;
+	/* Elevation profile instance */
+	private IElevationModel model;
+	/* GPX data */
+	private GpxLayer activeLayer = null;
+	private final HashMap<GpxLayer, ElevationModel> layerMap = new HashMap<>();
+
+	/* UI elements */
+	private final ElevationProfilePanel profPanel;
+	private final JLabel minHeightLabel;
+	private final JLabel maxHeightLabel;
+	private final JLabel avrgHeightLabel;
+	private final JLabel elevationGainLabel;
+	private final JLabel totalTimeLabel;
+	private final JLabel distLabel;
+	private final JComboBox<IElevationProfile> trackCombo;
+	private final JButton zoomButton;
+
+	/* Listener to the elevation model */
+	private final List<IElevationModelListener> listeners = new ArrayList<>();
+
+	/**
+	 * Corresponding layer instance within map view.
+	 */
+	private ElevationProfileLayer profileLayer;
+
+	/**
+	 * Default constructor
+	 */
+	public ElevationProfileDialog() {
+		this(tr("Elevation Profile"), "elevation",
+				tr("Open the elevation profile window."), null, 200, true);
+	}
+
+	/**
+	 * Constructor (see below)
+	 */
+	public ElevationProfileDialog(String name, String iconName, String tooltip,
+			Shortcut shortcut, int preferredHeight) {
+		this(name, iconName, tooltip, shortcut, preferredHeight, false);
+	}
+
+	/**
+	 * Constructor
+	 *
+	 * @param name
+	 *            the name of the dialog
+	 * @param iconName
+	 *            the name of the icon to be displayed
+	 * @param tooltip
+	 *            the tool tip
+	 * @param shortcut
+	 *            the shortcut
+	 * @param preferredHeight
+	 *            the preferred height for the dialog
+	 * @param defShow
+	 *            if the dialog should be shown by default, if there is no
+	 *            preference
+	 */
+	public ElevationProfileDialog(String name, String iconName, String tooltip,
+			Shortcut shortcut, int preferredHeight, boolean defShow) {
+		super(name, iconName, tooltip, shortcut, preferredHeight, defShow);
+
+		// create model
+		model = new ElevationModel();
+
+		// top panel
+		JPanel rootPanel = new JPanel();
+		GridLayout gridLayout1 = new GridLayout(2, 1);
+		rootPanel.setLayout(gridLayout1);
+
+		// statistics panel
+		JPanel statPanel = new JPanel();
+		GridLayout gridLayoutStat = new GridLayout(2, 6);
+		statPanel.setLayout(gridLayoutStat);
+
+		// first row: Headlines with bold font
+		String[] labels = new String[]{tr("Min"), tr("Avrg"), tr("Max"), tr("Dist"), tr("Gain"), tr("Time")};
+		for (int i = 0; i < labels.length; i++) {
+			JLabel lbl = new JLabel(labels[i]);
+			lbl.setFont(getFont().deriveFont(Font.BOLD));
+			statPanel.add(lbl);
+		}
+
+		// second row
+		minHeightLabel = new JLabel("0 m");
+		statPanel.add(minHeightLabel);
+		avrgHeightLabel = new JLabel("0 m");
+		statPanel.add(avrgHeightLabel);
+		maxHeightLabel = new JLabel("0 m");
+		statPanel.add(maxHeightLabel);
+		distLabel = new JLabel("0 km");
+		statPanel.add(distLabel);
+		elevationGainLabel = new JLabel("0 m");
+		statPanel.add(elevationGainLabel);
+		totalTimeLabel = new JLabel("0");
+		statPanel.add(totalTimeLabel);
+
+		// track selection panel
+		JPanel trackPanel = new JPanel();
+		FlowLayout fl = new FlowLayout(FlowLayout.LEFT);
+		trackPanel.setLayout(fl);
+
+		JLabel lbTrack = new JLabel(tr("Tracks"));
+		lbTrack.setFont(getFont().deriveFont(Font.BOLD));
+		trackPanel.add(lbTrack);
+
+		zoomButton = new JButton(tr("Zoom"));
+		zoomButton.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent arg0) {
+				if (model != null) {
+					IElevationProfile profile = model.getCurrentProfile();
+					if (profile != null) {
+						Main.map.mapView.zoomTo(profile.getBounds());
+					}
+				}
+
+			}
+		});
+		zoomButton.setEnabled(false);
+
+		trackCombo = new JComboBox<>(new TrackModel());
+		trackCombo.setPreferredSize(new Dimension(200, 24)); // HACK!
+		trackCombo.setEnabled(false); // we have no model on startup
+
+		trackPanel.add(trackCombo);
+		trackPanel.add(zoomButton);
+
+		// assemble root panel
+		rootPanel.add(statPanel);
+		rootPanel.add(trackPanel);
+
+		JPanel mainPanel = new JPanel(new BorderLayout());
+		mainPanel.add(rootPanel, BorderLayout.PAGE_END);
+
+		// add chart component
+		profPanel = new ElevationProfilePanel(null);
+		mainPanel.add(profPanel, BorderLayout.CENTER);
+		profPanel.addComponentListener(this);
+
+		createLayout(mainPanel, true, null);
+	}
+
+	@Override
+	public void showNotify() {
+		MapView.addLayerChangeListener(this);
+		if (Main.isDisplayingMapView()) {
+			Layer layer = Main.map.mapView.getActiveLayer();
+			if (layer instanceof GpxLayer) {
+				setActiveLayer((GpxLayer) layer);
+			}
+		}
+	}
+
+	@Override
+	public void hideNotify() {
+		MapView.removeLayerChangeListener(this);
+	}
+
+	/**
+	 * Gets the elevation model instance.
+	 * @return
+	 */
+	public IElevationModel getModel() {
+		return model;
+	}
+
+	/**
+	 * Sets the elevation model instance.
+	 * @param model The new model.
+	 */
+	public void setModel(IElevationModel model) {
+		if (this.model != model) {
+			this.model = model;
+			profPanel.setElevationModel(model);
+			updateView();
+		}
+	}
+
+	/**
+	 * Gets the associated layer instance of the elevation profile.
+	 * @return
+	 */
+	public ElevationProfileLayer getProfileLayer() {
+		return profileLayer;
+	}
+
+	/**
+	 * Sets the associated layer instance of the elevation profile.
+	 * @param profileLayer The elevation profile layer.
+	 */
+	public void setProfileLayer(ElevationProfileLayer profileLayer) {
+		if (this.profileLayer != profileLayer) {
+			if (this.profileLayer != null) {
+				profPanel.removeSelectionListener(this.profileLayer);
+			}
+			this.profileLayer = profileLayer;
+			profPanel.addSelectionListener(this.profileLayer);
+		}
+	}
+
+	/**
+	 * Refreshes the dialog when model data have changed and notifies clients
+	 * that the model has changed.
+	 */
+	private void updateView() {
+		if (model == null) {
+			disableView();
+			return;
+		}
+
+		IElevationProfile profile = model.getCurrentProfile();
+		if (profile != null) {
+			// Show name of profile in title
+			setTitle(String.format("%s: %s", tr("Elevation Profile"), profile.getName()));
+
+			if (profile.hasElevationData()) {
+				// Show elevation data
+				minHeightLabel.setText(
+						ElevationHelper.getElevationText(profile.getMinHeight()));
+				maxHeightLabel.setText(
+						ElevationHelper.getElevationText(profile.getMaxHeight()));
+				avrgHeightLabel.setText(
+						ElevationHelper.getElevationText(profile.getAverageHeight()));
+				elevationGainLabel.setText(
+						ElevationHelper.getElevationText(profile.getGain()));
+			}
+
+			// compute values for time and distance
+			long diff = profile.getTimeDifference();
+			long minutes = diff / (1000 * 60);
+			long hours = minutes / 60;
+			minutes = minutes % 60;
+
+			double dist = profile.getDistance();
+
+			totalTimeLabel.setText(String.format("%d:%02d h", hours, minutes));
+			distLabel.setText(NavigatableComponent.getSystemOfMeasurement().getDistText(dist));
+			trackCombo.setEnabled(model.profileCount() > 1);
+			trackCombo.setModel(new TrackModel());
+			zoomButton.setEnabled(true);
+		} else { // no elevation data, -> switch back to empty view
+			disableView();
+		}
+
+		fireModelChanged();
+		repaint();
+	}
+
+	private void disableView() {
+		setTitle(String.format("%s: (No data)", tr("Elevation Profile")));
+
+		minHeightLabel.setText(EMPTY_DATA_STRING);
+		maxHeightLabel.setText(EMPTY_DATA_STRING);
+		avrgHeightLabel.setText(EMPTY_DATA_STRING);
+		elevationGainLabel.setText(EMPTY_DATA_STRING);
+		totalTimeLabel.setText(EMPTY_DATA_STRING);
+		distLabel.setText(EMPTY_DATA_STRING);
+		trackCombo.setEnabled(false);
+		zoomButton.setEnabled(false);
+	}
+
+	/**
+	 * Fires the 'model changed' event to all listeners.
+	 */
+	protected void fireModelChanged() {
+		for (IElevationModelListener listener : listeners) {
+			listener.elevationProfileChanged(getModel().getCurrentProfile());
+		}
+	}
+
+	/**
+	 * Adds a model listener to this instance.
+	 *
+	 * @param listener
+	 *            The listener to add.
+	 */
+	public void addModelListener(IElevationModelListener listener) {
+		this.listeners.add(listener);
+	}
+
+	/**
+	 * Removes a model listener from this instance.
+	 *
+	 * @param listener
+	 *            The listener to remove.
+	 */
+	public void removeModelListener(IElevationModelListener listener) {
+		this.listeners.remove(listener);
+	}
+
+	/**
+	 * Removes all listeners from this instance.
+	 */
+	public void removeAllListeners() {
+		this.listeners.clear();
+	}
+
+	@Override
+	public void activeLayerChange(Layer oldLayer, Layer newLayer) {
+		if (newLayer instanceof GpxLayer) {
+			setActiveLayer((GpxLayer) newLayer);
+		}
+	}
+
+	private void setActiveLayer(GpxLayer newLayer) {
+		if (activeLayer != newLayer) {
+			activeLayer = newLayer;
+
+			// layer does not exist -> create
+			if (!layerMap.containsKey(newLayer)) {
+				GpxData gpxData = newLayer.data;
+				ElevationModel newEM = new ElevationModel(newLayer.getName(),
+						gpxData);
+				layerMap.put(newLayer, newEM);
+			}
+
+			ElevationModel em = layerMap.get(newLayer);
+			setModel(em);
+		}
+	}
+
+	@Override
+	public void layerAdded(Layer newLayer) {
+		if (newLayer instanceof GpxLayer) {
+			GpxLayer gpxLayer = (GpxLayer) newLayer;
+			setActiveLayer(gpxLayer);
+		}
+	}
+
+	@Override
+	public void layerRemoved(Layer oldLayer) {
+		if (layerMap.containsKey(oldLayer)) {
+			layerMap.remove(oldLayer);
+		}
+
+		if (layerMap.size() == 0) {
+			setModel(null);
+			if (profileLayer != null) {
+				profileLayer.setProfile(null);
+			}
+		}
+	}
+
+	@Override
+	public void componentHidden(ComponentEvent e) {
+	}
+
+	@Override
+	public void componentMoved(ComponentEvent e) {
+	}
+
+	@Override
+	public void componentResized(ComponentEvent e) {
+	}
+
+	@Override
+	public void componentShown(ComponentEvent e) {
+	}
+
+	class TrackModel implements ComboBoxModel<IElevationProfile> {
+		private Collection<ListDataListener> listeners;
+
+		@Override
+		public void addListDataListener(ListDataListener arg0) {
+			if (listeners == null) {
+				listeners = new ArrayList<>();
+			}
+			listeners.add(arg0);
+		}
+
+		@Override
+		public IElevationProfile getElementAt(int index) {
+			if (model == null) return null;
+
+			IElevationProfile ep = model.getProfiles().get(index);
+			return ep;
+		}
+
+		@Override
+		public int getSize() {
+			if (model == null) return 0;
+
+			return model.profileCount();
+		}
+
+		@Override
+		public void removeListDataListener(ListDataListener listener) {
+			if (listeners == null) return;
+
+			listeners.remove(listener);
+		}
+
+		@Override
+		public IElevationProfile getSelectedItem() {
+			if (model == null) return null;
+
+			return model.getCurrentProfile();
+		}
+
+		@Override
+		public void setSelectedItem(Object selectedObject) {
+			if (model != null && selectedObject instanceof IElevationProfile) {
+				model.setCurrentProfile((IElevationProfile) selectedObject);
+				profileLayer.setProfile(model.getCurrentProfile());
+
+				repaint();
+			}
+		}
+	}
 }
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfilePanel.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfilePanel.java	(revision 30736)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfilePanel.java	(revision 30737)
@@ -36,220 +36,220 @@
  */
 public class ElevationProfilePanel extends JPanel implements ComponentListener, MouseMotionListener {
-    /**
-     * Serial version UID
-     */
-    private static final long serialVersionUID = -7343429725259575319L;
-    private static final int BOTTOM_TEXT_Y_OFFSET = 7;
-
-    private IElevationModel model;
-    private Rectangle plotArea;
-    private final IElevationProfileRenderer renderer = new DefaultElevationProfileRenderer();
-    private int selectedIndex = -1;
-    private final List<IElevationProfileSelectionListener> selectionChangedListeners = new ArrayList<IElevationProfileSelectionListener>();
-    private boolean isPainting;
-    private int step = 0;
-
-    /**
-     * Constructs a new ElevationProfilePanel with the given elevation profile.
-     * @param profile The elevation profile to show in the panel.
-     */
-    public ElevationProfilePanel(IElevationModel profile) {
-        super();
-        this.model = profile;
-        setDoubleBuffered(true);
-        setBackground(Color.WHITE);
-        createOrUpdatePlotArea();
-        addComponentListener(this);
-        addMouseMotionListener(this);
-
-        Font lFont = getFont().deriveFont(9.0f);
-        setFont(lFont);
-    }
-
-    /**
-     * Gets the elevation profile instance.
-     * @return
-     */
-    public IElevationModel getProfile() {
-        return model;
-    }
-
-    /**
-     * Sets the new elevation profile instance.
-     * @param model
-     */
-    public void setElevationModel(IElevationModel model) {
-        if (this.model != model) {
-            this.model = model;
-            invalidate();
-        }
-    }
-
-    /**
-     * Gets the plot area coordinates.
-     * @return
-     */
-    public Rectangle getPlotArea() {
-        return plotArea;
-    }
-
-    /**
-     * Sets the plot area coordinates.
-     * @param plotArea
-     */
-    public void setPlotArea(Rectangle plotArea) {
-        this.plotArea = plotArea;
-    }
-
-    /**
-     * Gets the selected index of the bar.
-     * @return
-     */
-    public int getSelectedIndex() {
-        return selectedIndex;
-    }
-
-    /**
-     * Sets the selected index of the bar.
-     * @param selectedIndex
-     */
-    public void setSelectedIndex(int selectedIndex) {
-        this.selectedIndex = selectedIndex;
-
-        if (model != null) {
-            model.setCurrentProfile(selectedIndex);
-        }
-    }
-
-    /**
-     * Gets the selected (highlighted) way point.
-     * @return The selected way point or null, if no way point is selected.
-     */
-    public WayPoint getSelectedWayPoint() {
-        if (model == null) return null;
-
-        IElevationProfile profile = model.getCurrentProfile();
-
-        int selWp = this.selectedIndex * step;
-        if (profile != null && profile.getWayPoints() != null && selWp > 0 && profile.getWayPoints().size() > selWp) {
-            return profile.getWayPoints().get(selWp);
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Adds a selection listener.
-     * @param listener The listener instance to add.
-     */
-    public void addSelectionListener(IElevationProfileSelectionListener listener) {
-        if (listener == null) return;
-
-        selectionChangedListeners.add(listener);
-    }
-
-    /**
-     * Removes a selection listener from the list.
-     * @param listener The listener instance to remove.
-     */
-    public void removeSelectionListener(IElevationProfileSelectionListener listener) {
-        if (listener == null) return;
-
-        selectionChangedListeners.remove(listener);
-    }
-
-    /**
-     * Removes all selection listeners.
-     */
-    public void removeAllSelectionListeners() {
-        selectionChangedListeners.clear();
-    }
-
-    protected void fireSelectionChanged(WayPoint selWayPoint) {
-        for (IElevationProfileSelectionListener listener : selectionChangedListeners) {
-            listener.selectedWayPointChanged(selWayPoint);
-        }
-    }
-
-    @Override
-    public void paint(Graphics g) {
-        isPainting = true;
-
-        try {
-            super.paint(g);
-            createOrUpdatePlotArea();
-            int y1 = getPlotBottom();
-
-            g.setColor(Color.DARK_GRAY);
-            g.drawLine(plotArea.x, plotArea.y, plotArea.x, plotArea.y
-                    + plotArea.height);
-            g.drawLine(plotArea.x, plotArea.y + plotArea.height, plotArea.x
-                    + plotArea.width, plotArea.y + plotArea.height);
-
-
-            if (model != null) {
-                IElevationProfile profile = model.getCurrentProfile();
-                if (profile != null && profile.hasElevationData()) {
-                    // Draw start and end date
-                    drawAlignedString(formatDate(profile.getStart()), 5, y1 + BOTTOM_TEXT_Y_OFFSET,
-                            TextAlignment.Left, g);
-                    drawAlignedString(formatDate(profile.getEnd()),
-                            getPlotRight(), y1 + BOTTOM_TEXT_Y_OFFSET, TextAlignment.Right, g);
-
-                    // Show SRTM indicator
-                    if (ElevationHelper.hasSrtmData(profile.getBounds())) {
-                        String txt = "SRTM";
-                        drawAlignedString(txt, getPlotHCenter(), y1 + BOTTOM_TEXT_Y_OFFSET, TextAlignment.Centered, g);
-                    }
-                    drawProfile(g);
-                    drawElevationLines(g);
-                } else {
-                    // No profile or profile supports no elevation data
-                    drawAlignedString(tr("(No elevation data)"), getPlotHCenter(),
-                            getPlotVCenter(), TextAlignment.Centered, g);
-                }
-            }
-        } finally {
-            isPainting = false;
-        }
-    }
-
-    /**
-     * Draw a string with a specified alignment.
-     * @param s The text to display.
-     * @param x The x coordinate.
-     * @param y The y coordinate.
-     * @param align The text alignment.
-     * @param g The graphics context.
-     * @return The resulting rectangle of the drawn string.
-     */
-    private Rectangle drawAlignedString(String s, int x, int y,
-            TextAlignment align, Graphics g) {
-        FontMetrics fm = g.getFontMetrics();
-        int w = fm.stringWidth(s);
-        int h = fm.getHeight();
-
-        int xoff = w / 2;
-        int yoff = h / 2;
-
-        if (align == TextAlignment.Left) {
-            xoff = 0;
-        }
-        if (align == TextAlignment.Right) {
-            xoff = w;
-        }
-
-        g.drawString(s, x - xoff, y + yoff);
-
-        return new Rectangle(x - xoff, y - yoff, w, h);
-    }
-
-    /**
-     * Draw a string which is horizontally centered around (x,y).
-     * @param s The text to display.
-     * @param x The x coordinate.
-     * @param y The y coordinate.
-     * @param g The graphics context.
-     * @return The resulting rectangle of the drawn string.
+	/**
+	 * Serial version UID
+	 */
+	private static final long serialVersionUID = -7343429725259575319L;
+	private static final int BOTTOM_TEXT_Y_OFFSET = 7;
+
+	private IElevationModel model;
+	private Rectangle plotArea;
+	private final IElevationProfileRenderer renderer = new DefaultElevationProfileRenderer();
+	private int selectedIndex = -1;
+	private final List<IElevationProfileSelectionListener> selectionChangedListeners = new ArrayList<>();
+	private boolean isPainting;
+	private int step = 0;
+
+	/**
+	 * Constructs a new ElevationProfilePanel with the given elevation profile.
+	 * @param profile The elevation profile to show in the panel.
+	 */
+	public ElevationProfilePanel(IElevationModel profile) {
+		super();
+		this.model = profile;
+		setDoubleBuffered(true);
+		setBackground(Color.WHITE);
+		createOrUpdatePlotArea();
+		addComponentListener(this);
+		addMouseMotionListener(this);
+
+		Font lFont = getFont().deriveFont(9.0f);
+		setFont(lFont);
+	}
+
+	/**
+	 * Gets the elevation profile instance.
+	 * @return
+	 */
+	public IElevationModel getProfile() {
+		return model;
+	}
+
+	/**
+	 * Sets the new elevation profile instance.
+	 * @param model
+	 */
+	public void setElevationModel(IElevationModel model) {
+		if (this.model != model) {
+			this.model = model;
+			invalidate();
+		}
+	}
+
+	/**
+	 * Gets the plot area coordinates.
+	 * @return
+	 */
+	public Rectangle getPlotArea() {
+		return plotArea;
+	}
+
+	/**
+	 * Sets the plot area coordinates.
+	 * @param plotArea
+	 */
+	public void setPlotArea(Rectangle plotArea) {
+		this.plotArea = plotArea;
+	}
+
+	/**
+	 * Gets the selected index of the bar.
+	 * @return
+	 */
+	public int getSelectedIndex() {
+		return selectedIndex;
+	}
+
+	/**
+	 * Sets the selected index of the bar.
+	 * @param selectedIndex
+	 */
+	public void setSelectedIndex(int selectedIndex) {
+		this.selectedIndex = selectedIndex;
+
+		if (model != null) {
+			model.setCurrentProfile(selectedIndex);
+		}
+	}
+
+	/**
+	 * Gets the selected (highlighted) way point.
+	 * @return The selected way point or null, if no way point is selected.
+	 */
+	public WayPoint getSelectedWayPoint() {
+		if (model == null) return null;
+
+		IElevationProfile profile = model.getCurrentProfile();
+
+		int selWp = this.selectedIndex * step;
+		if (profile != null && profile.getWayPoints() != null && selWp > 0 && profile.getWayPoints().size() > selWp) {
+			return profile.getWayPoints().get(selWp);
+		} else {
+			return null;
+		}
+	}
+
+	/**
+	 * Adds a selection listener.
+	 * @param listener The listener instance to add.
+	 */
+	public void addSelectionListener(IElevationProfileSelectionListener listener) {
+		if (listener == null) return;
+
+		selectionChangedListeners.add(listener);
+	}
+
+	/**
+	 * Removes a selection listener from the list.
+	 * @param listener The listener instance to remove.
+	 */
+	public void removeSelectionListener(IElevationProfileSelectionListener listener) {
+		if (listener == null) return;
+
+		selectionChangedListeners.remove(listener);
+	}
+
+	/**
+	 * Removes all selection listeners.
+	 */
+	public void removeAllSelectionListeners() {
+		selectionChangedListeners.clear();
+	}
+
+	protected void fireSelectionChanged(WayPoint selWayPoint) {
+		for (IElevationProfileSelectionListener listener : selectionChangedListeners) {
+			listener.selectedWayPointChanged(selWayPoint);
+		}
+	}
+
+	@Override
+	public void paint(Graphics g) {
+		isPainting = true;
+
+		try {
+			super.paint(g);
+			createOrUpdatePlotArea();
+			int y1 = getPlotBottom();
+
+			g.setColor(Color.DARK_GRAY);
+			g.drawLine(plotArea.x, plotArea.y, plotArea.x, plotArea.y
+					+ plotArea.height);
+			g.drawLine(plotArea.x, plotArea.y + plotArea.height, plotArea.x
+					+ plotArea.width, plotArea.y + plotArea.height);
+
+
+			if (model != null) {
+				IElevationProfile profile = model.getCurrentProfile();
+				if (profile != null && profile.hasElevationData()) {
+					// Draw start and end date
+					drawAlignedString(formatDate(profile.getStart()), 5, y1 + BOTTOM_TEXT_Y_OFFSET,
+							TextAlignment.Left, g);
+					drawAlignedString(formatDate(profile.getEnd()),
+							getPlotRight(), y1 + BOTTOM_TEXT_Y_OFFSET, TextAlignment.Right, g);
+
+					// Show SRTM indicator
+					if (ElevationHelper.hasSrtmData(profile.getBounds())) {
+						String txt = "SRTM";
+						drawAlignedString(txt, getPlotHCenter(), y1 + BOTTOM_TEXT_Y_OFFSET, TextAlignment.Centered, g);
+					}
+					drawProfile(g);
+					drawElevationLines(g);
+				} else {
+					// No profile or profile supports no elevation data
+					drawAlignedString(tr("(No elevation data)"), getPlotHCenter(),
+							getPlotVCenter(), TextAlignment.Centered, g);
+				}
+			}
+		} finally {
+			isPainting = false;
+		}
+	}
+
+	/**
+	 * Draw a string with a specified alignment.
+	 * @param s The text to display.
+	 * @param x The x coordinate.
+	 * @param y The y coordinate.
+	 * @param align The text alignment.
+	 * @param g The graphics context.
+	 * @return The resulting rectangle of the drawn string.
+	 */
+	private Rectangle drawAlignedString(String s, int x, int y,
+			TextAlignment align, Graphics g) {
+		FontMetrics fm = g.getFontMetrics();
+		int w = fm.stringWidth(s);
+		int h = fm.getHeight();
+
+		int xoff = w / 2;
+		int yoff = h / 2;
+
+		if (align == TextAlignment.Left) {
+			xoff = 0;
+		}
+		if (align == TextAlignment.Right) {
+			xoff = w;
+		}
+
+		g.drawString(s, x - xoff, y + yoff);
+
+		return new Rectangle(x - xoff, y - yoff, w, h);
+	}
+
+	/**
+	 * Draw a string which is horizontally centered around (x,y).
+	 * @param s The text to display.
+	 * @param x The x coordinate.
+	 * @param y The y coordinate.
+	 * @param g The graphics context.
+	 * @return The resulting rectangle of the drawn string.
 
     private void drawHCenteredString(String s, int x, int y, Graphics g) {
@@ -257,262 +257,262 @@
     }*/
 
-    /**
-     * Formats the date in a predefined manner: "21. Oct 2010, 12:10".
-     * @param date
-     * @return
-     */
-    private String formatDate(Date date) {
-        Format formatter = new SimpleDateFormat("d MMM yy, HH:mm");
-
-        return formatter.format(date);
-    }
-
-    /**
-     * Helper function to draw elevation axes.
-     * @param g
-     */
-    private void drawElevationLines(Graphics g) {
-        IElevationProfile profile = model.getCurrentProfile();
-
-        double diff = profile.getHeightDifference();
-
-        if (diff == 0.0) {
-            return;
-        }
-
-        double z10 = Math.floor(Math.log10(diff));
-        double scaleUnit = Math.pow(10, z10); // scale unit, e. g. 100 for
-        // values below 1000
-
-        int upperLimit = (int) (Math.round(Math.ceil(profile.getMaxHeight()
-                / scaleUnit)) * scaleUnit);
-        int lowerLimit = (int) (Math.round(Math.floor(profile.getMinHeight()
-                / scaleUnit)) * scaleUnit);
-        int su = (int) scaleUnit;
-
-        for (int i = lowerLimit; i <= upperLimit; i += su) {
-            int yLine = getYForEelevation(i);
-
-            // check bounds
-            if (yLine <= getPlotBottom() && yLine >= getPlotTop()) {
-                String txt = ElevationHelper.getElevationText(i);
-
-                Rectangle r = drawAlignedString(txt, getPlotHCenter(), yLine - 2,
-                        TextAlignment.Right, g);
-                r.grow(2, 2);
-
-                // Draw left and right line segment
-                g.drawLine(getPlotLeftAxis(), yLine, r.x,
-                        yLine);
-                g.drawLine(r.x + r.width, yLine, getPlotRight(),
-                        yLine);
-                // Draw label with shadow
-                g.setColor(Color.WHITE);
-                drawAlignedString(txt, getPlotHCenter() + 1, yLine - 1,
-                        TextAlignment.Right, g);
-                g.setColor(Color.BLACK);
-                drawAlignedString(txt, getPlotHCenter(), yLine - 2,
-                        TextAlignment.Right, g);
-            }
-        }
-    }
-
-    /**
-     * Gets the x value of the left border for axes (slightly smaller than the
-     * left x).
-     * 
-     * @return
-     */
-    private int getPlotLeftAxis() {
-        return plotArea.x - 3;
-    }
-
-    /**
-     * Gets the x value of the left border.
-     * 
-     * @return
-     */
-    private int getPlotLeft() {
-        return plotArea.x + 1;
-    }
-
-    /**
-     * Gets the horizontal center coordinate (mid between left and right x).
-     * 
-     * @return
-     */
-    private int getPlotHCenter() {
-        return (getPlotLeft() + getPlotRight()) / 2;
-    }
-
-    /**
-     * Gets the vertical center coordinate (mid between top and bottom y).
-     * 
-     * @return
-     */
-    private int getPlotVCenter() {
-        return (getPlotTop() + getPlotBottom()) / 2;
-    }
-
-    /**
-     * Gets the x value of the right border.
-     * 
-     * @return
-     */
-    private int getPlotRight() {
-        return plotArea.x + plotArea.width - 1;
-    }
-
-    private int getPlotBottom() {
-        return plotArea.y + plotArea.height - 1;
-    }
-
-    private int getPlotTop() {
-        return plotArea.y + 1;
-    }
-
-    /**
-     * Gets for an elevation value the according y coordinate in the plot area.
-     * 
-     * @param elevation
-     * @return The y coordinate in the plot area.
-     */
-    private int getYForEelevation(int elevation) {
-        int y1 = getPlotBottom();
-
-        IElevationProfile profile = model.getCurrentProfile();
-
-        if (!profile.hasElevationData()) {
-            return y1;
-        }
-
-        double diff = profile.getHeightDifference();
-
-        return y1 - (int) Math.round(((elevation - profile.getMinHeight()) / diff * plotArea.height));
-    }
-
-    /**
-     * Draws the elevation profile
-     * 
-     * @param g
-     */
-    private void drawProfile(Graphics g) {
-        IElevationProfile profile = model.getCurrentProfile();
-
-        int nwp = profile.getNumberOfWayPoints();
-        int n = Math.min(plotArea.width, nwp);
-
-        if (n == 0) return; // nothing to draw
-        // compute step size in panel (add 1 to make sure that
-        // the complete range fits into panel
-        step = (nwp / n) + 1;
-
-        int yBottom = getPlotBottom();
-        Color oldC = g.getColor();
-
-        for (int i = 0, ip = 0; i < n && ip < nwp; i++, ip += step) {
-            WayPoint wpt = profile.getWayPoints().get(ip);
-            int eleVal = (int) ElevationHelper.getElevation(wpt);
-            Color c = renderer.getColorForWaypoint(profile, wpt,
-                    ElevationWayPointKind.Plain);
-
-            // draw cursor
-            if (i == this.selectedIndex) {
-                g.setColor(Color.BLACK);
-                drawAlignedString(ElevationHelper.getElevationText(eleVal),
-                        (getPlotRight() + getPlotLeft()) / 2,
-                        getPlotBottom() + 6,
-                        TextAlignment.Centered,
-                        g);
-
-                c = renderer.getColorForWaypoint(profile, wpt, ElevationWayPointKind.Highlighted);
-            }
-
-            int yEle = getYForEelevation(eleVal);
-            int x = getPlotLeft() + i;
-
-            g.setColor(c);
-            g.drawLine(x, yBottom, x, yEle);
-            g.setColor(ElevationColors.EPLightBlue);
-        }
-
-        g.setColor(oldC);
-    }
-
-    @Override
-    protected void paintBorder(Graphics g) {
-        super.paintBorder(g);
-
-        Border loweredbevel = BorderFactory.createLoweredBevelBorder();
-        this.setBorder(loweredbevel);
-    }
-
-    /**
-     * Determines the size of the plot area depending on the panel size.
-     */
-    private void createOrUpdatePlotArea() {
-        Dimension caSize = getSize();
-
-        if (plotArea == null) {
-            plotArea = new Rectangle(0, 0, caSize.width, caSize.height);
-        } else {
-            plotArea.width = caSize.width;
-            plotArea.height = caSize.height;
-        }
-
-        plotArea.setLocation(0, 0);
-        plotArea.grow(-10, -15);
-    }
-
-    @Override
-    public void componentHidden(ComponentEvent arg0) {
-        // TODO Auto-generated method stub
-    }
-
-    @Override
-    public void componentMoved(ComponentEvent arg0) {
-        // TODO Auto-generated method stub
-    }
-
-    @Override
-    public void componentResized(ComponentEvent arg0) {
-        createOrUpdatePlotArea();
-    }
-
-    @Override
-    public void componentShown(ComponentEvent arg0) {
-        // TODO Auto-generated method stub
-    }
-
-    @Override
-    public void mouseDragged(MouseEvent arg0) {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void mouseMoved(MouseEvent arg0) {
-        if (isPainting || arg0.isControlDown() || arg0.isAltDown() || arg0.isShiftDown()) arg0.consume();
-
-        int x = arg0.getX();
-        int l = this.getX();
-        int pl = this.getPlotLeft();
-        int newIdx = x - l - pl;
-
-        if (newIdx != this.selectedIndex && newIdx >= 0) {
-            this.selectedIndex = newIdx;
-            this.repaint();
-            fireSelectionChanged(getSelectedWayPoint());
-        }
-    }
-
-    @Override
-    public String getToolTipText() {
-        WayPoint wpt = getSelectedWayPoint();
-        if (wpt != null) {
-            return  String.format("%s: %s", ElevationHelper.getTimeText(wpt), ElevationHelper.getElevationText(wpt));
-        }
-
-        return super.getToolTipText();
-    }
+	/**
+	 * Formats the date in a predefined manner: "21. Oct 2010, 12:10".
+	 * @param date
+	 * @return
+	 */
+	private String formatDate(Date date) {
+		Format formatter = new SimpleDateFormat("d MMM yy, HH:mm");
+
+		return formatter.format(date);
+	}
+
+	/**
+	 * Helper function to draw elevation axes.
+	 * @param g
+	 */
+	private void drawElevationLines(Graphics g) {
+		IElevationProfile profile = model.getCurrentProfile();
+
+		double diff = profile.getHeightDifference();
+
+		if (diff == 0.0) {
+			return;
+		}
+
+		double z10 = Math.floor(Math.log10(diff));
+		double scaleUnit = Math.pow(10, z10); // scale unit, e. g. 100 for
+		// values below 1000
+
+		int upperLimit = (int) (Math.round(Math.ceil(profile.getMaxHeight()
+				/ scaleUnit)) * scaleUnit);
+		int lowerLimit = (int) (Math.round(Math.floor(profile.getMinHeight()
+				/ scaleUnit)) * scaleUnit);
+		int su = (int) scaleUnit;
+
+		for (int i = lowerLimit; i <= upperLimit; i += su) {
+			int yLine = getYForEelevation(i);
+
+			// check bounds
+			if (yLine <= getPlotBottom() && yLine >= getPlotTop()) {
+				String txt = ElevationHelper.getElevationText(i);
+
+				Rectangle r = drawAlignedString(txt, getPlotHCenter(), yLine - 2,
+						TextAlignment.Right, g);
+				r.grow(2, 2);
+
+				// Draw left and right line segment
+				g.drawLine(getPlotLeftAxis(), yLine, r.x,
+						yLine);
+				g.drawLine(r.x + r.width, yLine, getPlotRight(),
+						yLine);
+				// Draw label with shadow
+				g.setColor(Color.WHITE);
+				drawAlignedString(txt, getPlotHCenter() + 1, yLine - 1,
+						TextAlignment.Right, g);
+				g.setColor(Color.BLACK);
+				drawAlignedString(txt, getPlotHCenter(), yLine - 2,
+						TextAlignment.Right, g);
+			}
+		}
+	}
+
+	/**
+	 * Gets the x value of the left border for axes (slightly smaller than the
+	 * left x).
+	 *
+	 * @return
+	 */
+	private int getPlotLeftAxis() {
+		return plotArea.x - 3;
+	}
+
+	/**
+	 * Gets the x value of the left border.
+	 *
+	 * @return
+	 */
+	private int getPlotLeft() {
+		return plotArea.x + 1;
+	}
+
+	/**
+	 * Gets the horizontal center coordinate (mid between left and right x).
+	 *
+	 * @return
+	 */
+	private int getPlotHCenter() {
+		return (getPlotLeft() + getPlotRight()) / 2;
+	}
+
+	/**
+	 * Gets the vertical center coordinate (mid between top and bottom y).
+	 *
+	 * @return
+	 */
+	private int getPlotVCenter() {
+		return (getPlotTop() + getPlotBottom()) / 2;
+	}
+
+	/**
+	 * Gets the x value of the right border.
+	 *
+	 * @return
+	 */
+	private int getPlotRight() {
+		return plotArea.x + plotArea.width - 1;
+	}
+
+	private int getPlotBottom() {
+		return plotArea.y + plotArea.height - 1;
+	}
+
+	private int getPlotTop() {
+		return plotArea.y + 1;
+	}
+
+	/**
+	 * Gets for an elevation value the according y coordinate in the plot area.
+	 *
+	 * @param elevation
+	 * @return The y coordinate in the plot area.
+	 */
+	private int getYForEelevation(int elevation) {
+		int y1 = getPlotBottom();
+
+		IElevationProfile profile = model.getCurrentProfile();
+
+		if (!profile.hasElevationData()) {
+			return y1;
+		}
+
+		double diff = profile.getHeightDifference();
+
+		return y1 - (int) Math.round(((elevation - profile.getMinHeight()) / diff * plotArea.height));
+	}
+
+	/**
+	 * Draws the elevation profile
+	 *
+	 * @param g
+	 */
+	private void drawProfile(Graphics g) {
+		IElevationProfile profile = model.getCurrentProfile();
+
+		int nwp = profile.getNumberOfWayPoints();
+		int n = Math.min(plotArea.width, nwp);
+
+		if (n == 0) return; // nothing to draw
+		// compute step size in panel (add 1 to make sure that
+		// the complete range fits into panel
+		step = (nwp / n) + 1;
+
+		int yBottom = getPlotBottom();
+		Color oldC = g.getColor();
+
+		for (int i = 0, ip = 0; i < n && ip < nwp; i++, ip += step) {
+			WayPoint wpt = profile.getWayPoints().get(ip);
+			int eleVal = (int) ElevationHelper.getElevation(wpt);
+			Color c = renderer.getColorForWaypoint(profile, wpt,
+					ElevationWayPointKind.Plain);
+
+			// draw cursor
+			if (i == this.selectedIndex) {
+				g.setColor(Color.BLACK);
+				drawAlignedString(ElevationHelper.getElevationText(eleVal),
+						(getPlotRight() + getPlotLeft()) / 2,
+						getPlotBottom() + 6,
+						TextAlignment.Centered,
+						g);
+
+				c = renderer.getColorForWaypoint(profile, wpt, ElevationWayPointKind.Highlighted);
+			}
+
+			int yEle = getYForEelevation(eleVal);
+			int x = getPlotLeft() + i;
+
+			g.setColor(c);
+			g.drawLine(x, yBottom, x, yEle);
+			g.setColor(ElevationColors.EPLightBlue);
+		}
+
+		g.setColor(oldC);
+	}
+
+	@Override
+	protected void paintBorder(Graphics g) {
+		super.paintBorder(g);
+
+		Border loweredbevel = BorderFactory.createLoweredBevelBorder();
+		this.setBorder(loweredbevel);
+	}
+
+	/**
+	 * Determines the size of the plot area depending on the panel size.
+	 */
+	private void createOrUpdatePlotArea() {
+		Dimension caSize = getSize();
+
+		if (plotArea == null) {
+			plotArea = new Rectangle(0, 0, caSize.width, caSize.height);
+		} else {
+			plotArea.width = caSize.width;
+			plotArea.height = caSize.height;
+		}
+
+		plotArea.setLocation(0, 0);
+		plotArea.grow(-10, -15);
+	}
+
+	@Override
+	public void componentHidden(ComponentEvent arg0) {
+		// TODO Auto-generated method stub
+	}
+
+	@Override
+	public void componentMoved(ComponentEvent arg0) {
+		// TODO Auto-generated method stub
+	}
+
+	@Override
+	public void componentResized(ComponentEvent arg0) {
+		createOrUpdatePlotArea();
+	}
+
+	@Override
+	public void componentShown(ComponentEvent arg0) {
+		// TODO Auto-generated method stub
+	}
+
+	@Override
+	public void mouseDragged(MouseEvent arg0) {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void mouseMoved(MouseEvent arg0) {
+		if (isPainting || arg0.isControlDown() || arg0.isAltDown() || arg0.isShiftDown()) arg0.consume();
+
+		int x = arg0.getX();
+		int l = this.getX();
+		int pl = this.getPlotLeft();
+		int newIdx = x - l - pl;
+
+		if (newIdx != this.selectedIndex && newIdx >= 0) {
+			this.selectedIndex = newIdx;
+			this.repaint();
+			fireSelectionChanged(getSelectedWayPoint());
+		}
+	}
+
+	@Override
+	public String getToolTipText() {
+		WayPoint wpt = getSelectedWayPoint();
+		if (wpt != null) {
+			return  String.format("%s: %s", ElevationHelper.getTimeText(wpt), ElevationHelper.getElevationText(wpt));
+		}
+
+		return super.getToolTipText();
+	}
 }
Index: applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java
===================================================================
--- applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java	(revision 30736)
+++ applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java	(revision 30737)
@@ -8,4 +8,5 @@
 import java.util.ListIterator;
 import java.util.Set;
+
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.gui.MapView;
@@ -13,9 +14,9 @@
 public class DrawnPolyLine {
     MapView mv;
-    private LinkedList<LatLon> points = new LinkedList<LatLon>();
-    private LinkedList<LatLon> simplePoints = new LinkedList<LatLon>();
+    private LinkedList<LatLon> points = new LinkedList<>();
+    private LinkedList<LatLon> simplePoints = new LinkedList<>();
     private Set<LatLon> used;
-    private Set<LatLon> fixed = new HashSet<LatLon>();
-    
+    private Set<LatLon> fixed = new HashSet<>();
+
     private int lastIdx;
     private boolean closedFlag;
@@ -31,5 +32,5 @@
         return fixed.contains(pp2);
     }
-    
+
     double getLength() {
         List<LatLon> pts = getPoints();
@@ -55,5 +56,5 @@
         return (simplePoints!=null && simplePoints.size()>0);
     }
-    
+
     int findClosestPoint(Point p, double d) {
         double x=p.x, y=p.y;
@@ -87,5 +88,5 @@
         }
     }
-    
+
     void fixPoint(LatLon p) {
         fixed.add(p);
@@ -100,11 +101,11 @@
         return fixed;
     }
-    
+
     void addLast(LatLon coor) {
         if (closedFlag && lastIdx>points.size()-1) return;
         if (lastIdx>=points.size()-1) {
-            // 
+            //
             if (points.isEmpty() || !coor.equals(points.getLast())) {
-                points.addLast(coor); 
+                points.addLast(coor);
                 if (points.size()>1) lastIdx++;
                 }
@@ -112,10 +113,10 @@
             // insert point into midlle of the line
             if (points.isEmpty() || !coor.equals(points.get(lastIdx))) {
-                points.add(lastIdx+1, coor); 
-                lastIdx++; 
-            }
-        }
-    }
-  
+                points.add(lastIdx+1, coor);
+                lastIdx++;
+            }
+        }
+    }
+
     Point getLastPoint() {
         if (lastIdx<points.size()) return getPoint(points.get(lastIdx));
@@ -126,9 +127,9 @@
         return mv.getPoint(p);
     }
-    
+
     int getSimplePointsCount() {
         if (simplePoints!=null)return simplePoints.size(); else return -1;
     }
-    
+
     /**
      * Increase epsilon to fit points count in maxPKM point per 1 km
@@ -146,5 +147,5 @@
         return e;
     }
-            
+
     /**
      * Simplified drawn line, not touching the nodes includes in "fixed" set.
@@ -154,5 +155,5 @@
         int n = points.size();
         if (n < 3) return;
-        used = new HashSet<LatLon>(n);
+        used = new HashSet<>(n);
         int start = 0;
         for (int i = 0; i < n; i++) {
@@ -166,5 +167,5 @@
             }
         }
-        simplePoints = new LinkedList<LatLon>();
+        simplePoints = new LinkedList<>();
         simplePoints.addAll(points);
         simplePoints.retainAll(used);
@@ -192,5 +193,5 @@
 
         if (end - start < 2) return;
-        
+
         int farthest_node = -1;
         double farthest_dist = 0;
@@ -233,13 +234,13 @@
         return closedFlag;
     }
-    
+
     void deleteNode(int idx) {
         if (idx<=lastIdx) lastIdx--;
         fixed.remove(points.get(idx));
-        points.remove(idx); 
+        points.remove(idx);
     }
     void tryToDeleteSegment(Point p) {
         if (points.size()<3) return;
-        
+
         LatLon start;
         start = findBigSegment(p);
@@ -261,7 +262,7 @@
                 return;
             }
-            
+
             // if we are deleting this segment
-            if (f) it.remove(); 
+            if (f) it.remove();
             if (pp == start) {f=true;idx=i;} // next node should be removed
             i++;
@@ -273,5 +274,5 @@
      *  line fragment = segments between two fixed (green) nodes
      * @param p
-     * @return 
+     * @return
      */
     LatLon findBigSegment(Point p) {
@@ -291,13 +292,13 @@
         if (pointSegmentDistance(p,p1,p2) < 5) {
             return start;
-        } 
+        }
         } while (it2.hasNext());
         return null;
-        
+
     }
 
     private double pointSegmentDistance(Point p, Point p1, Point p2) {
         double a,b,x,y,l,kt,kn,dist;
-        x=p.x-p1.x; y=p.y-p1.y; 
+        x=p.x-p1.x; y=p.y-p1.y;
         a=p2.x-p1.x; b=p2.y-p1.y;
         l=Math.hypot(a,b);
@@ -344,5 +345,5 @@
          }
     }
-        
+
     /**
      * Returns maximum number of simplified line points divided by line segment length
@@ -357,5 +358,5 @@
         if (k<2) k=2;
         if (k>n) k=n;
-        
+
         LatLon pp1, pp2=null;
         Iterator<LatLon> it1,it2;
@@ -385,5 +386,5 @@
             }
         return Math.round(maxpkm);
-            
+
     }
 
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressEditContainer.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressEditContainer.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressEditContainer.java	(revision 30737)
@@ -47,33 +47,33 @@
     private Collection<? extends OsmPrimitive> workingSet;
     /** The street dictionary collecting all streets to a set of unique street names. */
-    private HashMap<String, OSMStreet> streetDict = new HashMap<String, OSMStreet>(100);
+    private HashMap<String, OSMStreet> streetDict = new HashMap<>(100);
 
     /** The unresolved (addresses without valid street name) addresses list. */
-    private List<OSMAddress> unresolvedAddresses = new ArrayList<OSMAddress>(100);
+    private List<OSMAddress> unresolvedAddresses = new ArrayList<>(100);
 
     /** The incomplete addresses list. */
-    private List<OSMAddress> incompleteAddresses = new ArrayList<OSMAddress>(100);
+    private List<OSMAddress> incompleteAddresses = new ArrayList<>(100);
 
     /** The shadow copy to assemble the street dict during update. */
-    private HashMap<String, OSMStreet> shadowStreetDict = new HashMap<String, OSMStreet>(100);
+    private HashMap<String, OSMStreet> shadowStreetDict = new HashMap<>(100);
     /** The shadow copy to assemble the unresolved addresses during update. */
-    private List<OSMAddress> shadowUnresolvedAddresses = new ArrayList<OSMAddress>(100);
+    private List<OSMAddress> shadowUnresolvedAddresses = new ArrayList<>(100);
     /** The shadow copy to assemble the incomplete addresses during update. */
-    private List<OSMAddress> shadowIncompleteAddresses = new ArrayList<OSMAddress>(100);
+    private List<OSMAddress> shadowIncompleteAddresses = new ArrayList<>(100);
 
     /** The visited nodes cache to increase iteration speed. */
-    private HashSet<Node> visitedNodes = new HashSet<Node>();
+    private HashSet<Node> visitedNodes = new HashSet<>();
     /** The visited ways cache to increase iteration speed. */
-    private HashSet<Way> visitedWays = new HashSet<Way>();
+    private HashSet<Way> visitedWays = new HashSet<>();
     /** The tag list used within the data area. */
-    private HashSet<String> tags = new HashSet<String>();
+    private HashSet<String> tags = new HashSet<>();
     /** The tag list used within the data area. */
-    private HashMap<String, String> values = new HashMap<String, String>();
+    private HashMap<String, String> values = new HashMap<>();
 
     /** The list containing the problems */
-    private List<IProblem> problems = new ArrayList<IProblem>();
+    private List<IProblem> problems = new ArrayList<>();
 
     /** The change listeners. */
-    private List<IAddressEditContainerListener> listeners = new ArrayList<IAddressEditContainerListener>();
+    private List<IAddressEditContainerListener> listeners = new ArrayList<>();
 
     /**
@@ -115,5 +115,5 @@
     protected void fireContainerChanged() {
         List<IAddressEditContainerListener> shadowListeners =
-            new ArrayList<IAddressEditContainerListener>(listeners);
+            new ArrayList<>(listeners);
 
         for (IAddressEditContainerListener listener : shadowListeners) {
@@ -129,5 +129,5 @@
 
         List<IAddressEditContainerListener> shadowListeners =
-            new ArrayList<IAddressEditContainerListener>(listeners);
+            new ArrayList<>(listeners);
 
         for (IAddressEditContainerListener listener : shadowListeners) {
@@ -336,5 +336,5 @@
      */
     public List<OSMStreet> getStreetList() {
-        ArrayList<OSMStreet> sortedList = new ArrayList<OSMStreet>(streetDict.values());
+        ArrayList<OSMStreet> sortedList = new ArrayList<>(streetDict.values());
         Collections.sort(sortedList);
         return sortedList;
@@ -417,5 +417,5 @@
      */
     public List<OSMAddress> getAllAddressesToFix() {
-        List<OSMAddress> all = new ArrayList<OSMAddress>(incompleteAddresses);
+        List<OSMAddress> all = new ArrayList<>(incompleteAddresses);
 
         for (OSMAddress aNode : unresolvedAddresses) {
@@ -453,5 +453,5 @@
             return true;
         }
-        
+
         if (streetName != null && shadowStreetDict.containsKey(streetName)) {
             OSMStreet sNode = shadowStreetDict.get(streetName);
@@ -467,5 +467,5 @@
      */
     public void resolveAddresses() {
-        List<OSMAddress> resolvedAddresses = new ArrayList<OSMAddress>();
+        List<OSMAddress> resolvedAddresses = new ArrayList<>();
         for (OSMAddress node : shadowUnresolvedAddresses) {
             if (assignAddressToStreet(node)) {
@@ -513,5 +513,5 @@
                 }
             }
-            
+
             // match streets with addresses...
             resolveAddresses();
@@ -521,7 +521,7 @@
 
             // put results from shadow copy into real lists
-            incompleteAddresses = new ArrayList<OSMAddress>(shadowIncompleteAddresses);
-            unresolvedAddresses = new ArrayList<OSMAddress>(shadowUnresolvedAddresses);
-            streetDict = new HashMap<String, OSMStreet>(shadowStreetDict);
+            incompleteAddresses = new ArrayList<>(shadowIncompleteAddresses);
+            unresolvedAddresses = new ArrayList<>(shadowUnresolvedAddresses);
+            streetDict = new HashMap<>(shadowStreetDict);
             // remove temp data
             shadowStreetDict.clear();
@@ -568,5 +568,5 @@
     public void attachToDataSet(Collection<? extends OsmPrimitive> osmDataToWorkOn) {
         if (osmDataToWorkOn != null && !osmDataToWorkOn.isEmpty()) {
-            workingSet = new ArrayList<OsmPrimitive>(osmDataToWorkOn);
+            workingSet = new ArrayList<>(osmDataToWorkOn);
         } else {
             detachFromDataSet(); // drop old stuff, if present
@@ -643,5 +643,5 @@
         CheckParameterUtil.ensureParameterNotNull(entity, "entity");
 
-        List<IProblem> problemsToRemove = new ArrayList<IProblem>();
+        List<IProblem> problemsToRemove = new ArrayList<>();
         for (IProblem problem : problems) {
             if (problem.getSource() == entity) {
@@ -673,6 +673,6 @@
         if (maxEntries < 1) maxEntries = 1;
 
-        List<StreetScore> scores = new ArrayList<StreetScore>();
-        List<String> matches = new ArrayList<String>();
+        List<StreetScore> scores = new ArrayList<>();
+        List<String> matches = new ArrayList<>();
 
         // Find the longest common sub string
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressProblem.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressProblem.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressProblem.java	(revision 30737)
@@ -56,5 +56,5 @@
     private void lazyCreateSolutions() {
         if (solutions == null) {
-            solutions = new ArrayList<ISolution>();
+            solutions = new ArrayList<>();
         }
     }
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/GuessAddressRunnable.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/GuessAddressRunnable.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/GuessAddressRunnable.java	(revision 30737)
@@ -25,9 +25,9 @@
 public class GuessAddressRunnable extends PleaseWaitRunnable {
     private List<OSMAddress> addressesToGuess;
-    private List<IProgressMonitorFinishedListener> finishListeners = new ArrayList<IProgressMonitorFinishedListener>();
+    private List<IProgressMonitorFinishedListener> finishListeners = new ArrayList<>();
     private boolean isRunning = false;
     private boolean canceled;
 
-    private GuessedValueHandler[] wayGuessers = new GuessedValueHandler[]{new GuessStreetValueHandler(TagUtils.ADDR_STREET_TAG)}; 
+    private GuessedValueHandler[] wayGuessers = new GuessedValueHandler[]{new GuessStreetValueHandler(TagUtils.ADDR_STREET_TAG)};
     private GuessedValueHandler[] nodeGuessers = new GuessedValueHandler[]{
             new GuessedValueHandler(TagUtils.ADDR_POSTCODE_TAG, 500.0),
@@ -99,5 +99,5 @@
     protected void fireFinished() {
         for (IProgressMonitorFinishedListener l : finishListeners) {
-            l.finished();            
+            l.finished();
         }
         // this event is fired only once, then we disconnect all listeners
@@ -130,5 +130,5 @@
             progressMonitor.setTicksCount(addressesToGuess.size());
 
-            List<OSMAddress> shadowCopy = new ArrayList<OSMAddress>(addressesToGuess);
+            List<OSMAddress> shadowCopy = new ArrayList<>(addressesToGuess);
             for (OSMAddress aNode : shadowCopy) {
                 if (!aNode.needsGuess()) { // nothing to do
@@ -148,5 +148,5 @@
                 for (int i = 0; i < wayGuessers.length; i++) {
                     GuessedValueHandler guesser = wayGuessers[i];
-                    
+
                     guesser.setAddressNode(aNode);
 
@@ -156,7 +156,7 @@
                             break;
                         }
-                        way.accept(guesser);                        
-                    }
-                    
+                        way.accept(guesser);
+                    }
+
                     String guessedVal = guesser.getCurrentValue();
                     if (guessedVal != null) {
@@ -164,9 +164,9 @@
                     }
                 }
-                
+
                 // Run node-related guessers
                 for (int i = 0; i < nodeGuessers.length; i++) {
                     GuessedValueHandler guesser = nodeGuessers[i];
-                    
+
                     guesser.setAddressNode(aNode);
 
@@ -176,7 +176,7 @@
                             break;
                         }
-                        node.accept(guesser);                        
-                    }
-                    
+                        node.accept(guesser);
+                    }
+
                     String guessedVal = guesser.getCurrentValue();
                     if (guessedVal != null) {
@@ -214,8 +214,8 @@
                 OSMAddress aNode = getAddressNode();
                 String newVal = TagUtils.getNameValue(w);
-                
+
                 if (newVal != null) {
                     double dist = OsmUtils.getMinimumDistanceToWay(aNode.getCoor(), w);
-                    
+
                     if (dist < minDist && dist < getMaxDistance()) {
                         minDist = dist;
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMAddress.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMAddress.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMAddress.java	(revision 30737)
@@ -27,9 +27,9 @@
 
     /** The dictionary containing guessed values. */
-    private HashMap<String, String> guessedValues = new HashMap<String, String>();
+    private HashMap<String, String> guessedValues = new HashMap<>();
     /** The dictionary containing guessed objects. */
-    private HashMap<String, OsmPrimitive> guessedObjects = new HashMap<String, OsmPrimitive>();
+    private HashMap<String, OsmPrimitive> guessedObjects = new HashMap<>();
     /** The dictionary containing indirect values. */
-    private HashMap<String, String> derivedValues = new HashMap<String, String>();
+    private HashMap<String, String> derivedValues = new HashMap<>();
 
     public OSMAddress(OsmPrimitive osmObject) {
@@ -49,5 +49,5 @@
      * Checks if the underlying address node has all tags usually needed to
      * describe an address.
-     * 
+     *
      * @return
      */
@@ -72,5 +72,5 @@
     /**
      * Gets the name of the street associated with this address.
-     * 
+     *
      * @return
      */
@@ -83,5 +83,5 @@
      * this method looks for an appropriate guess. If both, real value and
      * guess, are missing, a question mark is returned.
-     * 
+     *
      * @param tag
      *            the tag
@@ -115,5 +115,5 @@
     /**
      * Returns <tt>true</tt>, if this address node has a street name.
-     * 
+     *
      * @return
      */
@@ -124,5 +124,5 @@
     /**
      * Returns the street name guessed by the nearest-neighbor search.
-     * 
+     *
      * @return the guessedStreetName
      */
@@ -133,5 +133,5 @@
     /**
      * Sets the guessed street name.
-     * 
+     *
      * @param guessedStreetName
      *            the guessedStreetName to set
@@ -146,5 +146,5 @@
     /**
      * Checks for a guessed street name.
-     * 
+     *
      * @return true, if this instance has a guessed street name.
      */
@@ -162,5 +162,5 @@
     /**
      * Sets the guessed post code.
-     * 
+     *
      * @param guessedPostCode
      *            the guessedPostCode to set
@@ -174,5 +174,5 @@
     /**
      * Checks for a guessed post code.
-     * 
+     *
      * @return true, if this instance has a guessed post code.
      */
@@ -190,5 +190,5 @@
     /**
      * Sets the guessed city.
-     * 
+     *
      * @param guessedCity
      *            the guessedCity to set
@@ -202,5 +202,5 @@
     /**
      * Checks for a guessed city name.
-     * 
+     *
      * @return true, if this instance has a guessed city name.
      */
@@ -211,5 +211,5 @@
     /**
      * Returns true, if this instance has guesses regarding address tags.
-     * 
+     *
      * @return
      */
@@ -233,5 +233,5 @@
     /**
      * Apply the guessed value for the given tag.
-     * 
+     *
      * @param tag
      *            the tag to apply the guessed value for.
@@ -248,5 +248,5 @@
     /**
      * Gets the name of the post code associated with this address.
-     * 
+     *
      * @return
      */
@@ -263,5 +263,5 @@
     /**
      * Checks if this instance has a valid postal code.
-     * 
+     *
      * @return true, if successful
      */
@@ -272,5 +272,5 @@
     /**
      * Checks for post code tag.
-     * 
+     *
      * @return true, if successful
      */
@@ -281,5 +281,5 @@
     /**
      * Gets the name of the house number associated with this address.
-     * 
+     *
      * @return
      */
@@ -297,5 +297,5 @@
     /**
      * Checks for house number.
-     * 
+     *
      * @return true, if successful
      */
@@ -305,5 +305,6 @@
     }
 
-    public String getName() {
+    @Override
+	public String getName() {
     String name = TagUtils.getNameValue(osmObject);
     if (!StringUtils.isNullOrEmpty(name)) {
@@ -316,5 +317,5 @@
     /**
      * Checks if this address is part of a address interpolation.
-     * 
+     *
      * @return true, if is part of interpolation
      */
@@ -325,5 +326,5 @@
     /**
      * Checks if this address is part of an 'associated street' relation.
-     * 
+     *
      * @return true, if is part of interpolation
      */
@@ -334,5 +335,5 @@
     /**
      * Gets the name of the city associated with this address.
-     * 
+     *
      * @return
      */
@@ -343,5 +344,5 @@
     /**
      * Checks for city tag.
-     * 
+     *
      * @return true, if a city tag is present or available via referrer.
      */
@@ -352,5 +353,5 @@
     /**
      * Gets the name of the state associated with this address.
-     * 
+     *
      * @return
      */
@@ -361,5 +362,5 @@
     /**
      * Checks for state tag.
-     * 
+     *
      * @return true, if a state tag is present or available via referrer.
      */
@@ -370,5 +371,5 @@
     /**
      * Gets the name of the country associated with this address.
-     * 
+     *
      * @return
      */
@@ -379,5 +380,5 @@
     /**
      * Checks for country tag.
-     * 
+     *
      * @return true, if a country tag is present or available via referrer.
      */
@@ -401,5 +402,5 @@
      * Checks if the associated OSM object has the given tag or if the tag is
      * available via a referrer.
-     * 
+     *
      * @param tag
      *            the tag to look for.
@@ -467,5 +468,5 @@
     /**
      * Applies the street name from the specified street node.
-     * 
+     *
      * @param node
      */
@@ -483,5 +484,5 @@
     /**
      * Gets the guessed value for the given tag.
-     * 
+     *
      * @param tag
      *            The tag to get the guessed value for.
@@ -499,5 +500,5 @@
     /**
      * Gets the guessed object.
-     * 
+     *
      * @param tag
      *            the guessed tag
@@ -516,5 +517,5 @@
      * Gets all guessed objects or an empty list, if no guesses have been made
      * yet.
-     * 
+     *
      * @return the guessed objects.
      */
@@ -529,5 +530,5 @@
      * Check if this instance needs guessed values. This is the case, if the
      * underlying OSM node has either no street name, post code or city.
-     * 
+     *
      * @return true, if this instance needs at least one guessed value.
      */
@@ -542,5 +543,5 @@
     /**
      * Check if this instance needs guessed value for a given tag.
-     * 
+     *
      * @return true, if successful
      */
@@ -559,5 +560,5 @@
      * Checks if given tag has a guessed value (tag exists and has a non-empty
      * value).
-     * 
+     *
      * @param tag
      *            the tag
@@ -573,5 +574,5 @@
     /**
      * Sets the guessed value with the given tag.
-     * 
+     *
      * @param tag
      *            the tag to set the guess for
@@ -596,5 +597,5 @@
      * Checks if given tag has a derived value (value is available via a
      * referrer).
-     * 
+     *
      * @param tag
      *            the tag
@@ -610,5 +611,5 @@
     /**
      * Returns true, if this instance has derived values from any referrer.
-     * 
+     *
      * @return
      */
@@ -619,5 +620,5 @@
     /**
      * Gets the derived value for the given tag.
-     * 
+     *
      * @param tag
      *            The tag to get the derived value for.
@@ -633,5 +634,5 @@
     /**
      * Sets the value known indirectly via a referrer with the given tag.
-     * 
+     *
      * @param tag
      *            the tag to set the derived value for
@@ -645,5 +646,5 @@
     /**
      * Sets the street name of the address node.
-     * 
+     *
      * @param streetName
      */
@@ -657,5 +658,5 @@
     /**
      * Sets the state of the address node.
-     * 
+     *
      * @param state
      */
@@ -669,5 +670,5 @@
     /**
      * Sets the country of the address node.
-     * 
+     *
      * @param country
      */
@@ -681,5 +682,5 @@
     /**
      * Sets the post code of the address node.
-     * 
+     *
      * @param postCode
      */
@@ -755,5 +756,5 @@
     /**
      * Adds the guess value solution to a problem.
-     * 
+     *
      * @param p
      *            the problem to add the solution to.
@@ -771,5 +772,5 @@
     /**
      * Adds the remove address tags solution entry to a problem.
-     * 
+     *
      * @param problem
      *            the problem
@@ -790,5 +791,5 @@
     /**
      * Gets the formatted string representation of the given node.
-     * 
+     *
      * @param node
      *            the node
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMEntityBase.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMEntityBase.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMEntityBase.java	(revision 30737)
@@ -28,6 +28,6 @@
 public class OSMEntityBase implements IOSMEntity, Comparable<IOSMEntity> {
     public static final String ANONYMOUS = tr("No name");
-    private static List<IAddressEditContainerListener> containerListeners = new ArrayList<IAddressEditContainerListener>();
-    private List<ICommandListener> cmdListeners = new ArrayList<ICommandListener>();
+    private static List<IAddressEditContainerListener> containerListeners = new ArrayList<>();
+    private List<ICommandListener> cmdListeners = new ArrayList<>();
 
     protected OsmPrimitive osmObject;
@@ -81,5 +81,6 @@
      * @param listener
      */
-    public void addCommandListener(ICommandListener listener) {
+    @Override
+	public void addCommandListener(ICommandListener listener) {
         CheckParameterUtil.ensureParameterNotNull(listener, "listener");
         cmdListeners.add(listener);
@@ -90,5 +91,6 @@
      * @param listener
      */
-    public void removeCommandListener(ICommandListener listener) {
+    @Override
+	public void removeCommandListener(ICommandListener listener) {
         CheckParameterUtil.ensureParameterNotNull(listener, "listener");
         cmdListeners.remove(listener);
@@ -112,5 +114,6 @@
     }
 
-    public OsmPrimitive getOsmObject() {
+    @Override
+	public OsmPrimitive getOsmObject() {
         return osmObject;
     }
@@ -148,5 +151,5 @@
     protected void setOSMTag(String tag, String newValue) {
         CheckParameterUtil.ensureParameterNotNull(tag, "tag");
-        
+
 
         if (osmObject != null) {
@@ -156,5 +159,5 @@
                     return;
                 }
-                
+
             if ((osmObject.hasKey(tag) && newValue == null) || newValue != null) {
                 fireCommandIssued(new ChangePropertyCommand(osmObject, tag, newValue));
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMStreet.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMStreet.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMStreet.java	(revision 30737)
@@ -26,5 +26,6 @@
     }
 
-    public List<IOSMEntity> getChildren() {
+    @Override
+	public List<IOSMEntity> getChildren() {
         return children;
     }
@@ -46,5 +47,5 @@
     private void lazyCreateChildren() {
         if (children == null) {
-            children = new ArrayList<IOSMEntity>();
+            children = new ArrayList<>();
         }
     }
@@ -65,5 +66,5 @@
     private void lazyCreateAddresses() {
         if (addresses == null) {
-            addresses = new ArrayList<OSMAddress>();
+            addresses = new ArrayList<>();
         }
     }
@@ -118,5 +119,5 @@
      */
     public String getType() {
-        List<String> types = new ArrayList<String>();
+        List<String> types = new ArrayList<>();
 
         for (IOSMEntity seg : getChildren()) {
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OsmFactory.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OsmFactory.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OsmFactory.java	(revision 30737)
@@ -8,5 +8,5 @@
 
 public class OsmFactory {
-    private static HashMap<String, OSMAddress> addressCache = new HashMap<String, OSMAddress>();
+    private static HashMap<String, OSMAddress> addressCache = new HashMap<>();
 
     /**
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/PostalCodeChecker.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/PostalCodeChecker.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/PostalCodeChecker.java	(revision 30737)
@@ -11,5 +11,5 @@
  */
 public class PostalCodeChecker {
-    private static HashMap<String, String> postalCodePatternMap = new HashMap<String, String>();
+    private static HashMap<String, String> postalCodePatternMap = new HashMap<>();
 
     static {
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditModel.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditModel.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditModel.java	(revision 30737)
@@ -10,6 +10,6 @@
 import javax.swing.tree.TreeNode;
 
+import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity;
 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress;
-import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity;
 import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet;
 
@@ -17,5 +17,5 @@
     private List<OSMStreet> streets;
     private List<OSMAddress> unresolvedAddresses;
-    private List<OSMAddress> incompleteAddresses = new ArrayList<OSMAddress>();
+    private List<OSMAddress> incompleteAddresses = new ArrayList<>();
     private DefaultMutableTreeNode streetRoot;
     private DefaultMutableTreeNode unresolvedRoot;
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditSelectionEvent.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditSelectionEvent.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditSelectionEvent.java	(revision 30737)
@@ -153,5 +153,5 @@
             int[] selRows = unresolvedAddressTable.getSelectedRows();
 
-            unresolvedCache = new ArrayList<OSMAddress>();
+            unresolvedCache = new ArrayList<>();
             for (int i = 0; i < selRows.length; i++) {
                 if (selRows[i] >= 0 && selRows[i] < addressContainer.getNumberOfUnresolvedAddresses()) {
@@ -177,5 +177,5 @@
             int[] selRows = incompleteAddressTable.getSelectedRows();
 
-            incompleteCache = new ArrayList<OSMAddress>();
+            incompleteCache = new ArrayList<>();
             for (int i = 0; i < selRows.length; i++) {
                 if (selRows[i] >= 0 && selRows[i] < addressContainer.getNumberOfIncompleteAddresses()) {
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/IncompleteAddressesDialog.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/IncompleteAddressesDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/IncompleteAddressesDialog.java	(revision 30737)
@@ -64,5 +64,5 @@
         incompleteAddr.getSelectionModel().addListSelectionListener(this);
 
-        LinkedList<SideButton> buttons = new LinkedList<SideButton>();
+        LinkedList<SideButton> buttons = new LinkedList<>();
         // Link actions with address container
         for (AbstractAddressEditAction action : actions) {
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/AbstractAddressEditAction.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/AbstractAddressEditAction.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/AbstractAddressEditAction.java	(revision 30737)
@@ -166,5 +166,5 @@
         }
 
-        commands = new ArrayList<Command>();
+        commands = new ArrayList<>();
         if (StringUtils.isNullOrEmpty(txName)) {
             throw new RuntimeException("Transaction must have a name");
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/ApplyAllGuessesAction.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/ApplyAllGuessesAction.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/ApplyAllGuessesAction.java	(revision 30737)
@@ -13,6 +13,6 @@
 
 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer;
+import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity;
 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress;
-import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity;
 import org.openstreetmap.josm.plugins.fixAddresses.StringUtils;
 import org.openstreetmap.josm.plugins.fixAddresses.gui.AddressEditSelectionEvent;
@@ -70,5 +70,5 @@
     private void applyGuesses(List<OSMAddress> addrToFix) {
         beginTransaction(tr("Applied guessed values"));
-        List<OSMAddress> addrToFixShadow = new ArrayList<OSMAddress>(addrToFix);
+        List<OSMAddress> addrToFixShadow = new ArrayList<>(addrToFix);
         for (OSMAddress aNode : addrToFixShadow) {
             beginObjectTransaction(aNode);
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/SelectAddressesInMapAction.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/SelectAddressesInMapAction.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/SelectAddressesInMapAction.java	(revision 30737)
@@ -62,5 +62,5 @@
         if (addrToSel == null) return;
 
-        List<OsmPrimitive> sel = new ArrayList<OsmPrimitive>();
+        List<OsmPrimitive> sel = new ArrayList<>();
 
         getCurrentDataSet().clearSelection();
Index: applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/SelectIncompleteAddressesAction.java
===================================================================
--- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/SelectIncompleteAddressesAction.java	(revision 30736)
+++ applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/SelectIncompleteAddressesAction.java	(revision 30737)
@@ -30,5 +30,5 @@
 
         if (addressEditContainer.getIncompleteAddresses() != null) {
-            List<OsmPrimitive> osms = new ArrayList<OsmPrimitive>();
+            List<OsmPrimitive> osms = new ArrayList<>();
 
             for (OSMAddress aNode : addressEditContainer.getIncompleteAddresses()) {
Index: applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/TagDialog.java
===================================================================
--- applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/TagDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/TagDialog.java	(revision 30737)
@@ -50,5 +50,5 @@
    private static final String APPLY_CHANGES = tr("Apply Changes");
    private static final String TAG_STREET_OR_PLACE = tr("Use tag ''addr:street'' or ''addr:place''");
-   
+
    public static final String TAG_BUILDING = "building";
    public static final String TAG_ADDR_COUNTRY = "addr:country";
@@ -61,8 +61,8 @@
 
    public static final String[] buildingStrings = {"yes", "apartments", "chapel", "church", "commercial", "dormitory", "hotel", "house", "residential", "terrace",  "industrial", "retail", "warehouse", "cathedral",  "civic", "hospital", "school", "train_station", "transportation", "university", "public", "bridge", "bunker", "cabin", "construction", "farm_auxiliary", "garage", "garages" , "greenhouse", "hangar", "hut", "roof", "shed", "stable" };
-   
+
    private static final int FPS_MIN = -2;
    private static final int FPS_MAX =  2;
-   
+
    private static final long serialVersionUID = 6414385452106276923L;
 
@@ -140,5 +140,5 @@
       Arrays.sort(buildingStrings);
       building = new JComboBox<>(buildingStrings);
-      building.setSelectedItem(dto.getBuilding()); 
+      building.setSelectedItem(dto.getBuilding());
       building.setMaximumRowCount(50);
       c.gridx = 3;
@@ -147,5 +147,5 @@
       c.gridwidth = 1;
       editPanel.add(building, c);
-      
+
       // country
       countryEnabled = new JCheckBox(TAG_ADDR_COUNTRY);
@@ -258,5 +258,5 @@
       editPanel.add(streetEnabled, c);
 
-      
+
       streetRadio = new JRadioButton(TAG_ADDR_STREET);
       streetRadio.setToolTipText(TAG_STREET_OR_PLACE);
@@ -269,5 +269,5 @@
       c.gridwidth = 1;
       editPanel.add(streetRadio, c);
-      
+
       placeRadio = new JRadioButton("addr:place");
       placeRadio.setToolTipText(TAG_STREET_OR_PLACE);
@@ -280,9 +280,9 @@
       c.gridwidth = 1;
       editPanel.add(placeRadio, c);
-      
+
       ButtonGroup g = new ButtonGroup();
-      g.add( streetRadio ); 
+      g.add( streetRadio );
       g.add( placeRadio );
-      
+
       street = new AutoCompletingComboBox();
       if (dto.isTagStreet())
@@ -318,5 +318,5 @@
       housnumber = new JTextField();
       housnumber.setPreferredSize(new Dimension(200, 24));
-      
+
       int number = 0;
       try {
@@ -327,6 +327,6 @@
          housnumber.setText(String.valueOf(number));
       }
-      
-      
+
+
       c.fill = GridBagConstraints.HORIZONTAL;
       c.gridx = 3;
@@ -335,5 +335,5 @@
       c.gridwidth = 1;
       editPanel.add(housnumber, c);
-      
+
       JLabel seqLabel = new JLabel(tr("House number increment:"));
       c.fill = GridBagConstraints.HORIZONTAL;
@@ -355,5 +355,5 @@
       c.gridwidth = 1;
       editPanel.add(housenumberChangeSequence, c);
-   
+
       return editPanel;
    }
@@ -372,5 +372,5 @@
          dto.setSaveStreet(streetEnabled.isSelected());
          dto.setTagStreet(streetRadio.isSelected());
-         
+
          dto.setBuilding((String) building.getSelectedItem());
          dto.setCity(getAutoCompletingComboBoxValue(city));
@@ -381,5 +381,5 @@
          dto.setState(getAutoCompletingComboBoxValue(state));
          dto.setHousenumberChangeValue(housenumberChangeSequence.getValue());
-         
+
          updateJOSMSelection(selection, dto);
          saveDto(dto);
@@ -424,5 +424,5 @@
    protected void updateJOSMSelection(OsmPrimitive selection, Dto dto)
    {
-      ArrayList<Command> commands = new ArrayList<Command>();
+      ArrayList<Command> commands = new ArrayList<>();
 
       if (dto.isSaveBuilding()) {
@@ -476,5 +476,5 @@
                     ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_STREET, dto.getStreet());
                     commands.add(command);
-                    
+
                     // remove old place-tag
                     if (selection.get(TagDialog.TAG_ADDR_PLACE) != null)
@@ -492,5 +492,5 @@
                     ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_PLACE, dto.getStreet());
                     commands.add(command);
-                    
+
                     // remove old place-tag
                     if (selection.get(TagDialog.TAG_ADDR_STREET) != null)
@@ -523,5 +523,5 @@
        * Generates a list of all visible names of highways in order to do autocompletion on the road name.
        */
-      TreeSet<String> names = new TreeSet<String>();
+      TreeSet<String> names = new TreeSet<>();
       for (OsmPrimitive osm : Main.main.getCurrentDataSet().allNonDeletedPrimitives())
       {
@@ -561,5 +561,5 @@
 
    }
-   
+
     class RadioChangeListener implements ItemListener
     {
Index: applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/PluginOperations.java
===================================================================
--- applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/PluginOperations.java	(revision 30736)
+++ applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/PluginOperations.java	(revision 30737)
@@ -156,8 +156,8 @@
 
             // create Envelope
-            double width = (double) (img.getWidth() * tfwReader.getXPixelSize());
-            double height = (double) (img.getHeight() * (-tfwReader.getYPixelSize()));
-            double lowerLeft_x = (double) tfwReader.getXULC();
-            double lowerLeft_y = (double) tfwReader.getYULC() - height;
+            double width = img.getWidth() * tfwReader.getXPixelSize();
+            double height = img.getHeight() * (-tfwReader.getYPixelSize());
+            double lowerLeft_x = tfwReader.getXULC();
+            double lowerLeft_y = tfwReader.getYULC() - height;
             Envelope2D bbox = new Envelope2D(null, new Rectangle2D.Double(lowerLeft_x, lowerLeft_y, width, height));
 
@@ -191,8 +191,8 @@
 
             // create Envelope
-            double width = (double) (img.getWidth() * tfwReader.getXPixelSize());
-            double height = (double) (img.getHeight() * (-tfwReader.getYPixelSize()));
-            double lowerLeft_x = (double) tfwReader.getXULC();
-            double lowerLeft_y = (double) tfwReader.getYULC() - height;
+            double width = img.getWidth() * tfwReader.getXPixelSize();
+            double height = img.getHeight() * (-tfwReader.getYPixelSize());
+            double lowerLeft_x = tfwReader.getXULC();
+            double lowerLeft_y = tfwReader.getYULC() - height;
             Envelope2D bbox = new Envelope2D(null, new Rectangle2D.Double(lowerLeft_x, lowerLeft_y, width, height));
 
@@ -224,8 +224,8 @@
 
             // create Envelope
-            double width = (double) (img.getWidth() * tfwReader.getXPixelSize());
-            double height = (double) (img.getHeight() * (-tfwReader.getYPixelSize()));
-            double lowerLeft_x = (double) tfwReader.getXULC();
-            double lowerLeft_y = (double) tfwReader.getYULC() - height;
+            double width = img.getWidth() * tfwReader.getXPixelSize();
+            double height = img.getHeight() * (-tfwReader.getYPixelSize());
+            double lowerLeft_x = tfwReader.getXULC();
+            double lowerLeft_y = tfwReader.getYULC() - height;
             Envelope2D bbox = new Envelope2D(null, new Rectangle2D.Double(lowerLeft_x, lowerLeft_y, width, height));
 
@@ -258,8 +258,8 @@
 
             // create Envelope
-            double width = (double) (img.getWidth() * tfwReader.getXPixelSize());
-            double height = (double) (img.getHeight() * (-tfwReader.getYPixelSize()));
-            double lowerLeft_x = (double) tfwReader.getXULC();
-            double lowerLeft_y = (double) tfwReader.getYULC() - height;
+            double width = img.getWidth() * tfwReader.getXPixelSize();
+            double height = img.getHeight() * (-tfwReader.getYPixelSize());
+            double lowerLeft_x = tfwReader.getXULC();
+            double lowerLeft_y = tfwReader.getYULC() - height;
             Envelope2D bbox = new Envelope2D(null, new Rectangle2D.Double(lowerLeft_x, lowerLeft_y, width, height));
 
@@ -350,5 +350,5 @@
         GeoTiffReader reader = new GeoTiffReader(file, hints);
 
-        coverage = (GridCoverage2D) reader.read(null);
+        coverage = reader.read(null);
 
         return coverage;
@@ -366,10 +366,10 @@
         String defaultcrsString = pluginProps.getProperty("default_crs_srid");
 
-        crsDescriptions = new Vector<String>();
+        crsDescriptions = new Vector<>();
         Set<String> supportedCodes = CRS.getSupportedCodes("EPSG");
         CRSAuthorityFactory fac = CRS.getAuthorityFactory(false);
 
         for (Iterator<String> iterator = supportedCodes.iterator(); iterator.hasNext();) {
-            String string = (String) iterator.next();
+            String string = iterator.next();
             try {
                 if ("WGS84(DD)".equals(string)) {
Index: applications/editors/josm/plugins/NanoLog/src/nanolog/Correlator.java
===================================================================
--- applications/editors/josm/plugins/NanoLog/src/nanolog/Correlator.java	(revision 30736)
+++ applications/editors/josm/plugins/NanoLog/src/nanolog/Correlator.java	(revision 30737)
@@ -1,13 +1,21 @@
 package nanolog;
 
+import static org.openstreetmap.josm.tools.I18n.tr;
+
 import java.text.ParseException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
 import javax.swing.JOptionPane;
+
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.coor.LatLon;
-import org.openstreetmap.josm.data.gpx.*;
+import org.openstreetmap.josm.data.gpx.GpxData;
+import org.openstreetmap.josm.data.gpx.GpxTrack;
+import org.openstreetmap.josm.data.gpx.GpxTrackSegment;
+import org.openstreetmap.josm.data.gpx.WayPoint;
 import org.openstreetmap.josm.tools.Geometry;
-import static org.openstreetmap.josm.tools.I18n.tr;
 import org.openstreetmap.josm.tools.date.PrimaryDateParser;
 
@@ -24,5 +32,5 @@
      */
     public static long crudeMatch( List<NanoLogEntry> entries, GpxData data ) {
-        List<NanoLogEntry> sortedEntries = new ArrayList<NanoLogEntry>(entries);
+        List<NanoLogEntry> sortedEntries = new ArrayList<>(entries);
         PrimaryDateParser dateParser = new PrimaryDateParser();
         Collections.sort(sortedEntries);
@@ -72,5 +80,5 @@
      */
     public static void correlate( List<NanoLogEntry> entries, GpxData data, long offset ) {
-        List<NanoLogEntry> sortedEntries = new ArrayList<NanoLogEntry>(entries);
+        List<NanoLogEntry> sortedEntries = new ArrayList<>(entries);
         //int ret = 0;
         PrimaryDateParser dateParser = new PrimaryDateParser();
Index: applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java
===================================================================
--- applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java	(revision 30736)
+++ applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java	(revision 30737)
@@ -1,15 +1,35 @@
 package nanolog;
 
-import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.event.ActionEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashSet;
 import java.util.List;
-import java.util.regex.*;
-import javax.swing.*;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JOptionPane;
+
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.actions.*;
+import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.actions.RenameLayerAction;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.EastNorth;
@@ -18,7 +38,9 @@
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
 import org.openstreetmap.josm.gui.MapView;
-import org.openstreetmap.josm.gui.dialogs.*;
-import org.openstreetmap.josm.gui.layer.*;
-import static org.openstreetmap.josm.tools.I18n.tr;
+import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
+import org.openstreetmap.josm.gui.dialogs.LayerListPopup;
+import org.openstreetmap.josm.gui.layer.GpxLayer;
+import org.openstreetmap.josm.gui.layer.JumpToMarkerActions;
+import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.tools.ImageProvider;
 
@@ -32,10 +54,10 @@
     private List<NanoLogEntry> log;
     private int selectedEntry;
-    private final Set<NanoLogLayerListener> listeners = new HashSet<NanoLogLayerListener>();
+    private final Set<NanoLogLayerListener> listeners = new HashSet<>();
     private NLLMouseAdapter mouseListener;
-    
+
     public NanoLogLayer( List<NanoLogEntry> entries ) {
         super(tr("NanoLog"));
-        log = new ArrayList<NanoLogEntry>(entries);
+        log = new ArrayList<>(entries);
         selectedEntry = -1;
         mouseListener = new NLLMouseAdapter();
@@ -50,5 +72,5 @@
         super.destroy();
     }
-    
+
     public NanoLogLayer( File file ) throws IOException {
         this(readNanoLog(file));
@@ -76,9 +98,9 @@
         return Collections.unmodifiableList(log);
     }
-    
+
     public static List<NanoLogEntry> readNanoLog( File file ) throws IOException {
         final Pattern NANOLOG_LINE = Pattern.compile("(.+?)\\t(.+?)(?:\\s*\\{\\{(-?\\d+\\.\\d+),\\s*(-?\\d+\\.\\d+)(?:,\\s*(\\d+))?\\}\\})?");
         final SimpleDateFormat fmt = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss.SS");
-        List<NanoLogEntry> result = new ArrayList<NanoLogEntry>();
+        List<NanoLogEntry> result = new ArrayList<>();
         BufferedReader r = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF8"));
         while( r.ready() ) {
@@ -301,5 +323,5 @@
         Main.map.mapView.repaint();
     }
-    
+
     private class CorrelateEntries extends JosmAction {
         private boolean toZero;
@@ -328,5 +350,5 @@
         }
     }
-    
+
     private class SaveLayer extends JosmAction {
 
Index: applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPanel.java
===================================================================
--- applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPanel.java	(revision 30736)
+++ applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPanel.java	(revision 30737)
@@ -20,5 +20,5 @@
 /**
  * NanoLog Panel. Displays the selected log item, along with surrounding 30-50 lines.
- * 
+ *
  * @author zverik
  */
@@ -26,15 +26,15 @@
     private JList<String> logPanel;
     private LogListModel listModel;
-    
+
     public NanoLogPanel() {
         super(tr("NanoLog"), "nanolog", tr("Open NanoLog panel"), null, 150, false);
-        
+
         listModel = new LogListModel();
-        logPanel = new JList<String>(listModel);
+        logPanel = new JList<>(listModel);
         createLayout(logPanel, true, null);
     }
 
     public void updateMarkers() {
-        List<NanoLogEntry> entries = new ArrayList<NanoLogEntry>();
+        List<NanoLogEntry> entries = new ArrayList<>();
         for( NanoLogLayer l : Main.map.mapView.getLayersOfType(NanoLogLayer.class) ) {
             entries.addAll(l.getEntries());
@@ -74,14 +74,16 @@
         }
     }
-    
+
     private class LogListModel extends AbstractListModel<String> {
         private List<NanoLogEntry> entries;
         private final SimpleDateFormat TIME_FORMAT = new SimpleDateFormat("HH:mm:ss");
 
-        public int getSize() {
+        @Override
+		public int getSize() {
             return entries.size();
         }
 
-        public String getElementAt( int index ) {
+        @Override
+		public String getElementAt( int index ) {
             return TIME_FORMAT.format(entries.get(index).getTime()) + " " + entries.get(index).getMessage();
         }
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OhePlugin.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OhePlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OhePlugin.java	(revision 30737)
@@ -121,6 +121,6 @@
             // copied from
             // org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog[rev4079][line802]
-            Map<String, Integer> keyCount = new HashMap<String, Integer>();
-            Map<String, Map<String, Integer>> valueCount = new TreeMap<String, Map<String, Integer>>();
+            Map<String, Integer> keyCount = new HashMap<>();
+            Map<String, Map<String, Integer>> valueCount = new TreeMap<>();
             for (OsmPrimitive osm : selection) {
                 for (String key : osm.keySet()) {
@@ -131,5 +131,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);
@@ -325,8 +325,8 @@
                 Main.main.undoRedo.add(new ChangePropertyCommand(selection, newkey, value));
             } else {
-                Collection<Command> commands = new Vector<Command>();
+                Collection<Command> commands = new Vector<>();
                 commands.add(new ChangePropertyCommand(selection, key, null));
                 if (value.equals(tr("<different>"))) {
-                    HashMap<String, Vector<OsmPrimitive>> map = new HashMap<String, Vector<OsmPrimitive>>();
+                    HashMap<String, Vector<OsmPrimitive>> map = new HashMap<>();
                     for (OsmPrimitive osm : selection) {
                         String val = osm.get(key);
@@ -335,5 +335,5 @@
                                 map.get(val).add(osm);
                             } else {
-                                Vector<OsmPrimitive> v = new Vector<OsmPrimitive>();
+                                Vector<OsmPrimitive> v = new Vector<>();
                                 v.add(osm);
                                 map.put(val, v);
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OpeningTimeUtils.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OpeningTimeUtils.java	(revision 30736)
+++ applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OpeningTimeUtils.java	(revision 30737)
@@ -15,13 +15,13 @@
      */
     public static ArrayList<int[]> convert(ArrayList<DateTime> dateTimes) {
-        ArrayList<int[]> ret = new ArrayList<int[]>(); // the list which is
+        ArrayList<int[]> ret = new ArrayList<>(); // the list which is
         // returned
         for (int i = 0; i < dateTimes.size(); ++i) { // iterate over every entry
             DateTime dateTime = dateTimes.get(i);
-            ArrayList<DateTime> newDateTimes = new ArrayList<DateTime>();
+            ArrayList<DateTime> newDateTimes = new ArrayList<>();
 
             // test if the given entry is a single dayspan
             if (dateTime.daySpans.size() == 1 && dateTime.daySpans.get(0).isSpan()) {
-                ArrayList<DaySpan> partDaySpans = new ArrayList<DaySpan>();
+                ArrayList<DaySpan> partDaySpans = new ArrayList<>();
                 int start_day = dateTime.daySpans.get(0).startDay;
 
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheEditor.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheEditor.java	(revision 30736)
+++ applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheEditor.java	(revision 30737)
@@ -191,5 +191,5 @@
 
         setEnabled(true);
-        timeRects = new ArrayList<TimeRect>();
+        timeRects = new ArrayList<>();
         if (time != null) {
             for (int[] timeRectValues : time) {
Index: applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/GeoFabrikWFSClient.java
===================================================================
--- applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/GeoFabrikWFSClient.java	(revision 30736)
+++ applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/GeoFabrikWFSClient.java	(revision 30737)
@@ -95,5 +95,5 @@
 		String getCapabilities = "http://tools.geofabrik.de/osmi/view/routing_non_eu/wxs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities";
 		@SuppressWarnings("rawtypes")
-		Map<String, Comparable> connectionParameters = new HashMap<String, Comparable>();
+		Map<String, Comparable> connectionParameters = new HashMap<>();
 		connectionParameters.put("WFSDataStoreFactory:GET_CAPABILITIES_URL",
 				getCapabilities);
Index: applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OSMIFeatureTracker.java
===================================================================
--- applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OSMIFeatureTracker.java	(revision 30736)
+++ applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OSMIFeatureTracker.java	(revision 30737)
@@ -16,5 +16,5 @@
 	public OSMIFeatureTracker(
 			FeatureCollection<SimpleFeatureType, SimpleFeature> featuresIn) {
-		hashFeatures = new HashMap<Long, SimpleFeature>();
+		hashFeatures = new HashMap<>();
 		features = new MemoryFeatureCollection(featuresIn.getSchema());
 
Index: applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorLayer.java
===================================================================
--- applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorLayer.java	(revision 30736)
+++ applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorLayer.java	(revision 30737)
@@ -200,5 +200,5 @@
 
 			bugId = idx;
-			attributes = new HashMap<String, String>();
+			attributes = new HashMap<>();
 			Collection<Property> properties = next.getProperties();
 			Iterator<Property> it = properties.iterator();
@@ -261,5 +261,5 @@
 
 		public BugIndex(Map<BugInfo, Long> bugs) {
-			osmBugs = new ArrayList<BugInfo>(bugs.keySet());
+			osmBugs = new ArrayList<>(bugs.keySet());
 			nextIndex = 0;
 			previousIndex = -1;
@@ -267,5 +267,5 @@
 
 		public BugIndex(Map<BugInfo, Long> bugs, int n, int p) {
-			osmBugs = new ArrayList<BugInfo>(bugs.keySet());
+			osmBugs = new ArrayList<>(bugs.keySet());
 			nextIndex = n;
 			previousIndex = p;
@@ -345,7 +345,7 @@
 		super("OsmInspector");
 
-		arrFeatures = new ArrayList<OSMIFeatureTracker>();
-		osmiBugInfo = new LinkedHashMap<BugInfo, Long>();
-		selectGeomType = new ArrayList<GeomType>();
+		arrFeatures = new ArrayList<>();
+		osmiBugInfo = new LinkedHashMap<>();
+		selectGeomType = new ArrayList<>();
 
 		// Step 3 - discovery; enhance to iterate over all types with bounds
@@ -360,5 +360,5 @@
 		for (int idx = 1; idx < typeNames.length; ++idx) {
 			String typeName = typeNames[idx];
-			Set<FeatureId> selectedFeatures = new HashSet<FeatureId>();
+			Set<FeatureId> selectedFeatures = new HashSet<>();
 
 			FeatureCollection<SimpleFeatureType, SimpleFeature> features = wfsClient
@@ -417,5 +417,5 @@
 		for (int idx = 1; idx < typeNames.length; ++idx) {
 			String typeName = typeNames[idx];
-			Set<FeatureId> selectedFeatures = new HashSet<FeatureId>();
+			Set<FeatureId> selectedFeatures = new HashSet<>();
 
 			monitor.setProgress(100 / typeNames.length * idx);
@@ -621,5 +621,5 @@
 				FeatureIterator<SimpleFeature> iter = selectedFeatures
 						.features();
-				Set<FeatureId> IDs = new HashSet<FeatureId>();
+				Set<FeatureId> IDs = new HashSet<>();
 
 				System.out.println("Selected features "
Index: applications/editors/josm/plugins/addrinterpolation/src/org/openstreetmap/josm/plugins/AddrInterpolation/AddrInterpolationDialog.java
===================================================================
--- applications/editors/josm/plugins/addrinterpolation/src/org/openstreetmap/josm/plugins/AddrInterpolation/AddrInterpolationDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/addrinterpolation/src/org/openstreetmap/josm/plugins/AddrInterpolation/AddrInterpolationDialog.java	(revision 30737)
@@ -600,5 +600,5 @@
             //   Either selected or in the middle of the Address Interpolation way
             //     Do not include end points of Address Interpolation way in this set yet.
-            houseNumberNodes  = new ArrayList<Node>();
+            houseNumberNodes  = new ArrayList<>();
             // Check selected nodes
             for (OsmPrimitive osm : currentDataSet.getSelectedNodes()) {
@@ -1024,5 +1024,5 @@
         // Entries are valid ... save in map
 
-        commandGroup = new LinkedList<Command>();
+        commandGroup = new LinkedList<>();
 
         String streetName = selectedStreet.get("name");
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysAlgnSegment.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysAlgnSegment.java	(revision 30736)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysAlgnSegment.java	(revision 30737)
@@ -41,9 +41,9 @@
 
     private PivotLocations currPivot;
-    Map<PivotLocations, EastNorth> pivotList = new EnumMap<PivotLocations, EastNorth>(
+    Map<PivotLocations, EastNorth> pivotList = new EnumMap<>(
             PivotLocations.class);
     private final Color pivotColor = Color.YELLOW;
     private final Color crossColor = pivotColor;
-    private final Map<Node,ArrayList<WaySegment>> adjWaySegs = new HashMap<Node,ArrayList<WaySegment>>();
+    private final Map<Node,ArrayList<WaySegment>> adjWaySegs = new HashMap<>();
 
     public AlignWaysAlgnSegment(MapView mapview, Point p)
@@ -70,5 +70,5 @@
         // Update the list of adjacent waysegments to the endpoints
         for (Node nA : getSegmentEndPoints()) {
-            adjWaySegs.put(nA, new ArrayList<WaySegment>(determineAdjacentWaysegments(nA)));
+            adjWaySegs.put(nA, new ArrayList<>(determineAdjacentWaysegments(nA)));
         }
     }
@@ -182,5 +182,5 @@
      */
     private Collection<WaySegment> determineAdjacentWaysegments(Node node) {
-        Collection<WaySegment> wsSet = new HashSet<WaySegment>();
+        Collection<WaySegment> wsSet = new HashSet<>();
         final double radius = 10.0;
         final int stepsOnCircle = 24;
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepAngles.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepAngles.java	(revision 30736)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepAngles.java	(revision 30737)
@@ -71,5 +71,5 @@
                 
                 // In order have a chance to align, (enAdjOther1, enAdjOther2 and endpoint) must be collinear
-                ArrayList<EastNorth> enAdjPts = new ArrayList<EastNorth>(3);
+                ArrayList<EastNorth> enAdjPts = new ArrayList<>(3);
                 enAdjPts.add(enAdjOther1);
                 enAdjPts.add(endpoint.getEastNorth());
@@ -154,5 +154,5 @@
 
     private boolean isEnSetCollinear(ArrayList<EastNorth> enAdjPts) {
-        ArrayList<AlignWaysGeomPoint> awAdjPts = new ArrayList<AlignWaysGeomPoint>();
+        ArrayList<AlignWaysGeomPoint> awAdjPts = new ArrayList<>();
         
         for (EastNorth en : enAdjPts) {
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepLength.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepLength.java	(revision 30736)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepLength.java	(revision 30737)
@@ -51,5 +51,5 @@
      * Useful for validation.
      */
-    final Map<Node,EastNorth> calculatedNodes = new HashMap<Node,EastNorth>();
+    final Map<Node,EastNorth> calculatedNodes = new HashMap<>();
 
 
@@ -73,5 +73,5 @@
      * List of all old states of the objects.
      */
-    final Map<Node, Node> oldNodes = new HashMap<Node, Node>();
+    final Map<Node, Node> oldNodes = new HashMap<>();
 
     /**
@@ -148,5 +148,5 @@
 
         // "Backup" state
-        lastAffectedNodes = new HashSet<Node>();
+        lastAffectedNodes = new HashSet<>();
         for (Node n : this.displaceableNodes) {
             Node nodeBackup = new Node(n);
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysSegment.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysSegment.java	(revision 30736)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysSegment.java	(revision 30737)
@@ -57,5 +57,5 @@
             Node node2 = segment.way.getNode(segment.lowerIndex + 1);
 
-            segmentEndPoints = new HashSet<Node>();
+            segmentEndPoints = new HashSet<>();
             segmentEndPoints.add(node1);
             segmentEndPoints.add(node2);
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/geometry/AlignWaysGeomPoint.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/geometry/AlignWaysGeomPoint.java	(revision 30736)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/geometry/AlignWaysGeomPoint.java	(revision 30737)
@@ -99,5 +99,5 @@
         
         Double[] dValues = {d1, d2, d3};
-        ArrayList<Double> alValues = new ArrayList<Double>(Arrays.asList(dValues));
+        ArrayList<Double> alValues = new ArrayList<>(Arrays.asList(dValues));
         Collections.sort(alValues);
         
Index: applications/editors/josm/plugins/buildings_tools/src/buildings_tools/AngleSnap.java
===================================================================
--- applications/editors/josm/plugins/buildings_tools/src/buildings_tools/AngleSnap.java	(revision 30736)
+++ applications/editors/josm/plugins/buildings_tools/src/buildings_tools/AngleSnap.java	(revision 30737)
@@ -13,5 +13,5 @@
 public class AngleSnap {
     private static final double PI_2 = Math.PI / 2;
-    final TreeSet<Double> snapSet = new TreeSet<Double>();
+    final TreeSet<Double> snapSet = new TreeSet<>();
 
     public final void clear() {
Index: applications/editors/josm/plugins/buildings_tools/src/buildings_tools/Building.java
===================================================================
--- applications/editors/josm/plugins/buildings_tools/src/buildings_tools/Building.java	(revision 30736)
+++ applications/editors/josm/plugins/buildings_tools/src/buildings_tools/Building.java	(revision 30737)
@@ -232,5 +232,5 @@
         bbox.add(eastNorth2latlon(en[2]));
         bbox.add(eastNorth2latlon(en[3]));
-        List<Node> nodes = new LinkedList<Node>();
+        List<Node> nodes = new LinkedList<>();
         nodesloop:
         for (Node n : Main.main.getCurrentDataSet().searchNodes(bbox)) {
@@ -295,5 +295,5 @@
         }
         w.addNode(nodes[0]);
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
         for (int i = 0; i < 4; i++) {
             if (created[i])
Index: applications/editors/josm/plugins/buildings_tools/src/buildings_tools/DrawBuildingAction.java
===================================================================
--- applications/editors/josm/plugins/buildings_tools/src/buildings_tools/DrawBuildingAction.java	(revision 30736)
+++ applications/editors/josm/plugins/buildings_tools/src/buildings_tools/DrawBuildingAction.java	(revision 30737)
@@ -408,6 +408,6 @@
         // update snap only if selection isn't too big
         if (newSelection.size() <= 10) {
-            LinkedList<Node> nodes = new LinkedList<Node>();
-            LinkedList<Way> ways = new LinkedList<Way>();
+            LinkedList<Node> nodes = new LinkedList<>();
+            LinkedList<Way> ways = new LinkedList<>();
 
             for (OsmPrimitive p : newSelection) {
Index: applications/editors/josm/plugins/buildings_tools/src/buildings_tools/ToolSettings.java
===================================================================
--- applications/editors/josm/plugins/buildings_tools/src/buildings_tools/ToolSettings.java	(revision 30736)
+++ applications/editors/josm/plugins/buildings_tools/src/buildings_tools/ToolSettings.java	(revision 30737)
@@ -24,5 +24,5 @@
     private static double lenstep = 0;
     private static boolean useAddr;
-    private static final Map<String, String> TAGS = new HashMap<String, String>();
+    private static final Map<String, String> TAGS = new HashMap<>();
     private static boolean autoSelect;
 
@@ -54,5 +54,5 @@
 
     public static void saveTags() {
-        ArrayList<String> values = new ArrayList<String>(TAGS.size() * 2);
+        ArrayList<String> values = new ArrayList<>(TAGS.size() * 2);
         for (Entry<String, String> entry : TAGS.entrySet()) {
             values.add(entry.getKey());
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/Address.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/Address.java	(revision 30736)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/Address.java	(revision 30737)
@@ -131,7 +131,7 @@
         MapView mv = Main.map.mapView;
         Point mousePos = e.getPoint();
-        List<Way> mouseOnExistingWays = new ArrayList<Way>();
-        List<Way> mouseOnExistingBuildingWays = new ArrayList<Way>();
-        mouseOnExistingWays = new ArrayList<Way>();
+        List<Way> mouseOnExistingWays = new ArrayList<>();
+        List<Way> mouseOnExistingBuildingWays = new ArrayList<>();
+        mouseOnExistingWays = new ArrayList<>();
         Node currentMouseNode = mv.getNearestNode(mousePos, OsmPrimitive.isSelectablePredicate);
         if (currentMouseNode != null) {
@@ -144,5 +144,5 @@
                     && !inputStreet.getText().equals("")) {
                 // house number already present but not linked to a street
-                Collection<Command> cmds = new LinkedList<Command>();
+                Collection<Command> cmds = new LinkedList<>();
                 addStreetNameOrRelation(currentMouseNode, cmds);
                 Command c = new SequenceCommand("Add node address", cmds);
@@ -164,5 +164,5 @@
                         inputStreet.setText(currentMouseNode.get(tagHouseStreet));
                         if (ctrl) {
-                            Collection<Command> cmds = new LinkedList<Command>();
+                            Collection<Command> cmds = new LinkedList<>();
                             addAddrToPrimitive(currentMouseNode, cmds);
                             if (num == null)
@@ -179,5 +179,5 @@
                             applyInputNumberChange();
                         }
-                        Collection<Command> cmds = new LinkedList<Command>();
+                        Collection<Command> cmds = new LinkedList<>();
                         addAddrToPrimitive(currentMouseNode, cmds);
                     } else {
@@ -206,5 +206,5 @@
                     Toolkit.getDefaultToolkit().beep();
                 } else {
-                    Collection<Command> cmds = new LinkedList<Command>();
+                    Collection<Command> cmds = new LinkedList<>();
                     if (ctrl) {
                         applyInputNumberChange();
@@ -305,5 +305,5 @@
         cmds.add(new AddCommand(n));
         List<WaySegment> wss = Main.map.mapView.getNearestWaySegments(e.getPoint(), OsmPrimitive.isSelectablePredicate);
-        Map<Way, List<Integer>> insertPoints = new HashMap<Way, List<Integer>>();
+        Map<Way, List<Integer>> insertPoints = new HashMap<>();
         for (WaySegment ws : wss) {
             List<Integer> is;
@@ -311,5 +311,5 @@
                 is = insertPoints.get(ws.way);
             } else {
-                is = new ArrayList<Integer>();
+                is = new ArrayList<>();
                 insertPoints.put(ws.way, is);
             }
@@ -317,7 +317,7 @@
             is.add(ws.lowerIndex);
         }
-        Set<Pair<Node,Node>> segSet = new HashSet<Pair<Node,Node>>();
-        ArrayList<Way> replacedWays = new ArrayList<Way>();
-        ArrayList<Way> reuseWays = new ArrayList<Way>();
+        Set<Pair<Node,Node>> segSet = new HashSet<>();
+        ArrayList<Way> replacedWays = new ArrayList<>();
+        ArrayList<Way> reuseWays = new ArrayList<>();
         for (Map.Entry<Way, List<Integer>> insertPoint : insertPoints.entrySet()) {
             Way w = insertPoint.getKey();
@@ -326,5 +326,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) {
@@ -403,5 +403,5 @@
         //if (is.size() < 2) return;
 
-        HashSet<Integer> is2 = new HashSet<Integer>();
+        HashSet<Integer> is2 = new HashSet<>();
         for (int i : is) {
             if (!is2.contains(i - 1) && !is2.contains(i + 1)) {
@@ -541,5 +541,5 @@
     
     private void setNewSelection(OsmPrimitive osm) {
-        Collection<OsmPrimitive> newSelection = new LinkedList<OsmPrimitive>(Main.main.getCurrentDataSet().getSelected());
+        Collection<OsmPrimitive> newSelection = new LinkedList<>(Main.main.getCurrentDataSet().getSelected());
         newSelection.clear();
         newSelection.add(osm);
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java	(revision 30736)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java	(revision 30737)
@@ -44,5 +44,5 @@
     public WMSLayer wmsLayer = null;
 
-    private ArrayList<GeorefImage> imagesToSave = new ArrayList<GeorefImage>();
+    private ArrayList<GeorefImage> imagesToSave = new ArrayList<>();
     private Lock imagesLock = new ReentrantLock();
 
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java	(revision 30736)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java	(revision 30737)
@@ -33,6 +33,6 @@
     private String lastWMSLayerName = null;
     private URL searchFormURL;
-    private Vector<String> listOfCommunes = new Vector<String>();
-    private Vector<String> listOfTA = new Vector<String>();
+    private Vector<String> listOfCommunes = new Vector<>();
+    private Vector<String> listOfTA = new Vector<>();
     class PlanImage {
         String name;
@@ -43,5 +43,5 @@
         }
     }
-    private Vector<PlanImage> listOfFeuilles = new Vector<PlanImage>();
+    private Vector<PlanImage> listOfFeuilles = new Vector<>();
     private long cookieTimestamp;
 
@@ -435,5 +435,5 @@
     private int selectFeuilleDialog() {
         JPanel p = new JPanel(new GridBagLayout());
-        Vector<String> imageNames = new Vector<String>();
+        Vector<String> imageNames = new Vector<>();
         for (PlanImage src : listOfFeuilles) {
             imageNames.add(src.name);
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java	(revision 30737)
@@ -422,5 +422,5 @@
                     zone = code - 27561;
                 } else {                                            // UTM_France_DOM
-                    Map<Integer, Integer> utmfr = new HashMap<Integer, Integer>();
+                    Map<Integer, Integer> utmfr = new HashMap<>();
                     utmfr.put(2969, 0);
                     utmfr.put(2970, 1);
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CheckSourceUploadHook.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CheckSourceUploadHook.java	(revision 30736)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CheckSourceUploadHook.java	(revision 30737)
@@ -39,5 +39,5 @@
     {
         if (CadastrePlugin.autoSourcing && CadastrePlugin.pluginUsed && !apiDataSet.getPrimitivesToAdd().isEmpty()) {
-            Collection<OsmPrimitive> sel = new HashSet<OsmPrimitive>();
+            Collection<OsmPrimitive> sel = new HashSet<>();
             for (OsmPrimitive osm : apiDataSet.getPrimitivesToAdd()) {
                 if ((osm instanceof Way && (osm.getKeys().size() == 0 || !tagSourceExist(osm)))
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java	(revision 30736)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java	(revision 30737)
@@ -99,9 +99,9 @@
     private void createBuildings(String svg) {
         String[] SVGpaths = new SVGParser().getClosedPaths(svg);
-        ArrayList<ArrayList<EastNorth>> eastNorths = new ArrayList<ArrayList<EastNorth>>();
+        ArrayList<ArrayList<EastNorth>> eastNorths = new ArrayList<>();
 
         // convert SVG nodes to eastNorth coordinates
         for (int i=0; i< SVGpaths.length; i++) {
-            ArrayList<EastNorth> eastNorth = new ArrayList<EastNorth>();
+            ArrayList<EastNorth> eastNorth = new ArrayList<>();
             createNodes(SVGpaths[i], eastNorth);
             if (eastNorth.size() > 2)
@@ -156,5 +156,5 @@
         }
 
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
         for (Node node : svgDataSet.getNodes())
             if (!node.isDeleted())
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGTask.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGTask.java	(revision 30736)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGTask.java	(revision 30737)
@@ -104,8 +104,8 @@
     private void createWay(String svg) {
         String[] SVGpaths = new SVGParser().getClosedPaths(svg);
-        ArrayList<Double> fitViewBox = new ArrayList<Double>();
-        ArrayList<ArrayList<EastNorth>> eastNorths = new ArrayList<ArrayList<EastNorth>>();
+        ArrayList<Double> fitViewBox = new ArrayList<>();
+        ArrayList<ArrayList<EastNorth>> eastNorths = new ArrayList<>();
         for (int i=0; i< SVGpaths.length; i++) {
-            ArrayList<EastNorth> eastNorth = new ArrayList<EastNorth>();
+            ArrayList<EastNorth> eastNorth = new ArrayList<>();
             fitViewBox.add( createNodes(SVGpaths[i], eastNorth) );
             eastNorths.add(eastNorth);
@@ -114,10 +114,10 @@
         Double min = Collections.min(fitViewBox);
         int bestPath = fitViewBox.indexOf(min);
-        List<Node> nodeList = new ArrayList<Node>();
+        List<Node> nodeList = new ArrayList<>();
         for (EastNorth eastNorth : eastNorths.get(bestPath)) {
             nodeList.add(new Node(Main.getProjection().eastNorth2latlon(eastNorth)));
         }
         Way wayToAdd = new Way();
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
         for (Node node : nodeList) {
             cmds.add(new AddCommand(node));
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/GrabThread.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/GrabThread.java	(revision 30736)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/GrabThread.java	(revision 30737)
@@ -25,5 +25,5 @@
     private Lock lockImagesToGrag = new ReentrantLock();
 
-    private ArrayList<EastNorthBound> imagesToGrab = new ArrayList<EastNorthBound>();
+    private ArrayList<EastNorthBound> imagesToGrab = new ArrayList<>();
 
     private CacheControl cacheControl = null;
@@ -58,5 +58,5 @@
     
     public ArrayList<EastNorthBound> getImagesToGrabCopy() {
-        ArrayList<EastNorthBound> copyList = new ArrayList<EastNorthBound>(); 
+        ArrayList<EastNorthBound> copyList = new ArrayList<>(); 
         lockImagesToGrag.lock();
         for (EastNorthBound img : imagesToGrab) {
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/SVGParser.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/SVGParser.java	(revision 30736)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/SVGParser.java	(revision 30737)
@@ -47,5 +47,5 @@
      */
     public String [] getClosedPaths(String svg) {
-        ArrayList<String> path = new ArrayList<String>();
+        ArrayList<String> path = new ArrayList<>();
         int i = 0;
         while (svg.indexOf(cPathStart, i) != -1) {
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/SimplifyWay.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/SimplifyWay.java	(revision 30736)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/SimplifyWay.java	(revision 30737)
@@ -23,5 +23,5 @@
     public void simplifyWayRange(Way wnew, int from, int to, double thr) {
         if (to - from >= 2) {
-            ArrayList<Node> ns = new ArrayList<Node>();
+            ArrayList<Node> ns = new ArrayList<>();
             simplifyWayRange(wnew, from, to, ns, thr);
             List<Node> nodes = wnew.getNodes();
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSDownloadAction.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSDownloadAction.java	(revision 30736)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSDownloadAction.java	(revision 30737)
@@ -25,5 +25,5 @@
     public static WMSLayer getLayer() {
         // check if we already have a layer created. if not, create; if yes, reuse.
-        ArrayList<WMSLayer> existingWMSlayers = new ArrayList<WMSLayer>();
+        ArrayList<WMSLayer> existingWMSlayers = new ArrayList<>();
         if (Main.map != null) {
             Layer activeLayer = Main.map.mapView.getActiveLayer();
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java	(revision 30736)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java	(revision 30737)
@@ -54,5 +54,5 @@
             CadastrePlugin.class.getResource("/images/cadastre_small.png")));
 
-    private Vector<GeorefImage> images = new Vector<GeorefImage>();
+    private Vector<GeorefImage> images = new Vector<>();
 
     public Lock imagesLock = new ReentrantLock();
@@ -67,5 +67,5 @@
     public static int currentFormat;
 
-    private ArrayList<EastNorthBound> dividedBbox = new ArrayList<EastNorthBound>();
+    private ArrayList<EastNorthBound> dividedBbox = new ArrayList<>();
 
     private String location = "";
@@ -540,6 +540,6 @@
             int oldImgWidth = images.get(0).image.getWidth();
             int oldImgHeight = images.get(0).image.getHeight();
-            HashSet<Double> lx = new HashSet<Double>();
-            HashSet<Double> ly = new HashSet<Double>();
+            HashSet<Double> lx = new HashSet<>();
+            HashSet<Double> ly = new HashSet<>();
             for (GeorefImage img : images) {
                 lx.add(img.min.east());
Index: applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanVecTile.java
===================================================================
--- applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanVecTile.java	(revision 30736)
+++ applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanVecTile.java	(revision 30737)
@@ -25,8 +25,8 @@
 	CanvecLayer layer;
 	public boolean can_download = false;
-	private ArrayList<String> sub_tile_ids = new ArrayList<String>();
+	private ArrayList<String> sub_tile_ids = new ArrayList<>();
 	private boolean zip_scanned = false;
 	
-	private ArrayList<CanVecTile> sub_tiles = new ArrayList<CanVecTile>();
+	private ArrayList<CanVecTile> sub_tiles = new ArrayList<>();
 	private boolean sub_tiles_made = false;
 
@@ -232,5 +232,5 @@
 	}
 	private void make_sub_tiles(int layer) {
-		ArrayList<String> buffer = new ArrayList<String>();
+		ArrayList<String> buffer = new ArrayList<>();
 		Pattern p;
 		if (sub_tiles_made) return;
@@ -250,5 +250,5 @@
 				} else {
 					sub_tiles.add(new CanVecTile(corda,last_cell,0,"",this.layer,buffer));
-					buffer = new ArrayList<String>();
+					buffer = new ArrayList<>();
 					buffer.add(m.group(0));
 				}
@@ -271,5 +271,5 @@
 				} else {
 					sub_tiles.add(new CanVecTile(corda,cordb,last_cell2,"",this.layer,buffer));
-					buffer = new ArrayList<String>();
+					buffer = new ArrayList<>();
 					buffer.add(m.group(0));
 				}
Index: applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecLayer.java
===================================================================
--- applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecLayer.java	(revision 30736)
+++ applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecLayer.java	(revision 30737)
@@ -36,7 +36,7 @@
 	private int max_zoom = 4;
 	public CanvecHelper plugin_self;
-	private ArrayList<CanVecTile> tiles = new ArrayList<CanVecTile>();
-	public ArrayList<CanVecTile> downloadable = new ArrayList<CanVecTile>();
-	public ArrayList<CanVecTile> openable = new ArrayList<CanVecTile>();
+	private ArrayList<CanVecTile> tiles = new ArrayList<>();
+	public ArrayList<CanVecTile> downloadable = new ArrayList<>();
+	public ArrayList<CanVecTile> openable = new ArrayList<>();
 
 	public CanvecLayer(String name,CanvecHelper self){
@@ -56,5 +56,5 @@
 			String line;
 			int last_cell = -1;
-			ArrayList<String> list = new ArrayList<String>();
+			ArrayList<String> list = new ArrayList<>();
 			while ((line = br.readLine()) != null) {
 				Matcher m = p.matcher(line);
@@ -66,5 +66,5 @@
 						CanVecTile tile = new CanVecTile(last_cell,"",0,"",this,list);
 						if (tile.isValid()) tiles.add(tile);
-						list = new ArrayList<String>();
+						list = new ArrayList<>();
 						list.add(m.group(0));
 					}
@@ -205,6 +205,6 @@
 		//long start = System.currentTimeMillis();
 		//System.out.println("painting the area covered by "+bounds.toString());
-		downloadable = new ArrayList<CanVecTile>();
-		openable = new ArrayList<CanVecTile>();
+		downloadable = new ArrayList<>();
+		openable = new ArrayList<>();
 		// loop over each canvec tile in the db and check bounds.intersects(Bounds)
 		g.setColor(Color.red);
Index: applications/editors/josm/plugins/colorscheme/src/at/dallermassl/josm/plugin/colorscheme/ColorSchemePreference.java
===================================================================
--- applications/editors/josm/plugins/colorscheme/src/at/dallermassl/josm/plugin/colorscheme/ColorSchemePreference.java	(revision 30736)
+++ applications/editors/josm/plugins/colorscheme/src/at/dallermassl/josm/plugin/colorscheme/ColorSchemePreference.java	(revision 30737)
@@ -56,5 +56,5 @@
 
         Map<String, String> colorMap = Main.pref.getAllPrefix(PREF_KEY_COLOR_PREFIX);
-        colorKeys = new ArrayList<String>(colorMap.keySet());
+        colorKeys = new ArrayList<>(colorMap.keySet());
         Collections.sort(colorKeys);
         listModel = new DefaultListModel<>();
@@ -187,5 +187,5 @@
         String colorKey;
         String prefix = PREF_KEY_SCHEMES_PREFIX + schemeName + "." + PREF_KEY_COLOR_PREFIX;
-        Map<String, String>colorMap = new HashMap<String, String>();
+        Map<String, String>colorMap = new HashMap<>();
         for(String schemeColorKey : Main.pref.getAllPrefix(prefix).keySet()) {
             colorKey = schemeColorKey.substring(prefix.length());
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java	(revision 30737)
@@ -58,5 +58,5 @@
 
     private JMenu czechMenu;
-    private List<JMenuItem> menuItems = new ArrayList<JMenuItem>();
+    private List<JMenuItem> menuItems = new ArrayList<>();
     private static Logger logger = Logger.getLogger(CzechAddressPlugin.class.getName());
 
@@ -174,5 +174,5 @@
     }
 
-    static private final Set<StatusListener> listeners = new HashSet<StatusListener>();
+    static private final Set<StatusListener> listeners = new HashSet<>();
     static public synchronized void addStatusListener(StatusListener l)    {listeners.add(l);}
     static public synchronized void removeStatusListener(StatusListener l) {listeners.remove(l);}
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/StringUtils.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/StringUtils.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/StringUtils.java	(revision 30737)
@@ -63,6 +63,6 @@
         s2 = anglicize(s2);
 
-        List<Integer> beg1 = new ArrayList<Integer>(4);
-        List<Integer> beg2 = new ArrayList<Integer>(4);
+        List<Integer> beg1 = new ArrayList<>(4);
+        List<Integer> beg2 = new ArrayList<>(4);
 
         char lastChar = ' ';
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java	(revision 30737)
@@ -55,5 +55,5 @@
 
         Collection<Way> selectedWays = Main.main.getCurrentDataSet().getSelectedWays();
-        Collection<Way> newSelection = new LinkedList<Way>(Main.main.getCurrentDataSet().getSelectedWays());
+        Collection<Way> newSelection = new LinkedList<>(Main.main.getCurrentDataSet().getSelectedWays());
 
         for (Way area : selectedWays) {
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Database.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Database.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Database.java	(revision 30737)
@@ -29,5 +29,5 @@
      * List of regions, which are in this database.
      */
-    public ArrayList<Region> regions = new ArrayList<Region>();
+    public ArrayList<Region> regions = new ArrayList<>();
 
     public Region findRegion(String name, String nuts3, String nuts4) {
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ElementWithHouses.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ElementWithHouses.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ElementWithHouses.java	(revision 30737)
@@ -18,5 +18,5 @@
     }
 
-    protected List<House> houses = new ArrayList<House>(30);
+    protected List<House> houses = new ArrayList<>(30);
 
     /**
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ElementWithStreets.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ElementWithStreets.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ElementWithStreets.java	(revision 30737)
@@ -13,5 +13,5 @@
 public abstract class ElementWithStreets extends ElementWithHouses {
 
-    private ArrayList<Street> streets = new ArrayList<Street>();
+    private ArrayList<Street> streets = new ArrayList<>();
 
     public ElementWithStreets(String name) {
@@ -78,5 +78,5 @@
     public List<House> getAllHouses() {
         // We make an conservative estimate...
-        List<House> result = new ArrayList<House>(20 * streets.size());
+        List<House> result = new ArrayList<>(20 * streets.size());
 
         result.addAll(this.houses);
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/House.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/House.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/House.java	(revision 30737)
@@ -189,5 +189,5 @@
     public List<Proposal> getDiff(OsmPrimitive prim) {
 
-        List<Proposal> props = new NotNullList<Proposal>();
+        List<Proposal> props = new NotNullList<>();
         ParentResolver resolver = new ParentResolver(this);
 
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Region.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Region.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Region.java	(revision 30737)
@@ -12,5 +12,5 @@
 
     private ArrayList<ViToCi> vitocis
-            = new ArrayList<ViToCi>();
+            = new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Street.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Street.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Street.java	(revision 30737)
@@ -43,5 +43,5 @@
     @Override
     public List<Proposal> getDiff(OsmPrimitive prim) {
-        List<Proposal> props = new NotNullList<Proposal>();
+        List<Proposal> props = new NotNullList<>();
 
         props.add(getStringFieldDiff(PrimUtils.KEY_NAME, prim.get(PrimUtils.KEY_NAME), getName()));
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ViToCi.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ViToCi.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ViToCi.java	(revision 30737)
@@ -11,5 +11,5 @@
 public class ViToCi extends ElementWithStreets {
 
-    private ArrayList<Suburb> suburbs = new ArrayList<Suburb>();
+    private ArrayList<Suburb> suburbs = new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ConflictResolver.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ConflictResolver.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ConflictResolver.java	(revision 30737)
@@ -327,7 +327,7 @@
     private class ConflictsModel implements ComboBoxModel<Object> {
 
-        ArrayList<AddressElement> elements = new ArrayList<AddressElement>();
-        ArrayList<OsmPrimitive> primitives = new ArrayList<OsmPrimitive>();
-        Set<ListDataListener> listeners = new HashSet<ListDataListener>();
+        ArrayList<AddressElement> elements = new ArrayList<>();
+        ArrayList<OsmPrimitive> primitives = new ArrayList<>();
+        Set<ListDataListener> listeners = new HashSet<>();
 
         Object selected = null;
@@ -470,5 +470,5 @@
         if (selected instanceof AddressElement) {
             AddressElement selElem = (AddressElement) selected;
-            List<OsmPrimitive> conflPrims = new NotNullList<OsmPrimitive>();
+            List<OsmPrimitive> conflPrims = new NotNullList<>();
             conflPrims.addAll(Reasoner.getInstance().getCandidates(selElem));
             Collections.sort(conflPrims, PrimUtils.comparator);
@@ -477,5 +477,5 @@
         } else if (selected instanceof OsmPrimitive) {
             OsmPrimitive selElem = (OsmPrimitive) selected;
-            List<AddressElement> conflElems = new NotNullList<AddressElement>();
+            List<AddressElement> conflElems = new NotNullList<>();
             conflElems.addAll(Reasoner.getInstance().getCandidates(selElem));
             Collections.sort(conflElems);
@@ -514,5 +514,5 @@
     private class CandidatesModel<E> implements ComboBoxModel<E> {
 
-        Set<ListDataListener> listeners = new HashSet<ListDataListener>();
+        Set<ListDataListener> listeners = new HashSet<>();
         List<? extends E> primitives;
         Object selected = null;
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java	(revision 30737)
@@ -473,5 +473,5 @@
 
         private List<ElementWithHouses> metaElem
-                = new ArrayList<ElementWithHouses>();
+                = new ArrayList<>();
 
         public StreetListModel() {
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java	(revision 30737)
@@ -33,9 +33,9 @@
 
     protected ElementWithStreets selectedElement;
-    protected ArrayList<ItemListener> listeners = new ArrayList<ItemListener>();
+    protected ArrayList<ItemListener> listeners = new ArrayList<>();
     int regionHlIndex, vitociHlIndex, suburbHlIndex;
-    protected ArrayList<AddressElement> hlRegions = new ArrayList<AddressElement>();
-    protected ArrayList<AddressElement> hlViToCis = new ArrayList<AddressElement>();
-    protected ArrayList<AddressElement> hlSuburbs = new ArrayList<AddressElement>();
+    protected ArrayList<AddressElement> hlRegions = new ArrayList<>();
+    protected ArrayList<AddressElement> hlViToCis = new ArrayList<>();
+    protected ArrayList<AddressElement> hlSuburbs = new ArrayList<>();
 
 
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java	(revision 30737)
@@ -36,5 +36,5 @@
 public class ManagerDialog extends ExtendedDialog {
 
-    RenameModel<Street> streetModel = new RenameModel<Street>();
+    RenameModel<Street> streetModel = new RenameModel<>();
 
     public ManagerDialog() {
@@ -382,6 +382,6 @@
     private class RenameModel<Element> implements TableModel {
 
-        List<Element> elems = new ArrayList<Element>();
-        List<String>  names = new ArrayList<String>();
+        List<Element> elems = new ArrayList<>();
+        List<String>  names = new ArrayList<>();
 
         public int getRowCount() {
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java	(revision 30737)
@@ -137,5 +137,5 @@
         OsmPrimitive prim = this.proposalContainer.getTarget();
         Reasoner r = Reasoner.getInstance();
-        List<AddressElement> elems = new NotNullList<AddressElement>();
+        List<AddressElement> elems = new NotNullList<>();
 
         synchronized (r) {
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedComboBoxModel.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedComboBoxModel.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedComboBoxModel.java	(revision 30737)
@@ -18,5 +18,5 @@
 public abstract class HalfCookedComboBoxModel<E> implements ComboBoxModel<E> {
 
-    List<ListDataListener> listeners = new ArrayList<ListDataListener>();
+    List<ListDataListener> listeners = new ArrayList<>();
 
     @Override
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedListModel.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedListModel.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedListModel.java	(revision 30737)
@@ -18,5 +18,5 @@
 public abstract class HalfCookedListModel<E> implements ListModel<E> {
 
-    List<ListDataListener> listeners = new ArrayList<ListDataListener>();
+    List<ListDataListener> listeners = new ArrayList<>();
 
     @Override
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedTreeModel.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedTreeModel.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedTreeModel.java	(revision 30737)
@@ -20,5 +20,5 @@
 public abstract class HalfCookedTreeModel implements TreeModel {
 
-    List<TreeModelListener> listeneres = new ArrayList<TreeModelListener>();
+    List<TreeModelListener> listeneres = new ArrayList<>();
 
     protected String root;
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/Capitalizator.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/Capitalizator.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/Capitalizator.java	(revision 30737)
@@ -33,8 +33,8 @@
         int expResults = elems.size()/2;
 
-        map  = new HashMap<Street, OsmPrimitive>(expResults);
+        map  = new HashMap<>(expResults);
         ExecutorService serv = Executors.newCachedThreadPool();
         Map<Street, Future<OsmPrimitive>> results
-                = new HashMap<Street, Future<OsmPrimitive>>(expResults);
+                = new HashMap<>(expResults);
 
         for (Street elem : elems)
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/Reasoner.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/Reasoner.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/Reasoner.java	(revision 30737)
@@ -44,15 +44,15 @@
 
     private     Map<OsmPrimitive, AddressElement> primBestIndex
-      = new HashMap<OsmPrimitive, AddressElement> ();
+      = new HashMap<> ();
     private     Map<AddressElement, OsmPrimitive> elemBestIndex
-      = new HashMap<AddressElement, OsmPrimitive> ();
+      = new HashMap<> ();
 
     private     Map<OsmPrimitive,   Map<AddressElement, Integer>> primMatchIndex
-      = new HashMap<OsmPrimitive,   Map<AddressElement, Integer>> ();
+      = new HashMap<> ();
     private     Map<AddressElement, Map<OsmPrimitive,   Integer>> elemMatchIndex
-      = new HashMap<AddressElement, Map<OsmPrimitive,   Integer>> ();
-
-    private Set<OsmPrimitive>   primToUpdate = new HashSet<OsmPrimitive>();
-    private Set<AddressElement> elemToUpdate = new HashSet<AddressElement>();
+      = new HashMap<> ();
+
+    private Set<OsmPrimitive>   primToUpdate = new HashSet<>();
+    private Set<AddressElement> elemToUpdate = new HashSet<>();
 
     public static Logger logger = Logger.getLogger(Reasoner.class.getName());
@@ -127,6 +127,6 @@
         assert transactionOpened;
 
-        Set<AddressElement> elemChanges = new HashSet<AddressElement>();
-        Set<OsmPrimitive>   primChanges = new HashSet<OsmPrimitive>();
+        Set<AddressElement> elemChanges = new HashSet<>();
+        Set<OsmPrimitive>   primChanges = new HashSet<>();
 
         for (OsmPrimitive prim : primToUpdate) {
@@ -204,5 +204,5 @@
         if (matches == null) {
             logger.log(Level.FINE, "new primitive detected", AddressElement.getName(prim));
-            matches = new HashMap<AddressElement, Integer>();
+            matches = new HashMap<>();
             primMatchIndex.put(prim, matches);
             primToUpdate.add(prim);
@@ -232,5 +232,5 @@
         if (matches == null) {
             logger.log(Level.FINE, "new element detected", elem);
-            matches = new HashMap<OsmPrimitive, Integer>();
+            matches = new HashMap<>();
             elemMatchIndex.put(elem, matches);
             elemToUpdate.add(elem);
@@ -472,5 +472,5 @@
     public Set<AddressElement> getCandidates(OsmPrimitive prim) {
 
-        Set<AddressElement> result = new HashSet<AddressElement>();
+        Set<AddressElement> result = new HashSet<>();
         if (primMatchIndex.get(prim) == null) return result;
 
@@ -506,5 +506,5 @@
     public Set<OsmPrimitive> getCandidates(AddressElement elem) {
 
-        Set<OsmPrimitive> result = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> result = new HashSet<>();
         if (elemMatchIndex.get(elem) == null) return result;
 
@@ -627,5 +627,5 @@
      */
     public Set<AddressElement> getUnassignedElements() {
-        Set<AddressElement> result = new HashSet<AddressElement>();
+        Set<AddressElement> result = new HashSet<>();
         for (AddressElement elem : elemMatchIndex.keySet())
             if (translate(elem) == null)
@@ -638,5 +638,5 @@
      */
     public Set<OsmPrimitive> getUnassignedPrimitives() {
-        Set<OsmPrimitive> result = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> result = new HashSet<>();
         for (OsmPrimitive prim : primMatchIndex.keySet())
             if (translate(prim) == null)
@@ -650,5 +650,5 @@
      */
     public Set<AddressElement> getAllElements() {
-        Set<AddressElement> result = new HashSet<AddressElement>();
+        Set<AddressElement> result = new HashSet<>();
         result.addAll(elemMatchIndex.keySet());
         return result;
@@ -660,5 +660,5 @@
      */
     public Set<OsmPrimitive> getAllPrimitives() {
-        Set<OsmPrimitive> result = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> result = new HashSet<>();
         result.addAll(primMatchIndex.keySet());
         return result;
@@ -695,5 +695,5 @@
      * Set of listeners currently hooked to changes in this reasoner.
      */
-    private Set<ReasonerListener> listeners = new HashSet<ReasonerListener>();
+    private Set<ReasonerListener> listeners = new HashSet<>();
 
     /**
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/SelectionMonitor.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/SelectionMonitor.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/SelectionMonitor.java	(revision 30737)
@@ -20,5 +20,5 @@
 public class SelectionMonitor implements SelectionChangedListener {
 
-    Collection<OsmPrimitive> lastSelection = new NotNullList<OsmPrimitive>();
+    Collection<OsmPrimitive> lastSelection = new NotNullList<>();
 
     private SelectionMonitor() {}
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ProposalContainer.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ProposalContainer.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ProposalContainer.java	(revision 30737)
@@ -29,5 +29,5 @@
      */
     private List<ListDataListener> listeners =
-            new ArrayList<ListDataListener>();
+            new ArrayList<>();
 
     /**
@@ -64,5 +64,5 @@
      * The list of proposals to be applied to encapsulated primitive.
      */
-    protected List<Proposal> proposals = new ArrayList<Proposal>();
+    protected List<Proposal> proposals = new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ProposalDatabase.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ProposalDatabase.java	(revision 30736)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ProposalDatabase.java	(revision 30737)
@@ -25,5 +25,5 @@
      */
     protected List<ProposalContainer> changeSet =
-             new ArrayList<ProposalContainer>();
+             new ArrayList<>();
 
     /**
@@ -31,5 +31,5 @@
      */
     protected List<TreeModelListener> listeners =
-            new ArrayList<TreeModelListener>();
+            new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java	(revision 30737)
@@ -48,5 +48,5 @@
     public void importData(File file, ProgressMonitor progressMonitor) throws IOException {
         // create the data tree
-        List<WayPoint> currentTrackSeg = new ArrayList<WayPoint>();
+        List<WayPoint> currentTrackSeg = new ArrayList<>();
 
         int imported = 0;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java	(revision 30737)
@@ -160,8 +160,8 @@
                             XMLGregorianCalendar startTime = activityLap
                                     .getStartTime();
-                            Collection<Collection<WayPoint>> currentTrack = new ArrayList<Collection<WayPoint>>();
+                            Collection<Collection<WayPoint>> currentTrack = new ArrayList<>();
                             for (TrackT track : activityLap.getTrack()) {
                                 if (track.getTrackpoint() != null) {
-                                    Collection<WayPoint> currentTrackSeg = new ArrayList<WayPoint>();
+                                    Collection<WayPoint> currentTrackSeg = new ArrayList<>();
                                     currentTrack.add(currentTrackSeg);
                                     for (TrackpointT tp :
@@ -198,8 +198,8 @@
             for (CourseT course : tcd.getCourses().getCourse()) {
                 if (course.getTrack() != null) {
-                    Collection<Collection<WayPoint>> currentTrack = new ArrayList<Collection<WayPoint>>();
+                    Collection<Collection<WayPoint>> currentTrack = new ArrayList<>();
                     for (TrackT track : course.getTrack()) {
                         if (track.getTrackpoint() != null) {
-                            Collection<WayPoint> currentTrackSeg = new ArrayList<WayPoint>();
+                            Collection<WayPoint> currentTrackSeg = new ArrayList<>();
                             currentTrack.add(currentTrackSeg);
                             for (TrackpointT tp : track.getTrackpoint()) {
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ActivityLapT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ActivityLapT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ActivityLapT.java	(revision 30737)
@@ -313,5 +313,5 @@
     public List<TrackT> getTrack() {
         if (track == null) {
-            track = new ArrayList<TrackT>();
+            track = new ArrayList<>();
         }
         return this.track;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ActivityListT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ActivityListT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ActivityListT.java	(revision 30737)
@@ -73,5 +73,5 @@
     public List<ActivityT> getActivity() {
         if (activity == null) {
-            activity = new ArrayList<ActivityT>();
+            activity = new ArrayList<>();
         }
         return this.activity;
@@ -102,5 +102,5 @@
     public List<MultiSportSessionT> getMultiSportSession() {
         if (multiSportSession == null) {
-            multiSportSession = new ArrayList<MultiSportSessionT>();
+            multiSportSession = new ArrayList<>();
         }
         return this.multiSportSession;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ActivityT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ActivityT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ActivityT.java	(revision 30737)
@@ -120,5 +120,5 @@
     public List<ActivityLapT> getLap() {
         if (lap == null) {
-            lap = new ArrayList<ActivityLapT>();
+            lap = new ArrayList<>();
         }
         return this.lap;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/CourseFolderT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/CourseFolderT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/CourseFolderT.java	(revision 30737)
@@ -85,5 +85,5 @@
     public List<CourseFolderT> getFolder() {
         if (folder == null) {
-            folder = new ArrayList<CourseFolderT>();
+            folder = new ArrayList<>();
         }
         return this.folder;
@@ -114,5 +114,5 @@
     public List<NameKeyReferenceT> getCourseNameRef() {
         if (courseNameRef == null) {
-            courseNameRef = new ArrayList<NameKeyReferenceT>();
+            courseNameRef = new ArrayList<>();
         }
         return this.courseNameRef;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/CourseListT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/CourseListT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/CourseListT.java	(revision 30737)
@@ -69,5 +69,5 @@
     public List<CourseT> getCourse() {
         if (course == null) {
-            course = new ArrayList<CourseT>();
+            course = new ArrayList<>();
         }
         return this.course;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/CourseT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/CourseT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/CourseT.java	(revision 30737)
@@ -120,5 +120,5 @@
     public List<CourseLapT> getLap() {
         if (lap == null) {
-            lap = new ArrayList<CourseLapT>();
+            lap = new ArrayList<>();
         }
         return this.lap;
@@ -149,5 +149,5 @@
     public List<TrackT> getTrack() {
         if (track == null) {
-            track = new ArrayList<TrackT>();
+            track = new ArrayList<>();
         }
         return this.track;
@@ -202,5 +202,5 @@
     public List<CoursePointT> getCoursePoint() {
         if (coursePoint == null) {
-            coursePoint = new ArrayList<CoursePointT>();
+            coursePoint = new ArrayList<>();
         }
         return this.coursePoint;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ExtensionsT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ExtensionsT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ExtensionsT.java	(revision 30737)
@@ -71,5 +71,5 @@
     public List<Object> getAny() {
         if (any == null) {
-            any = new ArrayList<Object>();
+            any = new ArrayList<>();
         }
         return this.any;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/HistoryFolderT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/HistoryFolderT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/HistoryFolderT.java	(revision 30737)
@@ -89,5 +89,5 @@
     public List<HistoryFolderT> getFolder() {
         if (folder == null) {
-            folder = new ArrayList<HistoryFolderT>();
+            folder = new ArrayList<>();
         }
         return this.folder;
@@ -118,5 +118,5 @@
     public List<ActivityReferenceT> getActivityRef() {
         if (activityRef == null) {
-            activityRef = new ArrayList<ActivityReferenceT>();
+            activityRef = new ArrayList<>();
         }
         return this.activityRef;
@@ -147,5 +147,5 @@
     public List<WeekT> getWeek() {
         if (week == null) {
-            week = new ArrayList<WeekT>();
+            week = new ArrayList<>();
         }
         return this.week;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/MultiSportFolderT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/MultiSportFolderT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/MultiSportFolderT.java	(revision 30737)
@@ -89,5 +89,5 @@
     public List<MultiSportFolderT> getFolder() {
         if (folder == null) {
-            folder = new ArrayList<MultiSportFolderT>();
+            folder = new ArrayList<>();
         }
         return this.folder;
@@ -118,5 +118,5 @@
     public List<ActivityReferenceT> getMultisportActivityRef() {
         if (multisportActivityRef == null) {
-            multisportActivityRef = new ArrayList<ActivityReferenceT>();
+            multisportActivityRef = new ArrayList<>();
         }
         return this.multisportActivityRef;
@@ -147,5 +147,5 @@
     public List<WeekT> getWeek() {
         if (week == null) {
-            week = new ArrayList<WeekT>();
+            week = new ArrayList<>();
         }
         return this.week;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/MultiSportSessionT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/MultiSportSessionT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/MultiSportSessionT.java	(revision 30737)
@@ -132,5 +132,5 @@
     public List<NextSportT> getNextSport() {
         if (nextSport == null) {
-            nextSport = new ArrayList<NextSportT>();
+            nextSport = new ArrayList<>();
         }
         return this.nextSport;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ObjectFactory.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ObjectFactory.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/ObjectFactory.java	(revision 30737)
@@ -471,5 +471,5 @@
     @XmlElementDecl(namespace = "http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2", name = "TrainingCenterDatabase")
     public JAXBElement<TrainingCenterDatabaseT> createTrainingCenterDatabase(TrainingCenterDatabaseT value) {
-        return new JAXBElement<TrainingCenterDatabaseT>(_TrainingCenterDatabase_QNAME, TrainingCenterDatabaseT.class, null, value);
+        return new JAXBElement<>(_TrainingCenterDatabase_QNAME, TrainingCenterDatabaseT.class, null, value);
     }
 
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/RepeatT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/RepeatT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/RepeatT.java	(revision 30737)
@@ -91,5 +91,5 @@
     public List<AbstractStepT> getChild() {
         if (child == null) {
-            child = new ArrayList<AbstractStepT>();
+            child = new ArrayList<>();
         }
         return this.child;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/TrackT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/TrackT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/TrackT.java	(revision 30737)
@@ -69,5 +69,5 @@
     public List<TrackpointT> getTrackpoint() {
         if (trackpoint == null) {
-            trackpoint = new ArrayList<TrackpointT>();
+            trackpoint = new ArrayList<>();
         }
         return this.trackpoint;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/WorkoutFolderT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/WorkoutFolderT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/WorkoutFolderT.java	(revision 30737)
@@ -81,5 +81,5 @@
     public List<WorkoutFolderT> getFolder() {
         if (folder == null) {
-            folder = new ArrayList<WorkoutFolderT>();
+            folder = new ArrayList<>();
         }
         return this.folder;
@@ -110,5 +110,5 @@
     public List<NameKeyReferenceT> getWorkoutNameRef() {
         if (workoutNameRef == null) {
-            workoutNameRef = new ArrayList<NameKeyReferenceT>();
+            workoutNameRef = new ArrayList<>();
         }
         return this.workoutNameRef;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/WorkoutListT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/WorkoutListT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/WorkoutListT.java	(revision 30737)
@@ -69,5 +69,5 @@
     public List<WorkoutT> getWorkout() {
         if (workout == null) {
-            workout = new ArrayList<WorkoutT>();
+            workout = new ArrayList<>();
         }
         return this.workout;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/WorkoutT.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/WorkoutT.java	(revision 30736)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/tcx/WorkoutT.java	(revision 30737)
@@ -123,5 +123,5 @@
     public List<AbstractStepT> getStep() {
         if (step == null) {
-            step = new ArrayList<AbstractStepT>();
+            step = new ArrayList<>();
         }
         return this.step;
@@ -152,5 +152,5 @@
     public List<XMLGregorianCalendar> getScheduledOn() {
         if (scheduledOn == null) {
-            scheduledOn = new ArrayList<XMLGregorianCalendar>();
+            scheduledOn = new ArrayList<>();
         }
         return this.scheduledOn;
Index: applications/editors/josm/plugins/download_along/src/org/openstreetmap/josm/plugin/download_along/DownloadAlongWayAction.java
===================================================================
--- applications/editors/josm/plugins/download_along/src/org/openstreetmap/josm/plugin/download_along/DownloadAlongWayAction.java	(revision 30736)
+++ applications/editors/josm/plugins/download_along/src/org/openstreetmap/josm/plugin/download_along/DownloadAlongWayAction.java	(revision 30737)
@@ -98,5 +98,5 @@
             for (Node p : way.getNodes()) {
                 LatLon c = p.getCoor();
-                ArrayList<LatLon> intermediateNodes = new ArrayList<LatLon>();
+                ArrayList<LatLon> intermediateNodes = new ArrayList<>();
                 if (previous != null && c.greatCircleDistance(previous) > buffer_dist) {
                     Double d = c.greatCircleDistance(previous) / buffer_dist;
Index: applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/data/EditGpxData.java
===================================================================
--- applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/data/EditGpxData.java	(revision 30736)
+++ applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/data/EditGpxData.java	(revision 30737)
@@ -12,8 +12,8 @@
 public class EditGpxData {
 
-    private final List<EditGpxTrack> tracks = new ArrayList<EditGpxTrack>();
+    private final List<EditGpxTrack> tracks = new ArrayList<>();
     // Only copy of routes and waypoints to preserve all info when converting back to gpx track
-    private final List<GpxRoute> routes = new ArrayList<GpxRoute>();
-    private final List<WayPoint> waypoints = new ArrayList<WayPoint>();
+    private final List<GpxRoute> routes = new ArrayList<>();
+    private final List<WayPoint> waypoints = new ArrayList<>();
 
     public void load(GpxData data) {
Index: applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/data/EditGpxTrack.java
===================================================================
--- applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/data/EditGpxTrack.java	(revision 30736)
+++ applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/data/EditGpxTrack.java	(revision 30737)
@@ -19,6 +19,6 @@
 public class EditGpxTrack {
 
-    private final List<EditGpxTrackSegment> segments = new ArrayList<EditGpxTrackSegment>();
-    private final Map<String, Object> attributes = new HashMap<String, Object>();
+    private final List<EditGpxTrackSegment> segments = new ArrayList<>();
+    private final Map<String, Object> attributes = new HashMap<>();
     private boolean isDeleted;
 
@@ -39,5 +39,5 @@
     public GpxTrack createGpxTrack(boolean anonTime, double minTime) {
 
-        Collection<Collection<WayPoint>> wayPoints = new ArrayList<Collection<WayPoint>>();
+        Collection<Collection<WayPoint>> wayPoints = new ArrayList<>();
 
         final DateFormat iso8601 =
Index: applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/data/EditGpxTrackSegment.java
===================================================================
--- applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/data/EditGpxTrackSegment.java	(revision 30736)
+++ applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/data/EditGpxTrackSegment.java	(revision 30737)
@@ -10,5 +10,5 @@
 public class EditGpxTrackSegment {
 
-    private final List<EditGpxWayPoint> wayPoints = new ArrayList<EditGpxWayPoint>();
+    private final List<EditGpxWayPoint> wayPoints = new ArrayList<>();
     private boolean deleted;
 
@@ -24,5 +24,5 @@
 
     public List<WayPoint> getNonDeletedWaypoints() {
-        List<WayPoint> result = new ArrayList<WayPoint>();
+        List<WayPoint> result = new ArrayList<>();
 
         for (EditGpxWayPoint wp: wayPoints) {
Index: applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/data/EditGpxWayPoint.java
===================================================================
--- applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/data/EditGpxWayPoint.java	(revision 30736)
+++ applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/data/EditGpxWayPoint.java	(revision 30737)
@@ -16,5 +16,5 @@
         this.time = wayPoint.time;
         this.coor = new CachedLatLon(wayPoint.getCoor());
-        this.attributes = new HashMap<String, Object>(wayPoint.attr);
+        this.attributes = new HashMap<>(wayPoint.attr);
     }
 
Index: applications/editors/josm/plugins/ext_tools/src/ext_tools/DataSetToCmd.java
===================================================================
--- applications/editors/josm/plugins/ext_tools/src/ext_tools/DataSetToCmd.java	(revision 30736)
+++ applications/editors/josm/plugins/ext_tools/src/ext_tools/DataSetToCmd.java	(revision 30737)
@@ -25,7 +25,7 @@
      * dataset
      */
-    private final Map<PrimitiveId, OsmPrimitive> mergedMap = new HashMap<PrimitiveId, OsmPrimitive>();
+    private final Map<PrimitiveId, OsmPrimitive> mergedMap = new HashMap<>();
 
-    private final LinkedList<Command> cmds = new LinkedList<Command>();
+    private final LinkedList<Command> cmds = new LinkedList<>();
 
     /**
@@ -110,5 +110,5 @@
                     "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);
@@ -148,5 +148,5 @@
                     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());
Index: applications/editors/josm/plugins/ext_tools/src/ext_tools/ExtTool.java
===================================================================
--- applications/editors/josm/plugins/ext_tools/src/ext_tools/ExtTool.java	(revision 30736)
+++ applications/editors/josm/plugins/ext_tools/src/ext_tools/ExtTool.java	(revision 30737)
@@ -162,5 +162,5 @@
         Main.map.mapView.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
         // parse cmdline and build cmdParams array
-        HashMap<String, String> replace = new HashMap<String, String>();
+        HashMap<String, String> replace = new HashMap<>();
 
         replace.put("{lat}", "" + pos.lat());
@@ -169,5 +169,5 @@
         replace.put("{TZoom}", "" + getTMSZoom());
 
-        ArrayList<String> cmdParams = new ArrayList<String>();
+        ArrayList<String> cmdParams = new ArrayList<>();
         StringTokenizer st = new StringTokenizer(cmdline);
 
Index: applications/editors/josm/plugins/ext_tools/src/ext_tools/ToolsInformation.java
===================================================================
--- applications/editors/josm/plugins/ext_tools/src/ext_tools/ToolsInformation.java	(revision 30736)
+++ applications/editors/josm/plugins/ext_tools/src/ext_tools/ToolsInformation.java	(revision 30737)
@@ -12,5 +12,5 @@
     String filename;
 
-    ArrayList<ExtTool> tools = new ArrayList<ExtTool>();
+    ArrayList<ExtTool> tools = new ArrayList<>();
 
     public ToolsInformation(String filename) {
Index: applications/editors/josm/plugins/geochat/src/geochat/ChatPaneManager.java
===================================================================
--- applications/editors/josm/plugins/geochat/src/geochat/ChatPaneManager.java	(revision 30736)
+++ applications/editors/josm/plugins/geochat/src/geochat/ChatPaneManager.java	(revision 30737)
@@ -30,5 +30,5 @@
         this.tabs = tabs;
         this.collapsed = panel.isDialogInCollapsedView();
-        chatPanes = new HashMap<String, ChatPane>();
+        chatPanes = new HashMap<>();
         createChatPane(null);
         tabs.addChangeListener(new ChangeListener() {
@@ -196,5 +196,5 @@
 
     public void closePrivateChatPanes() {
-        List<String> entries = new ArrayList<String>(chatPanes.keySet());
+        List<String> entries = new ArrayList<>(chatPanes.keySet());
         for( String user : entries )
             if( !user.equals(PUBLIC_PANE) )
Index: applications/editors/josm/plugins/geochat/src/geochat/ChatServerConnection.java
===================================================================
--- applications/editors/josm/plugins/geochat/src/geochat/ChatServerConnection.java	(revision 30736)
+++ applications/editors/josm/plugins/geochat/src/geochat/ChatServerConnection.java	(revision 30737)
@@ -43,5 +43,5 @@
         userId = 0;
         userName = null;
-        listeners = new HashSet<ChatServerConnectionListener>();
+        listeners = new HashSet<>();
         requestThread = new LogRequest();
         new Thread(requestThread).start();
@@ -398,5 +398,5 @@
 
         private List<ChatMessage> parseMessages( JsonArray messages, boolean priv ) {
-            List<ChatMessage> result = new ArrayList<ChatMessage>();
+            List<ChatMessage> result = new ArrayList<>();
             for( int i = 0; i < messages.size(); i++ ) {
                 try {
@@ -423,5 +423,5 @@
 
         private Map<String, LatLon> parseUsers( JsonArray users ) {
-            Map<String, LatLon> result = new HashMap<String, LatLon>();
+            Map<String, LatLon> result = new HashMap<>();
             for( int i = 0; i < users.size(); i++ ) {
                 try {
Index: applications/editors/josm/plugins/geochat/src/geochat/GeoChatPanel.java
===================================================================
--- applications/editors/josm/plugins/geochat/src/geochat/GeoChatPanel.java	(revision 30736)
+++ applications/editors/josm/plugins/geochat/src/geochat/GeoChatPanel.java	(revision 30737)
@@ -65,5 +65,5 @@
         createLayout(gcPanel, false, null);
 
-        users = new TreeMap<String, LatLon>();
+        users = new TreeMap<>();
         // Start threads
         connection = ChatServerConnection.getInstance();
Index: applications/editors/josm/plugins/globalsat/src/org/openstreetmap/josm/plugins/globalsat/GlobalsatDg100.java
===================================================================
--- applications/editors/josm/plugins/globalsat/src/org/openstreetmap/josm/plugins/globalsat/GlobalsatDg100.java	(revision 30736)
+++ applications/editors/josm/plugins/globalsat/src/org/openstreetmap/josm/plugins/globalsat/GlobalsatDg100.java	(revision 30737)
@@ -150,5 +150,5 @@
                 GpsRec last = null;
                 result = new GpxData();
-                Collection<WayPoint> seg = new ArrayList<WayPoint>(100);
+                Collection<WayPoint> seg = new ArrayList<>(100);
                 for(GpsRec r:gpsRecList){
                     if(canceled){
@@ -217,5 +217,5 @@
     {
         int nextIdx = 0;
-        List<FileInfoRec> result = new ArrayList<FileInfoRec>(64);
+        List<FileInfoRec> result = new ArrayList<>(64);
         try{
             do{
@@ -232,5 +232,5 @@
     public List<GpsRec> readGpsRecList(List<FileInfoRec> fileInfoList) throws ConnectionException
     {
-        List<GpsRec> result = new ArrayList<GpsRec>(200);
+        List<GpsRec> result = new ArrayList<>(200);
 
         try{
Index: applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java
===================================================================
--- applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java	(revision 30736)
+++ applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java	(revision 30737)
@@ -32,5 +32,5 @@
 
 public class GPSBlamInputData extends LinkedList<CachedLatLon> {
-	private Collection<Calendar> datesSeen = new HashSet<Calendar>();
+	private Collection<Calendar> datesSeen = new HashSet<>();
 
 	public int getNDays() { return datesSeen.size(); }
Index: applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamLayer.java
===================================================================
--- applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamLayer.java	(revision 30736)
+++ applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamLayer.java	(revision 30737)
@@ -25,5 +25,5 @@
     public GPSBlamLayer(String name) {
 		super(name);
-		blamMarkers = new LinkedList<GPSBlamMarker>();
+		blamMarkers = new LinkedList<>();
 	}
 
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/AccessRulesetReader.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/AccessRulesetReader.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/AccessRulesetReader.java	(revision 30737)
@@ -65,5 +65,5 @@
                 List<String> names;
                 if (parent == null) {
-                    names = new LinkedList<String>();
+                    names = new LinkedList<>();
                 } else {
                     names = parent.getAncestorHierarchy();
@@ -74,6 +74,6 @@
         }
 
-        private final Collection<AccessClass> accessClasses = new LinkedList<AccessClass>();
-        private final Collection<Tag> baseTags = new LinkedList<Tag>();
+        private final Collection<AccessClass> accessClasses = new LinkedList<>();
+        private final Collection<Tag> baseTags = new LinkedList<>();
 
         private static enum Section {NONE, CLASSES, BASETAGS, IMPLICATIONS};
@@ -83,5 +83,5 @@
 
         private ImplicationXMLReader implicationReader = null;
-        private final List<Implication> implications = new LinkedList<Implication>();
+        private final List<Implication> implications = new LinkedList<>();
 
         /** returns the AccessRuleset that was read */
@@ -96,5 +96,5 @@
                         }
                     }
-                    return new LinkedList<String>();
+                    return new LinkedList<>();
                 }
 
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/Implication.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/Implication.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/Implication.java	(revision 30737)
@@ -34,5 +34,5 @@
         if (condition.matches(tags)) {
 
-            Map<String, String> newTagMap = new HashMap<String, String>();
+            Map<String, String> newTagMap = new HashMap<>();
 
             for (Tag tag : tags) {
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/ImplicationXMLReader.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/ImplicationXMLReader.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/ImplicationXMLReader.java	(revision 30737)
@@ -19,5 +19,5 @@
 public class ImplicationXMLReader {
 
-    private final List<Implication> implications = new LinkedList<Implication>();
+    private final List<Implication> implications = new LinkedList<>();
 
     private static enum State {BEFORE_IMPLICATION, BEFORE_CONDITION, CONDITION, BEFORE_IMPLIES, IMPLIES, AFTER_IMPLIES};
@@ -58,5 +58,5 @@
 
                 if ("implies".equals(name)) {
-                    currentImpliedTags = new LinkedList<Tag>();
+                    currentImpliedTags = new LinkedList<>();
                     state = State.IMPLIES;
                     return;
@@ -137,5 +137,5 @@
             throw new SAXException(tr("Some tags have not been closed; now in state {0}", state));
         } else {
-            return new ArrayList<Implication>(implications);
+            return new ArrayList<>(implications);
         }
     }
@@ -175,5 +175,5 @@
         boolean finished;
 
-        private final List<ConditionReader> childReaders = new LinkedList<ConditionReader>();
+        private final List<ConditionReader> childReaders = new LinkedList<>();
         private ConditionReader currentChildReader = null;
 
@@ -234,5 +234,5 @@
                 if (openingName.equals(name)) {
 
-                    List<TagCondition> childConditions = new ArrayList<TagCondition>();
+                    List<TagCondition> childConditions = new ArrayList<>();
                     for (ConditionReader childReader : childReaders) {
                         childConditions.add(childReader.getCondition());
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/RulesetAccessEvaluator.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/RulesetAccessEvaluator.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/RulesetAccessEvaluator.java	(revision 30737)
@@ -126,5 +126,5 @@
          */
 
-        Map<String, AccessType> accessTypePerClass = new HashMap<String, AccessType>();
+        Map<String, AccessType> accessTypePerClass = new HashMap<>();
 
         for (String accessClass : accessClasses) {
@@ -155,5 +155,5 @@
         /* evaluate implied tagging of other tags */
 
-        Map<String, String> tagMap = new HashMap<String, String>();
+        Map<String, String> tagMap = new HashMap<>();
         for (Tag tag : wayTags) {
             if (!tag.equals(baseTag)) {
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/data/MapBasedTagGroup.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/data/MapBasedTagGroup.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/data/MapBasedTagGroup.java	(revision 30737)
@@ -34,5 +34,5 @@
             throw new IllegalArgumentException();
         }
-        this.tagMap = new HashMap<String, String>();
+        this.tagMap = new HashMap<>();
         for (Tag tag : tags) {
             if (tag == null) {
@@ -48,5 +48,5 @@
      */
     public MapBasedTagGroup(Tag... tags) {
-        this.tagMap = new HashMap<String, String>(tags.length);
+        this.tagMap = new HashMap<>(tags.length);
         for (Tag tag : tags) {
             if (tag == null) {
@@ -88,5 +88,5 @@
     public Iterator<Tag> iterator() {
 
-        Collection<Tag> tagCollection = new LinkedList<Tag>();
+        Collection<Tag> tagCollection = new LinkedList<>();
 
         for (String key : tagMap.keySet()) {
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/ConnectorEvaluationGroup.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/ConnectorEvaluationGroup.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/ConnectorEvaluationGroup.java	(revision 30737)
@@ -30,5 +30,5 @@
 
         this.segments = segments;
-        this.borderNodes = new ArrayList<SegmentNode>(borderNodes);
+        this.borderNodes = new ArrayList<>(borderNodes);
     }
 
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/EvaluationGroup.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/EvaluationGroup.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/EvaluationGroup.java	(revision 30737)
@@ -77,5 +77,5 @@
                 activeRestrictionsAfterSegment(firstSegment, EMPTY_RESTRICTION_LIST, restrictions);
 
-            Collection<Restriction> restrictionsForbiddenAtLastNode = new HashSet<Restriction>();
+            Collection<Restriction> restrictionsForbiddenAtLastNode = new HashSet<>();
             for (Restriction restriction : restrictions) {
                 if (restriction.getTos().contains(lastSegment)) {
@@ -110,5 +110,5 @@
         }
 
-        Queue<State> stateQueue = new LinkedList<State>();
+        Queue<State> stateQueue = new LinkedList<>();
         stateQueue.add(createStartingState(firstNode, initiallyActiveRestrictions));
 
@@ -143,5 +143,5 @@
         startingState.activeRestrictions = initiallyActiveRestrictions;
         startingState.segmentHistory = EMPTY_SEGMENT_LIST;
-        startingState.visitedNodes = new HashSet<SegmentNode>();
+        startingState.visitedNodes = new HashSet<>();
         startingState.visitedNodes.add(firstNode);
 
@@ -151,5 +151,5 @@
     private List<State> createSubsequentStates(State state, Collection<Restriction> allRestrictions) {
 
-        List<State> subsequentStates = new ArrayList<State>();
+        List<State> subsequentStates = new ArrayList<>();
 
         for (Segment segment : state.currentNode.getOutboundSegments()) {
@@ -163,5 +163,5 @@
                         segment, state.activeRestrictions, allRestrictions);
 
-                newState.segmentHistory = new ArrayList<Segment>(state.segmentHistory.size() + 1);
+                newState.segmentHistory = new ArrayList<>(state.segmentHistory.size() + 1);
                 newState.segmentHistory.addAll(state.segmentHistory);
                 newState.segmentHistory.add(segment);
@@ -169,5 +169,5 @@
                 newState.currentNode = segment.getNode2();
 
-                newState.visitedNodes = new HashSet<SegmentNode>(state.visitedNodes);
+                newState.visitedNodes = new HashSet<>(state.visitedNodes);
                 newState.visitedNodes.add(newState.currentNode);
 
@@ -200,5 +200,5 @@
             if (restriction.getFrom() == segment) {
                 if (result == EMPTY_RESTRICTION_LIST) {
-                    result = new ArrayList<Restriction>(restrictions.size());
+                    result = new ArrayList<>(restrictions.size());
                 }
                 result.add(restriction);
@@ -218,5 +218,5 @@
             if (restriction.getVias().contains(segment)) {
                 if (result == EMPTY_RESTRICTION_LIST) {
-                    result = new ArrayList<Restriction>(allRestrictions.size());
+                    result = new ArrayList<>(allRestrictions.size());
                 }
                 result.add(restriction);
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/JunctionEvaluationGroup.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/JunctionEvaluationGroup.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/JunctionEvaluationGroup.java	(revision 30737)
@@ -84,6 +84,6 @@
          * is in the set and whose start node isn't (analogous for outbound segments)       */
 
-        inboundSegments = new ArrayList<Segment>();
-        outboundSegments = new ArrayList<Segment>();
+        inboundSegments = new ArrayList<>();
+        outboundSegments = new ArrayList<>();
 
         for (SegmentNode segmentNode : segmentNodes) {
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/TSBasedWayGraph.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/TSBasedWayGraph.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/TSBasedWayGraph.java	(revision 30737)
@@ -30,6 +30,6 @@
         private final SegmentNode node;
         private final Segment segment;
-        private final List<GraphEdge> incomingEdges = new ArrayList<GraphEdge>();
-        private final List<GraphEdge> outgoingEdges = new ArrayList<GraphEdge>();
+        private final List<GraphEdge> incomingEdges = new ArrayList<>();
+        private final List<GraphEdge> outgoingEdges = new ArrayList<>();
         public GraphNodeImpl(SegmentNode node, Segment segment) {
             assert node != null && segment != null;
@@ -101,5 +101,5 @@
     };
 
-    private final Set<WayGraphObserver> observers = new HashSet<WayGraphObserver>();
+    private final Set<WayGraphObserver> observers = new HashSet<>();
 
     private final TransitionStructure transitionStructure;
@@ -147,5 +147,5 @@
 
         Map<SegmentNode, Set<SegmentNode>> nodeSetMap =
-            new HashMap<SegmentNode, Set<SegmentNode>>();
+            new HashMap<>();
 
         /* first step: everything that is part of the same restriction goes into the same set */
@@ -189,5 +189,5 @@
 
         Map<Segment, Set<Segment>> segmentSetMap =
-            new HashMap<Segment, Set<Segment>>();
+            new HashMap<>();
 
         for (Segment segment : transitionStructure.getSegments()) {
@@ -218,14 +218,14 @@
 
         Collection<EvaluationGroup> evaluationGroups =
-            new ArrayList<EvaluationGroup>(nodeSetMap.size() + segmentSetMap.size());
-
-        Set<Set<SegmentNode>> nodeSets = new HashSet<Set<SegmentNode>>(nodeSetMap.values());
+            new ArrayList<>(nodeSetMap.size() + segmentSetMap.size());
+
+        Set<Set<SegmentNode>> nodeSets = new HashSet<>(nodeSetMap.values());
         for (Set<SegmentNode> nodeSet : nodeSets) {
             evaluationGroups.add(new JunctionEvaluationGroup(nodeSet));
         }
 
-        HashSet<Set<Segment>> hashSets = new HashSet<Set<Segment>>(segmentSetMap.values());
+        HashSet<Set<Segment>> hashSets = new HashSet<>(segmentSetMap.values());
         for (Set<Segment> segmentSet : hashSets) {
-            Set<SegmentNode> borderNodes = new HashSet<SegmentNode>();
+            Set<SegmentNode> borderNodes = new HashSet<>();
             for (Segment segment : segmentSet) {
                 if (nodeSetMap.containsKey(segment.getNode1())) {
@@ -245,26 +245,26 @@
             Collection<EvaluationGroup> evaluationGroups) {
 
-        nodes = new LinkedList<GraphNode>();
-        edges = new LinkedList<GraphEdge>();
+        nodes = new LinkedList<>();
+        edges = new LinkedList<>();
 
         //map from Segments to GraphNodes;
         //for those GraphNodes representing an "approaching node on segment" state
         final Map<Segment, GraphNodeImpl> segment2GNMap_approaching =
-            new HashMap<Segment, GraphNodeImpl>();
+            new HashMap<>();
 
         //map from Segments to GraphNodes;
         //for those GraphNodes representing a "leaving node on segment" state
         final Map<Segment, GraphNodeImpl> segment2GNMap_leaving =
-            new HashMap<Segment, GraphNodeImpl>();
+            new HashMap<>();
 
         //map from SegmentNodes to GraphNode collections;
         //for those GraphNodes representing an "approaching node on segment" state
         final Map<SegmentNode, Collection<GraphNodeImpl>> segNode2GNMap_approaching =
-            new HashMap<SegmentNode, Collection<GraphNodeImpl>>();
+            new HashMap<>();
 
         //map from SegmentNodes to GraphNodes collections;
         //for those GraphNodes representing a "leaving node on segment" state
         final Map<SegmentNode, Collection<GraphNodeImpl>> segNode2GNMap_leaving =
-            new HashMap<SegmentNode, Collection<GraphNodeImpl>>();
+            new HashMap<>();
 
 
@@ -366,5 +366,5 @@
 
         Map<GraphEdgePropertyType<?>, Object> properties =
-            new HashMap<GraphEdgePropertyType<?>, Object>(); //TODO: replace HashMap with List-based solution
+            new HashMap<>(); //TODO: replace HashMap with List-based solution
 
         for (GraphEdgePropertyType<?> propertyType : PROPERTY_TYPES) {
@@ -382,5 +382,5 @@
 
         Map<GraphEdgePropertyType<?>, Object> properties =
-            new HashMap<GraphEdgePropertyType<?>, Object>(); //TODO: replace HashMap with List-based solution
+            new HashMap<>(); //TODO: replace HashMap with List-based solution
 
         for (GraphEdgePropertyType<?> propertyType : PROPERTY_TYPES) {
@@ -411,5 +411,5 @@
     private static boolean isConnectedWithExactly2Nodes(SegmentNode node) {
 
-        Set<SegmentNode> connectedNodes = new HashSet<SegmentNode>(2);
+        Set<SegmentNode> connectedNodes = new HashSet<>(2);
 
         for (Segment segment : node.getInboundSegments()) {
@@ -430,5 +430,5 @@
 
         if (!objectSetMap.containsKey(object)) {
-            Set<T> set = new HashSet<T>();
+            Set<T> set = new HashSet<>();
             set.add(object);
             objectSetMap.put(object, set);
@@ -472,5 +472,5 @@
     private static <K, E> void addToCollectionMap(final Map<K, Collection<E>> map, K key, E entry) {
         if (!map.containsKey(key)) {
-            Collection<E> newCollection = new ArrayList<E>();
+            Collection<E> newCollection = new ArrayList<>();
             map.put(key, newCollection);
         }
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/transition/GenericTransitionStructure.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/transition/GenericTransitionStructure.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/transition/GenericTransitionStructure.java	(revision 30737)
@@ -33,11 +33,11 @@
         Collections.unmodifiableList(new ArrayList<Segment>(0));
     private static final Collection<Restriction> EMPTY_RESTRICTION_COLLECTION =
-        new ArrayList<Restriction>(0);
+        new ArrayList<>(0);
 
     private static class SegmentNodeImpl implements SegmentNode {
         private final double lat;
         private final double lon;
-        private final List<Segment> inboundSegments = new LinkedList<Segment>();
-        private final List<Segment> outboundSegments = new LinkedList<Segment>();
+        private final List<Segment> inboundSegments = new LinkedList<>();
+        private final List<Segment> outboundSegments = new LinkedList<>();
         private final Map<RoadPropertyType<?>, Object> properties;
         public SegmentNodeImpl(double lat, double lon, Map<RoadPropertyType<?>, Object> properties) {
@@ -148,5 +148,5 @@
     }
 
-    private final Set<TransitionStructureObserver> observers = new HashSet<TransitionStructureObserver>();
+    private final Set<TransitionStructureObserver> observers = new HashSet<>();
 
     private final Collection<RoadPropertyType<?>> properties;
@@ -160,6 +160,6 @@
 
     private Collection<SegmentNode> nodes = null;
-    private Collection<Segment> segments = new LinkedList<Segment>();
-    private Collection<Restriction> restrictions = new LinkedList<Restriction>();
+    private Collection<Segment> segments = new LinkedList<>();
+    private Collection<Restriction> restrictions = new LinkedList<>();
 
     public GenericTransitionStructure(
@@ -201,5 +201,5 @@
             assert dataSource != null;
 
-            accessEvaluator = new RulesetAccessEvaluator<N, W, R, M>(
+            accessEvaluator = new RulesetAccessEvaluator<>(
                     dataSource,
                     this.ruleset,
@@ -230,9 +230,9 @@
     protected void updateData() {
 
-        ArrayList<SegmentNode> nodes = new ArrayList<SegmentNode>();
-        ArrayList<Segment> segments = new ArrayList<Segment>();
-
-        Map<N, SegmentNodeImpl> nodeCreationMap = new HashMap<N, SegmentNodeImpl>();
-        Map<W, List<Segment>> waySegmentMap = new HashMap<W, List<Segment>>();
+        ArrayList<SegmentNode> nodes = new ArrayList<>();
+        ArrayList<Segment> segments = new ArrayList<>();
+
+        Map<N, SegmentNodeImpl> nodeCreationMap = new HashMap<>();
+        Map<W, List<Segment>> waySegmentMap = new HashMap<>();
 
         /* create segments (nodes are created only when included in a segment) */
@@ -372,5 +372,5 @@
         assert relations != null && nodeCreationMap != null && waySegmentMap != null;
 
-        Collection<Restriction> results = new LinkedList<Restriction>();
+        Collection<Restriction> results = new LinkedList<>();
 
         for (R relation : relations) {
@@ -404,7 +404,7 @@
 
         W fromWay = null;
-        Collection<N> viaNodes = new LinkedList<N>();
-        Collection<W> viaWays = new LinkedList<W>();
-        Collection<W> toWays = new LinkedList<W>();
+        Collection<N> viaNodes = new LinkedList<>();
+        Collection<W> viaWays = new LinkedList<>();
+        Collection<W> toWays = new LinkedList<>();
 
         for (M member : dataSource.getMembers(relation)) {
@@ -442,5 +442,5 @@
 
         } else {
-            return new ArrayList<Restriction>(0);
+            return new ArrayList<>(0);
         }
     }
@@ -451,5 +451,5 @@
             W fromWay, Collection<N> viaNodes, Collection<W> viaWays, Collection<W> toWays) {
 
-        Collection<SegmentNode> nodesCreatedFromViaNodes = new ArrayList<SegmentNode>(viaNodes.size());
+        Collection<SegmentNode> nodesCreatedFromViaNodes = new ArrayList<>(viaNodes.size());
         for (N viaNode : viaNodes) {
             if (nodeCreationMap.containsKey(viaNode)) {
@@ -483,5 +483,5 @@
          * or segments starting and ending with nodes created from via nodes */
 
-        ArrayList<Segment> viaSegments = new ArrayList<Segment>();
+        ArrayList<Segment> viaSegments = new ArrayList<>();
 
         for (W viaWay : viaWays) {
@@ -502,5 +502,5 @@
 
         Set<SegmentNode> nodesCreatedFromViaMembers
-        = new HashSet<SegmentNode>(nodesCreatedFromViaNodes);
+        = new HashSet<>(nodesCreatedFromViaNodes);
 
         for (W viaWay : viaWays) {
@@ -518,5 +518,5 @@
 
         Segment fromSegment = null;
-        Collection<Segment> toSegments = new ArrayList<Segment>();
+        Collection<Segment> toSegments = new ArrayList<>();
 
         for (Segment possibleFromSegment : waySegmentMap.get(fromWay)) {
@@ -595,5 +595,5 @@
         /* create restriction */
 
-        Collection<Restriction> results = new ArrayList<Restriction>(1);
+        Collection<Restriction> results = new ArrayList<>(1);
         results.add(new RestrictionImpl(fromSegment, viaSegments, toSegments));
         return results;
@@ -618,5 +618,5 @@
         assert waySegmentMap != null;
 
-        Collection<Restriction> results = new LinkedList<Restriction>();
+        Collection<Restriction> results = new LinkedList<>();
 
         for (N node : nodeCreationMap.keySet()) {
@@ -645,5 +645,5 @@
     private Map<RoadPropertyType<?>, Object> getWayPropertyMap(W way, boolean forward) {
         Map<RoadPropertyType<?>, Object> propertyValues;
-        propertyValues = new HashMap<RoadPropertyType<?>, Object>();
+        propertyValues = new HashMap<>();
         for (RoadPropertyType<?> property : properties) {
             Object value = property.evaluateW(way, forward, accessParameters, dataSource);
@@ -661,5 +661,5 @@
     private Map<RoadPropertyType<?>, Object> getNodePropertyMap(N node) {
         Map<RoadPropertyType<?>, Object> propertyValues;
-        propertyValues = new HashMap<RoadPropertyType<?>, Object>();
+        propertyValues = new HashMap<>();
         for (RoadPropertyType<?> property : properties) {
             Object value = property.evaluateN(node, accessParameters, dataSource);
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/FloatPropertyColorScheme.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/FloatPropertyColorScheme.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/FloatPropertyColorScheme.java	(revision 30737)
@@ -38,5 +38,5 @@
 
         this.propertyClass = propertyClass;
-        this.colorMap = new HashMap<Float, Color>(colorMap);
+        this.colorMap = new HashMap<>(colorMap);
         this.defaultColor = defaultColor;
     }
@@ -65,5 +65,5 @@
     public Color getNodeColor(GraphNode node) {
 
-        List<Color> segmentColors = new ArrayList<Color>();
+        List<Color> segmentColors = new ArrayList<>();
 
 
@@ -106,5 +106,5 @@
         } else {
 
-            LinkedList<Float> valuesWithDefinedColor = new LinkedList<Float>(colorMap.keySet());
+            LinkedList<Float> valuesWithDefinedColor = new LinkedList<>(colorMap.keySet());
             Collections.sort(valuesWithDefinedColor);
 
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/InclineColorScheme.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/InclineColorScheme.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/InclineColorScheme.java	(revision 30737)
@@ -15,5 +15,5 @@
 
     static {
-        COLOR_MAP = new HashMap<Float, Color>();
+        COLOR_MAP = new HashMap<>();
         COLOR_MAP.put(-30f, Color.BLUE);
         COLOR_MAP.put(0f, Color.WHITE);
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/MaxheightColorScheme.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/MaxheightColorScheme.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/MaxheightColorScheme.java	(revision 30737)
@@ -15,5 +15,5 @@
 
     static {
-        COLOR_MAP = new HashMap<Float, Color>();
+        COLOR_MAP = new HashMap<>();
         COLOR_MAP.put(0f, new Color(0, 0, 50));
         COLOR_MAP.put(10f, new Color(100, 100, 255));
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/MaxspeedColorScheme.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/MaxspeedColorScheme.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/MaxspeedColorScheme.java	(revision 30737)
@@ -15,5 +15,5 @@
 
     static {
-        COLOR_MAP = new HashMap<Float, Color>();
+        COLOR_MAP = new HashMap<>();
         COLOR_MAP.put(0f, new Color(50, 0, 0));
         COLOR_MAP.put(30f, Color.RED);
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/MaxweightColorScheme.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/MaxweightColorScheme.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/visualisation/MaxweightColorScheme.java	(revision 30737)
@@ -15,5 +15,5 @@
 
     static {
-        COLOR_MAP = new HashMap<Float, Color>();
+        COLOR_MAP = new HashMap<>();
         COLOR_MAP.put(0f, new Color(0, 0, 50));
         COLOR_MAP.put(20f, new Color(100, 100, 255));
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java	(revision 30737)
@@ -57,5 +57,5 @@
 
     static {
-        PROPERTIES = new LinkedList<RoadPropertyType<?>>();
+        PROPERTIES = new LinkedList<>();
         PROPERTIES.add(new RoadIncline());
         PROPERTIES.add(new RoadMaxaxleload());
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/data/JOSMDataSource.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/data/JOSMDataSource.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/data/JOSMDataSource.java	(revision 30737)
@@ -39,9 +39,9 @@
 
     public Iterable<Node> getNodes(Way way) {
-        return new FilteredOsmPrimitiveIterable<Node>(way.getNodes());
+        return new FilteredOsmPrimitiveIterable<>(way.getNodes());
     }
 
     public Iterable<Node> getNodes() {
-        return new FilteredOsmPrimitiveIterable<Node>(Main.main.getCurrentDataSet().getNodes());
+        return new FilteredOsmPrimitiveIterable<>(Main.main.getCurrentDataSet().getNodes());
     }
 
@@ -51,5 +51,5 @@
 
     public Iterable<Way> getWays() {
-        return new FilteredOsmPrimitiveIterable<Way>(Main.main.getCurrentDataSet().getWays());
+        return new FilteredOsmPrimitiveIterable<>(Main.main.getCurrentDataSet().getWays());
     }
 
@@ -97,5 +97,5 @@
     private static final TagGroup EMPTY_TAG_GROUP;
     static {
-        Map<String, String> emptyMap = new HashMap<String, String>(0);
+        Map<String, String> emptyMap = new HashMap<>(0);
         EMPTY_TAG_GROUP = new MapBasedTagGroup(emptyMap);
     }
@@ -204,5 +204,5 @@
     }
 
-    private final Set<DataSourceObserver> observers = new HashSet<DataSourceObserver>();
+    private final Set<DataSourceObserver> observers = new HashSet<>();
 
     public void addObserver(DataSourceObserver observer) {
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/AccessParameterDialog.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/AccessParameterDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/AccessParameterDialog.java	(revision 30737)
@@ -50,5 +50,5 @@
 
     static {
-        FLOAT_PROPERTIES = new LinkedHashMap<VehiclePropertyType<Float>, String>();
+        FLOAT_PROPERTIES = new LinkedHashMap<>();
         FLOAT_PROPERTIES.put(VehiclePropertyTypes.HEIGHT, tr("height (m)"));
         FLOAT_PROPERTIES.put(VehiclePropertyTypes.WIDTH, tr("width (m)"));
@@ -132,5 +132,5 @@
 
         private final Map<AccessType, JCheckBox> accessTypeCheckBoxes =
-            new EnumMap<AccessType, JCheckBox>(AccessType.class);
+            new EnumMap<>(AccessType.class);
 
         public AccessTypesPanel(PreferenceAccessParameters initialParameters) {
@@ -152,5 +152,5 @@
         public Collection<AccessType> getUsableAccessTypes() {
 
-            Collection<AccessType> usableAccessTypes = new LinkedList<AccessType>();
+            Collection<AccessType> usableAccessTypes = new LinkedList<>();
 
             for (AccessType accessType : AccessType.values()) {
@@ -169,5 +169,5 @@
 
         private final Map<VehiclePropertyType<Float>, JTextField> floatPropertyTextFields =
-            new HashMap<VehiclePropertyType<Float>, JTextField>();
+            new HashMap<>();
 
         public VehiclePropertiesPanel(PreferenceAccessParameters initialParameters) {
@@ -200,5 +200,5 @@
 
             Map<VehiclePropertyType<?>, String> vehiclePropertyStrings =
-                new HashMap<VehiclePropertyType<?>, String>();
+                new HashMap<>();
 
             for (VehiclePropertyType<Float> vehicleProperty : floatPropertyTextFields.keySet()) {
@@ -310,5 +310,5 @@
 
             Map<VehiclePropertyType<?>, String> vehiclePropertyStrings =
-                new HashMap<VehiclePropertyType<?>, String>();
+                new HashMap<>();
 
             String incUpString = inclineUpTextField.getText();
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewDialog.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewDialog.java	(revision 30737)
@@ -73,5 +73,5 @@
         this.plugin = plugin;
 
-        availableColorSchemes = new LinkedHashMap<String, ColorScheme>();
+        availableColorSchemes = new LinkedHashMap<>();
 
         availableColorSchemes.put(tr("default"),
@@ -238,5 +238,5 @@
         } else {
 
-            rulesetFiles = new LinkedList<File>();
+            rulesetFiles = new LinkedList<>();
 
             File[] filesInRulesetFolder = preferences.getRulesetFolder().listFiles();
@@ -273,5 +273,5 @@
 
         String activeBookmarkName = preferences.getCurrentParameterBookmarkName();
-        Set<String> bookmarkNames = new HashSet<String>(preferences.getParameterBookmarks().keySet());
+        Set<String> bookmarkNames = new HashSet<>(preferences.getParameterBookmarks().keySet());
 
         bookmarkComboBox.removeAllItems();
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewPreferenceEditor.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewPreferenceEditor.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewPreferenceEditor.java	(revision 30737)
@@ -101,5 +101,5 @@
 
         parameterBookmarks =
-            new HashMap<String, PreferenceAccessParameters>(preferences.getParameterBookmarks());
+            new HashMap<>(preferences.getParameterBookmarks());
 
     }
@@ -349,5 +349,5 @@
                     parameterBookmarks.get(selectedBookmarkName);
 
-                Collection<String> otherBookmarkNames = new LinkedList<String>();
+                Collection<String> otherBookmarkNames = new LinkedList<>();
                 for (String bookmarkName : parameterBookmarks.keySet()) {
                     if (!bookmarkName.equals(selectedBookmarkName)) {
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/GraphViewPreferenceDefaults.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/GraphViewPreferenceDefaults.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/GraphViewPreferenceDefaults.java	(revision 30737)
@@ -32,5 +32,5 @@
 
         Map<VehiclePropertyType<?>, String> propertyStringMap =
-            new HashMap<VehiclePropertyType<?>, String>();
+            new HashMap<>();
 
         try {
@@ -48,5 +48,5 @@
 
             Map<String, PreferenceAccessParameters> result =
-                new HashMap<String, PreferenceAccessParameters>();
+                new HashMap<>();
 
             Collection<AccessType> accessTypes =
@@ -56,5 +56,5 @@
             {
                 Map<VehiclePropertyType<?>, String> propertyMap =
-                    new HashMap<VehiclePropertyType<?>, String>();
+                    new HashMap<>();
 
                 PreferenceAccessParameters accessParameters =
@@ -67,5 +67,5 @@
             {
                 Map<VehiclePropertyType<?>, String> propertyMap =
-                    new HashMap<VehiclePropertyType<?>, String>();
+                    new HashMap<>();
                 propertyMap.put(VehiclePropertyTypes.WEIGHT, "3.5");
 
@@ -79,5 +79,5 @@
             {
                 Map<VehiclePropertyType<?>, String> propertyMap =
-                    new HashMap<VehiclePropertyType<?>, String>();
+                    new HashMap<>();
 
                 PreferenceAccessParameters accessParameters =
@@ -90,5 +90,5 @@
             {
                 Map<VehiclePropertyType<?>, String> propertyMap =
-                    new HashMap<VehiclePropertyType<?>, String>();
+                    new HashMap<>();
 
                 PreferenceAccessParameters accessParameters =
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/GraphViewPreferences.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/GraphViewPreferences.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/GraphViewPreferences.java	(revision 30737)
@@ -146,5 +146,5 @@
 
         this.parameterBookmarks =
-            new HashMap<String, PreferenceAccessParameters>(parameterBookmarks);
+            new HashMap<>(parameterBookmarks);
     }
 
@@ -325,5 +325,5 @@
 
     private static final Map<VehiclePropertyType<?>, String> VEHICLE_PROPERTY_TYPE_NAME_MAP =
-        new HashMap<VehiclePropertyType<?>, String>();
+        new HashMap<>();
 
 
@@ -412,5 +412,5 @@
 
         Map<String, PreferenceAccessParameters> resultMap =
-            new HashMap<String, PreferenceAccessParameters>();
+            new HashMap<>();
 
         String[] bookmarkStrings = string.split("\\|");
@@ -435,5 +435,5 @@
 
             String[] accessTypeStrings = matcher.group(3).split(",");
-            Collection<AccessType> accessTypes = new LinkedList<AccessType>();
+            Collection<AccessType> accessTypes = new LinkedList<>();
             for (String accessTypeString : accessTypeStrings) {
                 AccessType accessType = AccessType.valueOf(accessTypeString);
@@ -446,5 +446,5 @@
             String[] vehiclePropertyStrings = matcher.group(4).split(",");
             Map<VehiclePropertyType<?>, String> vehiclePropertyMap =
-                new HashMap<VehiclePropertyType<?>, String>();
+                new HashMap<>();
 
             for (String vehiclePropertyString : vehiclePropertyStrings) {
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/PreferenceAccessParameters.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/PreferenceAccessParameters.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/PreferenceAccessParameters.java	(revision 30737)
@@ -79,5 +79,5 @@
         this.accessClass = accessClass;
 
-        accessTypeUsableMap = new EnumMap<AccessType, Boolean>(AccessType.class);
+        accessTypeUsableMap = new EnumMap<>(AccessType.class);
         for (AccessType accessType : AccessType.values()) {
             accessTypeUsableMap.put(accessType, usableAccessTypes.contains(accessType));
@@ -87,7 +87,7 @@
 
         this.vehiclePropertyStrings = Collections.unmodifiableMap(
-                new HashMap<VehiclePropertyType<?>, String>(vehiclePropertyStrings));
+                new HashMap<>(vehiclePropertyStrings));
 
-        this.vehiclePropertyValues = new HashMap<VehiclePropertyType<?>, Object>();
+        this.vehiclePropertyValues = new HashMap<>();
         for (VehiclePropertyType<?> vehiclePropertyType : vehiclePropertyStrings.keySet()) {
             String propertyValueString = vehiclePropertyStrings.get(vehiclePropertyType);
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/VehiclePropertyStringParser.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/VehiclePropertyStringParser.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/VehiclePropertyStringParser.java	(revision 30737)
@@ -132,5 +132,5 @@
 
             String[] surfaces = propertyValueString.split(";\\s*");
-            Collection<String> surfaceBlacklist = new ArrayList<String>(surfaces.length);
+            Collection<String> surfaceBlacklist = new ArrayList<>(surfaces.length);
             for (String surface : surfaces) {
                 for (char nameChar : surface.toCharArray()) {
Index: applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/FullGraphCreationTest.java
===================================================================
--- applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/FullGraphCreationTest.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/FullGraphCreationTest.java	(revision 30737)
@@ -35,5 +35,5 @@
     static {
         Map<VehiclePropertyType<?>, String> vehiclePropertyValues =
-            new HashMap<VehiclePropertyType<?>, String>();
+            new HashMap<>();
         vehiclePropertyValues.put(VehiclePropertyTypes.WIDTH, "3.0");
 
@@ -56,5 +56,5 @@
         }
         public java.util.List<Implication> getImplications() {
-            return new LinkedList<Implication>();
+            return new LinkedList<>();
         }
     };
@@ -162,8 +162,8 @@
     private TransitionStructure createTestTransitionStructure(TestDataSource dataSource) {
 
-        LinkedList<RoadPropertyType<?>> properties = new LinkedList<RoadPropertyType<?>>();
+        LinkedList<RoadPropertyType<?>> properties = new LinkedList<>();
         properties.add(new RoadWidth());
 
-        return new GenericTransitionStructure<TestNode, TestWay, TestRelation, TestRelationMember>(
+        return new GenericTransitionStructure<>(
                 ACCESS_PARAMS, TEST_RULESET, dataSource, properties);
     }
Index: applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/TestDataSource.java
===================================================================
--- applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/TestDataSource.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/TestDataSource.java	(revision 30737)
@@ -15,5 +15,5 @@
 
     public static class TestPrimitive {
-        public final Map<String, String> tags = new HashMap<String, String>();
+        public final Map<String, String> tags = new HashMap<>();
     };
 
@@ -35,5 +35,5 @@
 
     public static class TestWay extends TestPrimitive {
-        public final List<TestNode> nodes = new LinkedList<TestNode>();
+        public final List<TestNode> nodes = new LinkedList<>();
         @Override
         public String toString() {
@@ -43,5 +43,5 @@
 
     public static class TestRelation extends TestPrimitive {
-        public final Collection<TestRelationMember> members = new LinkedList<TestRelationMember>();
+        public final Collection<TestRelationMember> members = new LinkedList<>();
         @Override
         public String toString() {
@@ -70,7 +70,7 @@
 
 
-    public final Collection<TestNode> nodes = new LinkedList<TestNode>();
-    public final Collection<TestWay> ways = new LinkedList<TestWay>();
-    public final Collection<TestRelation> relations = new LinkedList<TestRelation>();
+    public final Collection<TestNode> nodes = new LinkedList<>();
+    public final Collection<TestWay> ways = new LinkedList<>();
+    public final Collection<TestRelation> relations = new LinkedList<>();
 
 
Index: applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/access/AccessRulesetReaderTest.java
===================================================================
--- applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/access/AccessRulesetReaderTest.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/access/AccessRulesetReaderTest.java	(revision 30737)
@@ -101,5 +101,5 @@
 
     private static TagGroup createTagGroup(Tag... tags) {
-        Map<String, String> tagMap = new HashMap<String, String>();
+        Map<String, String> tagMap = new HashMap<>();
         for (Tag tag : tags) {
             tagMap.put(tag.key, tag.value);
Index: applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/util/TagConditionLogicTest.java
===================================================================
--- applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/util/TagConditionLogicTest.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/util/TagConditionLogicTest.java	(revision 30737)
@@ -20,5 +20,5 @@
     @Before
     public void setUp() {
-        Map<String, String> mapA = new HashMap<String, String>();
+        Map<String, String> mapA = new HashMap<>();
         mapA.put("key1", "value1");
         mapA.put("key2", "value2");
@@ -26,5 +26,5 @@
         groupA = new MapBasedTagGroup(mapA);
 
-        Map<String, String> mapB = new HashMap<String, String>();
+        Map<String, String> mapB = new HashMap<>();
         mapB.put("key1", "value1");
         mapB.put("key4", "value4");
Index: applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/visualisation/FloatPropertyColorSchemeTest.java
===================================================================
--- applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/visualisation/FloatPropertyColorSchemeTest.java	(revision 30736)
+++ applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/visualisation/FloatPropertyColorSchemeTest.java	(revision 30737)
@@ -18,5 +18,5 @@
     public void setUp() {
 
-        Map<Float, Color> colorMap = new HashMap<Float, Color>();
+        Map<Float, Color> colorMap = new HashMap<>();
         colorMap.put( 5f, new Color( 42,  42,  42));
         colorMap.put(10f, new Color(100, 100, 100));
Index: applications/editors/josm/plugins/imagery_offset_db/src/iodb/IODBReader.java
===================================================================
--- applications/editors/josm/plugins/imagery_offset_db/src/iodb/IODBReader.java	(revision 30736)
+++ applications/editors/josm/plugins/imagery_offset_db/src/iodb/IODBReader.java	(revision 30737)
@@ -36,5 +36,5 @@
     public IODBReader( InputStream source ) throws IOException {
         this.source = new InputSource(UTFInputStreamReader.create(source, "UTF-8"));
-        this.offsets = new ArrayList<ImageryOffsetBase>();
+        this.offsets = new ArrayList<>();
     }
 
@@ -212,5 +212,5 @@
             maxZoom = -1;
             flagged = false;
-            geometry = new ArrayList<LatLon>();
+            geometry = new ArrayList<>();
         }
 
Index: applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryIdGenerator.java
===================================================================
--- applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryIdGenerator.java	(revision 30736)
+++ applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryIdGenerator.java	(revision 30737)
@@ -43,8 +43,8 @@
 
         // Parse query parameters into a sorted map
-        final Set<String> removeWMSParams = new TreeSet<String>(Arrays.asList(new String[] {
+        final Set<String> removeWMSParams = new TreeSet<>(Arrays.asList(new String[] {
                     "srs", "width", "height", "bbox", "service", "request", "version", "format", "styles", "transparent"
                 }));
-        Map<String, String> qparams = new TreeMap<String, String>();
+        Map<String, String> qparams = new TreeMap<>();
         String[] qparamsStr = query.length() > 1 ? query.substring(1).split("&") : new String[0];
         for( String param : qparamsStr ) {
Index: applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetPlugin.java
===================================================================
--- applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetPlugin.java	(revision 30737)
@@ -43,5 +43,5 @@
         // an ugly hack to add this plugin to the toolbar
         if( Main.pref.getBoolean("iodb.modify.toolbar", true) ) {
-            Collection<String> toolbar = new LinkedList<String>(Main.toolbar.getToolString());
+            Collection<String> toolbar = new LinkedList<>(Main.toolbar.getToolString());
             if( !toolbar.contains("getoffset") ) {
                 toolbar.add("getoffset");
Index: applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetWatcher.java
===================================================================
--- applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetWatcher.java	(revision 30736)
+++ applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetWatcher.java	(revision 30737)
@@ -19,6 +19,6 @@
     private static final double THRESHOLD = 1e-8;
     private static ImageryOffsetWatcher instance;
-    private Map<Integer, ImageryLayerData> layers = new TreeMap<Integer, ImageryLayerData>();
-    private List<OffsetStateListener> listeners = new ArrayList<OffsetStateListener>();
+    private Map<Integer, ImageryLayerData> layers = new TreeMap<>();
+    private List<OffsetStateListener> listeners = new ArrayList<>();
     private Timer time;
     private double maxDistance;
@@ -192,5 +192,5 @@
         if( !Main.pref.getBoolean("iodb.remember.offsets", true) || id == null )
             return;
-        Collection<String> offsets = new LinkedList<String>(Main.pref.getCollection("iodb.stored.offsets"));
+        Collection<String> offsets = new LinkedList<>(Main.pref.getCollection("iodb.stored.offsets"));
         for( Iterator<String> iter = offsets.iterator(); iter.hasNext(); ) {
             String[] offset = iter.next().split(":");
Index: applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialog.java
===================================================================
--- applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialog.java	(revision 30737)
@@ -137,5 +137,5 @@
         boolean showCalibration = Main.pref.getBoolean(PREF_CALIBRATION, true);
         boolean showDeprecated = Main.pref.getBoolean(PREF_DEPRECATED, false);
-        List<ImageryOffsetBase> filteredOffsets = new ArrayList<ImageryOffsetBase>();
+        List<ImageryOffsetBase> filteredOffsets = new ArrayList<>();
         for( ImageryOffsetBase offset : offsets ) {
             if( offset.isDeprecated() && !showDeprecated )
Index: applications/editors/josm/plugins/imagery_offset_db/src/iodb/StoreImageryOffsetAction.java
===================================================================
--- applications/editors/josm/plugins/imagery_offset_db/src/iodb/StoreImageryOffsetAction.java	(revision 30736)
+++ applications/editors/josm/plugins/imagery_offset_db/src/iodb/StoreImageryOffsetAction.java	(revision 30737)
@@ -106,5 +106,5 @@
         // upload object info to server
         try {
-            Map<String, String> params = new HashMap<String, String>();
+            Map<String, String> params = new HashMap<>();
             offsetObj.putServerParams(params);
             StringBuilder query = null;
Index: applications/editors/josm/plugins/imageryadjust/src/imageryadjust/ImageryAdjustMapMode.java
===================================================================
--- applications/editors/josm/plugins/imageryadjust/src/imageryadjust/ImageryAdjustMapMode.java	(revision 30736)
+++ applications/editors/josm/plugins/imageryadjust/src/imageryadjust/ImageryAdjustMapMode.java	(revision 30737)
@@ -188,5 +188,5 @@
         JComboBox<Layer> layerList = new JComboBox<>();
         layerList.setRenderer(new LayerListCellRenderer());
-        layerList.setModel(new DefaultComboBoxModel<Layer>(adjustableLayers.toArray(new Layer[0])));
+        layerList.setModel(new DefaultComboBoxModel<>(adjustableLayers.toArray(new Layer[0])));
         layerList.setSelectedIndex(0);
 
Index: applications/editors/josm/plugins/imageryadjust/src/utils/TimedKeyReleaseListener.java
===================================================================
--- applications/editors/josm/plugins/imageryadjust/src/utils/TimedKeyReleaseListener.java	(revision 30736)
+++ applications/editors/josm/plugins/imageryadjust/src/utils/TimedKeyReleaseListener.java	(revision 30737)
@@ -11,5 +11,5 @@
 
 public class TimedKeyReleaseListener implements AWTEventListener {
-    private final TreeSet<Integer> set = new TreeSet<Integer>();
+    private final TreeSet<Integer> set = new TreeSet<>();
     private Timer timer;
     protected KeyEvent releaseEvent;
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/AsyncWriteEngine.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/AsyncWriteEngine.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/AsyncWriteEngine.java	(revision 30737)
@@ -36,5 +36,5 @@
     protected final long threadNum = threadCounter.incrementAndGet();
 
-    protected final BlockingQueue<Long> newRecids = new ArrayBlockingQueue<Long>(128);
+    protected final BlockingQueue<Long> newRecids = new ArrayBlockingQueue<>(128);
 
     protected volatile boolean closeInProgress = false;
@@ -266,5 +266,5 @@
      */
     public void setParentEngineReference(Engine parentEngineReference) {
-        parentEngineWeakRef = new WeakReference<Engine>(parentEngineReference);
+        parentEngineWeakRef = new WeakReference<>(parentEngineReference);
     }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/Atomic.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/Atomic.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/Atomic.java	(revision 30737)
@@ -213,5 +213,5 @@
         long recid = db.getEngine().put(initVal, serializer);
         db.getNameDir().put(name, recid);
-        return new Var<E>(db.getEngine(), recid, serializer);
+        return new Var<>(db.getEngine(), recid, serializer);
     }
 
@@ -230,5 +230,5 @@
         return  recid == null ?
                 createVar(db, name, null, serializer) :
-                new Var<E>(db.getEngine(),recid, serializer);
+                new Var<>(db.getEngine(),recid, serializer);
     }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/BTreeMap.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/BTreeMap.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/BTreeMap.java	(revision 30737)
@@ -114,5 +114,5 @@
 
     /** holds node level locks*/
-    protected final LongConcurrentHashMap<Thread> nodeLocks = new LongConcurrentHashMap<Thread>();
+    protected final LongConcurrentHashMap<Thread> nodeLocks = new LongConcurrentHashMap<>();
 
     /** maximal node size allowed in this BTree*/
@@ -963,5 +963,5 @@
     protected Entry<K, V> makeEntry(Object key, Object value) {
         if(value instanceof ValRef) throw new InternalError();
-        return new SimpleImmutableEntry<K, V>((K)key,  (V)value);
+        return new SimpleImmutableEntry<>((K)key,  (V)value);
     }
 
@@ -1336,5 +1336,5 @@
         if (fromKey == null || toKey == null)
             throw new NullPointerException();
-        return new SubMap<K,V>
+        return new SubMap<>
                 ( this, fromKey, fromInclusive, toKey, toInclusive);
     }
@@ -1345,5 +1345,5 @@
         if (toKey == null)
             throw new NullPointerException();
-        return new SubMap<K,V>
+        return new SubMap<>
                 (this, null, false, toKey, inclusive);
     }
@@ -1354,5 +1354,5 @@
         if (fromKey == null)
             throw new NullPointerException();
-        return new SubMap<K,V>
+        return new SubMap<>
                 (this, fromKey, inclusive, null, false);
     }
@@ -1421,5 +1421,5 @@
     static final <E> List<E> toList(Collection<E> c) {
         // Using size() here would be a pessimization.
-        List<E> list = new ArrayList<E>();
+        List<E> list = new ArrayList<>();
         for (E e : c){
             list.add(e);
@@ -1506,14 +1506,14 @@
                                       E toElement,
                                       boolean toInclusive) {
-            return new KeySet<E>(m.subMap(fromElement, fromInclusive,
+            return new KeySet<>(m.subMap(fromElement, fromInclusive,
                     toElement,   toInclusive),hasValues);
         }
         @Override
 		public NavigableSet<E> headSet(E toElement, boolean inclusive) {
-            return new KeySet<E>(m.headMap(toElement, inclusive),hasValues);
+            return new KeySet<>(m.headMap(toElement, inclusive),hasValues);
         }
         @Override
 		public NavigableSet<E> tailSet(E fromElement, boolean inclusive) {
-            return new KeySet<E>(m.tailMap(fromElement, inclusive),hasValues);
+            return new KeySet<>(m.tailMap(fromElement, inclusive),hasValues);
         }
         @Override
@@ -1937,5 +1937,5 @@
                 }
             }
-            return new SubMap<K,V>(m, fromKey, fromInclusive,
+            return new SubMap<>(m, fromKey, fromInclusive,
                     toKey, toInclusive);
         }
@@ -1989,5 +1989,5 @@
         @Override
         public NavigableSet<K> navigableKeySet() {
-            return new KeySet<K>((ConcurrentNavigableMap<K,Object>) this,m.hasValues);
+            return new KeySet<>((ConcurrentNavigableMap<K,Object>) this,m.hasValues);
         }
 
@@ -2032,5 +2032,5 @@
         @Override
         public NavigableSet<K> keySet() {
-            return new KeySet<K>((ConcurrentNavigableMap<K,Object>) this, m.hasValues);
+            return new KeySet<>((ConcurrentNavigableMap<K,Object>) this, m.hasValues);
         }
 
@@ -2044,5 +2044,5 @@
         @Override
         public Set<Entry<K, V>> entrySet() {
-            return new EntrySet<K, V>(this);
+            return new EntrySet<>(this);
         }
 
@@ -2123,5 +2123,5 @@
         Engine snapshot = SnapshotEngine.createSnapshotFor(engine);
 
-        return new BTreeMap<K, V>(snapshot,treeRecid, defaultSerializer);
+        return new BTreeMap<>(snapshot,treeRecid, defaultSerializer);
     }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/CacheHardRef.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/CacheHardRef.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/CacheHardRef.java	(revision 30737)
@@ -31,5 +31,5 @@
 
     public CacheHardRef(Engine engine, int initialCapacity) {
-        super(engine, new LongConcurrentHashMap<Object>(initialCapacity));
+        super(engine, new LongConcurrentHashMap<>(initialCapacity));
     }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/CacheLRU.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/CacheLRU.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/CacheLRU.java	(revision 30737)
@@ -16,5 +16,5 @@
 
     public CacheLRU(Engine engine, int cacheSize) {
-        this(engine, new LongConcurrentLRUMap<Object>(cacheSize, (int) (cacheSize*0.8)));
+        this(engine, new LongConcurrentLRUMap<>(cacheSize, (int) (cacheSize*0.8)));
     }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/CacheWeakSoftRef.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/CacheWeakSoftRef.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/CacheWeakSoftRef.java	(revision 30737)
@@ -79,5 +79,5 @@
 
 
-    protected LongConcurrentHashMap<CacheItem> items = new LongConcurrentHashMap<CacheItem>();
+    protected LongConcurrentHashMap<CacheItem> items = new LongConcurrentHashMap<>();
 
 
@@ -157,6 +157,6 @@
         ReferenceQueue<A> q = checkClosed(queue);
         checkClosed(items).put(recid, useWeakRef?
-            new CacheWeakItem<A>(value, q, recid) :
-            new CacheSoftItem<A>(value, q, recid));
+            new CacheWeakItem<>(value, q, recid) :
+            new CacheSoftItem<>(value, q, recid));
     }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/CompressLZF.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/CompressLZF.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/CompressLZF.java	(revision 30737)
@@ -346,5 +346,5 @@
      */
     public static <E> Serializer<E> CompressionWrapper(Serializer<E> serializer) {
-        return new Serializer.CompressSerializerWrapper<E>(serializer);
+        return new Serializer.CompressSerializerWrapper<>(serializer);
     }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/DB.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/DB.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/DB.java	(revision 30737)
@@ -32,5 +32,5 @@
     protected Engine engine;
     /** already loaded named collections. It is important to keep collections as singletons, because of 'in-memory' locking*/
-    protected Map<String, WeakReference<?>> collections = new HashMap<String, WeakReference<?>>();
+    protected Map<String, WeakReference<?>> collections = new HashMap<>();
 
     /** view over named records */
@@ -79,9 +79,9 @@
         if(recid!=null){
             //open existing map
-            ret = new HTreeMap<K,V>(engine, recid,defaultSerializer);
+            ret = new HTreeMap<>(engine, recid,defaultSerializer);
             if(!ret.hasValues) throw new ClassCastException("Collection is Set, not Map");
         }else{
             //create new map
-            ret = new HTreeMap<K,V>(engine,true,false,Utils.RANDOM.nextInt(), defaultSerializer,null, null);
+            ret = new HTreeMap<>(engine,true,false,Utils.RANDOM.nextInt(), defaultSerializer,null, null);
             nameDir.put(name, ret.rootRecid);
         }
@@ -106,5 +106,5 @@
             String name, boolean keepCounter, Serializer<K> keySerializer, Serializer<V> valueSerializer){
         checkNameNotExists(name);
-        HTreeMap<K,V> ret = new HTreeMap<K,V>(engine, true,keepCounter,Utils.RANDOM.nextInt(), defaultSerializer, keySerializer, valueSerializer);
+        HTreeMap<K,V> ret = new HTreeMap<>(engine, true,keepCounter,Utils.RANDOM.nextInt(), defaultSerializer, keySerializer, valueSerializer);
         nameDir.put(name, ret.rootRecid);
         collections.put(name, new WeakReference<Object>(ret));
@@ -126,10 +126,10 @@
         if(recid!=null){
             //open existing map
-            HTreeMap<K,Object> m = new HTreeMap<K,Object>(engine, recid, defaultSerializer);
+            HTreeMap<K,Object> m = new HTreeMap<>(engine, recid, defaultSerializer);
             if(m.hasValues) throw new ClassCastException("Collection is Map, not Set");
             ret = m.keySet();
         }else{
             //create new map
-            HTreeMap<K,Object> m = new HTreeMap<K,Object>(engine, false,false, Utils.RANDOM.nextInt(), defaultSerializer, null, null);
+            HTreeMap<K,Object> m = new HTreeMap<>(engine, false,false, Utils.RANDOM.nextInt(), defaultSerializer, null, null);
             ret = m.keySet();
             nameDir.put(name, m.rootRecid);
@@ -151,5 +151,5 @@
     synchronized public <K> Set<K> createHashSet(String name, boolean keepCounter, Serializer<K> serializer){
         checkNameNotExists(name);
-        HTreeMap<K,Object> ret = new HTreeMap<K,Object>(engine, false,keepCounter,Utils.RANDOM.nextInt(), defaultSerializer, serializer, null);
+        HTreeMap<K,Object> ret = new HTreeMap<>(engine, false,keepCounter,Utils.RANDOM.nextInt(), defaultSerializer, serializer, null);
         nameDir.put(name, ret.rootRecid);
         Set<K> ret2 = ret.keySet();
@@ -177,9 +177,9 @@
         if(recid!=null){
             //open existing map
-            ret = new BTreeMap<K,V>(engine, recid,defaultSerializer);
+            ret = new BTreeMap<>(engine, recid,defaultSerializer);
             if(!ret.hasValues) throw new ClassCastException("Collection is Set, not Map");
         }else{
             //create new map
-            ret = new BTreeMap<K,V>(engine,BTreeMap.DEFAULT_MAX_NODE_SIZE, true, false,false, defaultSerializer, null, null, null);
+            ret = new BTreeMap<>(engine,BTreeMap.DEFAULT_MAX_NODE_SIZE, true, false,false, defaultSerializer, null, null, null);
             nameDir.put(name, ret.treeRecid);
         }
@@ -206,5 +206,5 @@
             BTreeKeySerializer<K> keySerializer, Serializer<V> valueSerializer, Comparator<K> comparator){
         checkNameNotExists(name);
-        BTreeMap<K,V> ret = new BTreeMap<K,V>(engine, nodeSize, true,valuesStoredOutsideNodes, keepCounter,defaultSerializer, keySerializer, valueSerializer, comparator);
+        BTreeMap<K,V> ret = new BTreeMap<>(engine, nodeSize, true,valuesStoredOutsideNodes, keepCounter,defaultSerializer, keySerializer, valueSerializer, comparator);
         nameDir.put(name, ret.treeRecid);
         collections.put(name, new WeakReference<Object>(ret));
@@ -236,10 +236,10 @@
         if(recid!=null){
             //open existing map
-            BTreeMap<K,Object> m = new BTreeMap<K,Object>(engine,  recid, defaultSerializer);
+            BTreeMap<K,Object> m = new BTreeMap<>(engine,  recid, defaultSerializer);
             if(m.hasValues) throw new ClassCastException("Collection is Map, not Set");
             ret = m.keySet();
         }else{
             //create new map
-            BTreeMap<K,Object> m =  new BTreeMap<K,Object>(engine,BTreeMap.DEFAULT_MAX_NODE_SIZE,
+            BTreeMap<K,Object> m =  new BTreeMap<>(engine,BTreeMap.DEFAULT_MAX_NODE_SIZE,
                     false, false,false, defaultSerializer, null, null, null);
             nameDir.put(name, m.treeRecid);
@@ -264,5 +264,5 @@
     synchronized public <K> NavigableSet<K> createTreeSet(String name,int nodeSize, boolean keepCounter, BTreeKeySerializer<K> serializer, Comparator<K> comparator){
         checkNameNotExists(name);
-        BTreeMap<K,Object> ret = new BTreeMap<K,Object>(engine, nodeSize, false, false, keepCounter, defaultSerializer, serializer, null, comparator);
+        BTreeMap<K,Object> ret = new BTreeMap<>(engine, nodeSize, false, false, keepCounter, defaultSerializer, serializer, null, comparator);
         nameDir.put(name, ret.treeRecid);
         NavigableSet<K> ret2 = ret.keySet();
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/EngineWrapper.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/EngineWrapper.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/EngineWrapper.java	(revision 30737)
@@ -228,5 +228,5 @@
         //TODO CAS
 
-        final Queue<Record> records = new ConcurrentLinkedQueue<Record>();
+        final Queue<Record> records = new ConcurrentLinkedQueue<>();
 
 
@@ -337,5 +337,5 @@
             if(item!=null) item.check();
             A ret = super.get(recid, serializer);
-            if(ret!=null) items.put(recid, new Item<A>(serializer,ret));
+            if(ret!=null) items.put(recid, new Item<>(serializer,ret));
             return ret;
         }
@@ -344,5 +344,5 @@
         public <A> long put(A value, Serializer<A> serializer) {
             long ret =  super.put(value, serializer);
-            if(value!=null) items.put(ret, new Item<A>(serializer,value));
+            if(value!=null) items.put(ret, new Item<>(serializer,value));
             return ret;
         }
@@ -353,5 +353,5 @@
             if(item!=null) item.check();
             super.update(recid, value, serializer);
-            if(value!=null) items.put(recid, new Item<A>(serializer,value));
+            if(value!=null) items.put(recid, new Item<>(serializer,value));
         }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/Fun.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/Fun.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/Fun.java	(revision 30737)
@@ -43,13 +43,13 @@
 
     public static <A,B> Tuple2<A,B> t2(A a, B b) {
-        return new Tuple2<A, B>(a,b);
+        return new Tuple2<>(a,b);
     }
 
     public static <A,B,C> Tuple3<A,B,C> t3(A a, B b, C c) {
-        return new Tuple3<A, B, C>((A)a, (B)b, (C)c);
+        return new Tuple3<>((A)a, (B)b, (C)c);
     }
 
     public static <A,B,C,D> Tuple4<A,B,C,D> t4(A a, B b, C c, D d) {
-        return new Tuple4<A, B, C, D>(a,b,c,d);
+        return new Tuple4<>(a,b,c,d);
     }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/HTreeMap.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/HTreeMap.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/HTreeMap.java	(revision 30737)
@@ -137,5 +137,5 @@
         @Override
         public LinkedNode<K,V> deserialize(DataInput in, int available) throws IOException {
-            return new LinkedNode<K, V>(
+            return new LinkedNode<>(
                     Utils.unpackLong(in),
                     (K) keySerializer.deserialize(in,-1),
@@ -294,5 +294,5 @@
         HashRoot r = engine.get(Engine.NAME_DIR_RECID, serializer);
         if(r!=null)
-            return new HTreeMap<String, Long>(engine, Engine.NAME_DIR_RECID, Serializer.BASIC_SERIALIZER);
+            return new HTreeMap<>(engine, Engine.NAME_DIR_RECID, Serializer.BASIC_SERIALIZER);
 
         if(engine.isReadOnly())
@@ -310,5 +310,5 @@
         engine.update(Engine.NAME_DIR_RECID, r, serializer);
         //and now load it
-        return new HTreeMap<String, Long>(engine, Engine.NAME_DIR_RECID, Serializer.BASIC_SERIALIZER);
+        return new HTreeMap<>(engine, Engine.NAME_DIR_RECID, Serializer.BASIC_SERIALIZER);
 
     }
@@ -482,5 +482,5 @@
                             //found, replace value at this node
                             V oldVal = ln.value;
-                            ln = new LinkedNode<K, V>(ln.next, ln.key, value);
+                            ln = new LinkedNode<>(ln.next, ln.key, value);
                             engine.update(recid, ln, LN_SERIALIZER);
                             notify(key,  oldVal, value);
@@ -503,5 +503,5 @@
                         int pos =(h >>>(7*(level-1) )) & 0x7F;
                         nextDir[pos/8] = new long[8];
-                        nextDir[pos/8][pos%8] = (engine.put(new LinkedNode<K, V>(0, key, value), LN_SERIALIZER) <<1) | 1;
+                        nextDir[pos/8][pos%8] = (engine.put(new LinkedNode<>(0, key, value), LN_SERIALIZER) <<1) | 1;
                     }
 
@@ -514,5 +514,5 @@
                         int pos = (hash(n.key) >>>(7*(level -1) )) & 0x7F;
                         if(nextDir[pos/8]==null) nextDir[pos/8] = new long[8];
-                        n = new LinkedNode<K, V>(nextDir[pos/8][pos%8]>>>1, n.key, n.value);
+                        n = new LinkedNode<>(nextDir[pos/8][pos%8]>>>1, n.key, n.value);
                         nextDir[pos/8][pos%8] = (nodeRecid<<1) | 1;
                         engine.update(nodeRecid, n, LN_SERIALIZER);
@@ -530,5 +530,5 @@
                     // record does not exist in linked list, so create new one
                     recid = dir[slot/8][slot%8]>>>1;
-                    long newRecid = engine.put(new LinkedNode<K, V>(recid, key, value), LN_SERIALIZER);
+                    long newRecid = engine.put(new LinkedNode<>(recid, key, value), LN_SERIALIZER);
                     dir[slot/8][slot%8] = (newRecid<<1) | 1;
                     engine.update(dirRecid, dir, DIR_SERIALIZER);
@@ -601,5 +601,5 @@
                             }else{
                                 //referenced from LinkedNode
-                                prevLn = new LinkedNode<K, V>(ln.next, prevLn.key, prevLn.value);
+                                prevLn = new LinkedNode<>(ln.next, prevLn.key, prevLn.value);
                                 engine.update(prevRecid, prevLn, LN_SERIALIZER);
                             }
@@ -1176,5 +1176,5 @@
     public Map<K,V> snapshot(){
         Engine snapshot = SnapshotEngine.createSnapshotFor(engine);
-        return new HTreeMap<K, V>(snapshot,rootRecid, defaultSerialzierForSnapshots);
+        return new HTreeMap<>(snapshot,rootRecid, defaultSerialzierForSnapshots);
     }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/LongConcurrentHashMap.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/LongConcurrentHashMap.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/LongConcurrentHashMap.java	(revision 30737)
@@ -386,5 +386,5 @@
                     oldValue = null;
                     ++modCount;
-                    tab[index] = new HashEntry<V>(key, hash, first, value);
+                    tab[index] = new HashEntry<>(key, hash, first, value);
                     count = c; // write-volatile
                 }
@@ -448,5 +448,5 @@
                             int k = p.hash & sizeMask;
                             HashEntry<V> n = newTable[k];
-                            newTable[k] = new HashEntry<V>(p.key, p.hash,
+                            newTable[k] = new HashEntry<>(p.key, p.hash,
                                     n, p.value);
                         }
@@ -482,5 +482,5 @@
                         HashEntry<V> newFirst = e.next;
                         for (HashEntry<V> p = first; p != e; p = p.next)
-                            newFirst = new HashEntry<V>(p.key, p.hash,
+                            newFirst = new HashEntry<>(p.key, p.hash,
                                                           newFirst, p.value);
                         tab[index] = newFirst;
@@ -559,5 +559,5 @@
 
         for (int i = 0; i < this.segments.length; ++i)
-            this.segments[i] = new Segment<V>(cap, loadFactor);
+            this.segments[i] = new Segment<>(cap, loadFactor);
     }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/LongHashMap.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/LongHashMap.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/LongHashMap.java	(revision 30737)
@@ -379,5 +379,5 @@
 
     Entry<V> createHashedEntry(long key, int index, int hash) {
-        Entry<V> entry = new Entry<V>(key,hash);
+        Entry<V> entry = new Entry<>(key,hash);
         entry.next = elementData[index];
         elementData[index] = entry;
@@ -466,10 +466,10 @@
     @Override
     public Iterator<V> valuesIterator() {
-        return new ValueIterator<V>(this);
+        return new ValueIterator<>(this);
     }
 
     @Override
     public LongMapIterator<V> longMapIterator() {
-        return new EntryIterator<V>(this);
+        return new EntryIterator<>(this);
     }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/Queues.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/Queues.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/Queues.java	(revision 30737)
@@ -44,5 +44,5 @@
             public Node<E> deserialize(DataInput in, int available) throws IOException {
                 if(available==0)return Node.EMPTY;
-                return new Node<E>(Utils.unpackLong(in), serializer.deserialize(in,-1));
+                return new Node<>(Utils.unpackLong(in), serializer.deserialize(in,-1));
             }
         }
@@ -56,5 +56,5 @@
             if(headRecid == 0) headRecid = engine.put(0L, Serializer.LONG_SERIALIZER);
             head = new Atomic.Long(engine,headRecid);
-            nodeSerializer = new NodeSerializer<E>(serializer);
+            nodeSerializer = new NodeSerializer<>(serializer);
         }
 
@@ -246,10 +246,10 @@
         public boolean add(E e) {
             long head2 = head.get();
-            Node<E> n = new Node<E>(head2, e);
+            Node<E> n = new Node<>(head2, e);
             long recid = engine.put(n, nodeSerializer);
             while(!head.compareAndSet(head2, recid)){
                 //failed to update head, so read new value and start over
                 head2 = head.get();
-                n = new Node<E>(head2, e);
+                n = new Node<>(head2, e);
                 engine.update(recid, n, nodeSerializer);
             }
@@ -307,5 +307,5 @@
     static <E> Stack<E> getStack(Engine engine, Serializer<Serializer> serializerSerializer, long rootRecid){
         StackRoot root = engine.get(rootRecid, new StackRootSerializer(serializerSerializer));
-        return new Stack<E>(engine, root.serializer, root.headerRecid, root.useLocks);
+        return new Stack<>(engine, root.serializer, root.headerRecid, root.useLocks);
     }
 
@@ -330,5 +330,5 @@
         public boolean add(E item){
             final long nextTail = engine.put((Node<E>)Node.EMPTY, nodeSerializer);
-            Node<E> n = new Node<E>(nextTail, item);
+            Node<E> n = new Node<>(nextTail, item);
             long tail2 = tail.get();
             while(!engine.compareAndSwap(tail2, (Node<E>)Node.EMPTY, n, nodeSerializer)){
@@ -435,5 +435,5 @@
     static <E> Queue<E> getQueue(Engine engine, Serializer<Serializer> serializerSerializer, long rootRecid){
         QueueRoot root = engine.get(rootRecid, new QueueRootSerializer(serializerSerializer));
-        return new Queue<E>(engine, root.serializer, root.headerRecid, root.nextTailRecid,root.sizeRecid);
+        return new Queue<>(engine, root.serializer, root.headerRecid, root.nextTailRecid,root.sizeRecid);
     }
 
@@ -459,5 +459,5 @@
                 long nRecid = headInsert.get();
                 Node<E> n = engine.get(nRecid, nodeSerializer);
-                n = new Node<E>(n.next, (E) o);
+                n = new Node<>(n.next, (E) o);
                 engine.update(nRecid, n, nodeSerializer);
                 headInsert.set(n.next);
@@ -579,5 +579,5 @@
     static <E> CircularQueue<E> getCircularQueue(Engine engine, Serializer<Serializer> serializerSerializer, long rootRecid){
         CircularQueueRoot root = engine.get(rootRecid, new CircularQueueRootSerializer(serializerSerializer));
-        return new CircularQueue<E>(engine, root.serializer, root.headerRecid, root.headerInsertRecid,root.sizeRecid);
+        return new CircularQueue<>(engine, root.serializer, root.headerRecid, root.headerInsertRecid,root.sizeRecid);
     }
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/SerializerBase.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/SerializerBase.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/SerializerBase.java	(revision 30737)
@@ -1301,5 +1301,5 @@
     private ArrayList<Object> deserializeArrayList(DataInput is, FastArrayList<Object> objectStack) throws IOException {
         int size = Utils.unpackInt(is);
-        ArrayList<Object> s = new ArrayList<Object>(size);
+        ArrayList<Object> s = new ArrayList<>(size);
         objectStack.add(s);
         for (int i = 0; i < size; i++) {
@@ -1314,5 +1314,5 @@
             throw new EOFException();
 
-        ArrayList<Object> s = new ArrayList<Object>(size);
+        ArrayList<Object> s = new ArrayList<>(size);
         for (int i = 0; i < size; i++) {
             long l = Utils.unpackLong(is);
@@ -1338,5 +1338,5 @@
     private Vector<Object> deserializeVector(DataInput is, FastArrayList<Object> objectStack) throws IOException {
         int size = Utils.unpackInt(is);
-        Vector<Object> s = new Vector<Object>(size);
+        Vector<Object> s = new Vector<>(size);
         objectStack.add(s);
         for (int i = 0; i < size; i++)
@@ -1348,5 +1348,5 @@
     private HashSet<Object> deserializeHashSet(DataInput is, FastArrayList<Object> objectStack) throws IOException {
         int size = Utils.unpackInt(is);
-        HashSet<Object> s = new HashSet<Object>(size);
+        HashSet<Object> s = new HashSet<>(size);
         objectStack.add(s);
         for (int i = 0; i < size; i++)
@@ -1358,5 +1358,5 @@
     private LinkedHashSet<Object> deserializeLinkedHashSet(DataInput is, FastArrayList<Object> objectStack) throws IOException {
         int size = Utils.unpackInt(is);
-        LinkedHashSet<Object> s = new LinkedHashSet<Object>(size);
+        LinkedHashSet<Object> s = new LinkedHashSet<>(size);
         objectStack.add(s);
         for (int i = 0; i < size; i++)
@@ -1368,9 +1368,9 @@
     private TreeSet<Object> deserializeTreeSet(DataInput is, FastArrayList<Object> objectStack) throws IOException {
         int size = Utils.unpackInt(is);
-        TreeSet<Object> s = new TreeSet<Object>();
+        TreeSet<Object> s = new TreeSet<>();
         objectStack.add(s);
         Comparator comparator = (Comparator) deserialize(is, objectStack);
         if (comparator != null)
-            s = new TreeSet<Object>(comparator);
+            s = new TreeSet<>(comparator);
 
         for (int i = 0; i < size; i++)
@@ -1383,9 +1383,9 @@
         int size = Utils.unpackInt(is);
 
-        TreeMap<Object, Object> s = new TreeMap<Object, Object>();
+        TreeMap<Object, Object> s = new TreeMap<>();
         objectStack.add(s);
         Comparator comparator = (Comparator) deserialize(is, objectStack);
         if (comparator != null)
-            s = new TreeMap<Object, Object>(comparator);
+            s = new TreeMap<>(comparator);
         for (int i = 0; i < size; i++)
             s.put(deserialize(is, objectStack), deserialize(is, objectStack));
@@ -1397,5 +1397,5 @@
         int size = Utils.unpackInt(is);
 
-        HashMap<Object, Object> s = new HashMap<Object, Object>(size);
+        HashMap<Object, Object> s = new HashMap<>(size);
         objectStack.add(s);
         for (int i = 0; i < size; i++)
@@ -1407,5 +1407,5 @@
         int size = Utils.unpackInt(is);
 
-        IdentityHashMap<Object, Object> s = new IdentityHashMap<Object, Object>(size);
+        IdentityHashMap<Object, Object> s = new IdentityHashMap<>(size);
         objectStack.add(s);
         for (int i = 0; i < size; i++)
@@ -1417,5 +1417,5 @@
         int size = Utils.unpackInt(is);
 
-        LinkedHashMap<Object, Object> s = new LinkedHashMap<Object, Object>(size);
+        LinkedHashMap<Object, Object> s = new LinkedHashMap<>(size);
         objectStack.add(s);
         for (int i = 0; i < size; i++)
@@ -1428,5 +1428,5 @@
         int size = Utils.unpackInt(is);
 
-        Hashtable<Object, Object> s = new Hashtable<Object, Object>(size);
+        Hashtable<Object, Object> s = new Hashtable<>(size);
         objectStack.add(s);
         for (int i = 0; i < size; i++)
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/SerializerPojo.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/SerializerPojo.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/SerializerPojo.java	(revision 30737)
@@ -59,8 +59,8 @@
         @Override
 		public CopyOnWriteArrayList<ClassInfo> deserialize(DataInput in, int available) throws IOException{
-            if(available==0) return new CopyOnWriteArrayList<ClassInfo>();
+            if(available==0) return new CopyOnWriteArrayList<>();
 
             int size = Utils.unpackInt(in);
-            ArrayList<ClassInfo> ret = new ArrayList<ClassInfo>(size);
+            ArrayList<ClassInfo> ret = new ArrayList<>(size);
 
             for (int i = 0; i < size; i++) {
@@ -76,5 +76,5 @@
                 ret.add(new ClassInfo(className, fields,isEnum,isExternalizable));
             }
-            return new CopyOnWriteArrayList<ClassInfo>(ret);
+            return new CopyOnWriteArrayList<>(ret);
         }
     };
@@ -95,5 +95,5 @@
     public SerializerPojo(CopyOnWriteArrayList<ClassInfo> registered){
         if(registered == null)
-            this.registered = new CopyOnWriteArrayList<ClassInfo>();
+            this.registered = new CopyOnWriteArrayList<>();
         else
             this.registered = registered;
@@ -107,7 +107,7 @@
 
         private final String name;
-        private final List<FieldInfo> fields = new ArrayList<FieldInfo>();
-        private final Map<String, FieldInfo> name2fieldInfo = new HashMap<String, FieldInfo>();
-        private final Map<String, Integer> name2fieldId = new HashMap<String, Integer>();
+        private final List<FieldInfo> fields = new ArrayList<>();
+        private final Map<String, FieldInfo> name2fieldInfo = new HashMap<>();
+        private final Map<String, Integer> name2fieldId = new HashMap<>();
         private ObjectStreamField[] objectStreamFields;
 
@@ -290,6 +290,6 @@
 
     CopyOnWriteArrayList<ClassInfo> registered;
-    Map<Class<?>, Integer> class2classId = new HashMap<Class<?>, Integer>();
-    Map<Integer, Class<?>> classId2class = new HashMap<Integer, Class<?>>();
+    Map<Class<?>, Integer> class2classId = new HashMap<>();
+    Map<Integer, Class<?>> classId2class = new HashMap<>();
 
 
@@ -333,5 +333,5 @@
         if (fields == null) {
             ObjectStreamClass streamClass = ObjectStreamClass.lookup(clazz);
-            FastArrayList<ObjectStreamField> fieldsList = new FastArrayList<ObjectStreamField>();
+            FastArrayList<ObjectStreamField> fieldsList = new FastArrayList<>();
             while (streamClass != null) {
                 for (ObjectStreamField f : streamClass.getFields()) {
@@ -567,5 +567,5 @@
 
 
-    private static Map<Class<?>, Constructor<?>> class2constuctor = new ConcurrentHashMap<Class<?>, Constructor<?>>();
+    private static Map<Class<?>, Constructor<?>> class2constuctor = new ConcurrentHashMap<>();
 
     /**
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/SnapshotEngine.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/SnapshotEngine.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/SnapshotEngine.java	(revision 30737)
@@ -22,5 +22,5 @@
 
 
-    protected final Map<Snapshot, String> snapshots = new ConcurrentHashMap<Snapshot, String>();
+    protected final Map<Snapshot, String> snapshots = new ConcurrentHashMap<>();
 
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/StoreAppend.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/StoreAppend.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/StoreAppend.java	(revision 30737)
@@ -4,5 +4,4 @@
 import java.io.IOError;
 import java.io.IOException;
-import java.util.BitSet;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
@@ -37,6 +36,6 @@
     volatile protected long maxRecid;
 
-    protected LongConcurrentHashMap<Volume> volumes = new LongConcurrentHashMap<Volume>();
-    protected final LongConcurrentHashMap<Long> recidsInTx = new LongConcurrentHashMap<Long>();
+    protected LongConcurrentHashMap<Volume> volumes = new LongConcurrentHashMap<>();
+    protected final LongConcurrentHashMap<Long> recidsInTx = new LongConcurrentHashMap<>();
 
 
@@ -85,5 +84,5 @@
 
             //replay file and rebuild recid index table
-            LongHashMap<Long> recidsTable2 = new LongHashMap<Long>();
+            LongHashMap<Long> recidsTable2 = new LongHashMap<>();
             if(!currentVolume.isEmpty()){
                 currentFileOffset =0;
@@ -405,5 +404,5 @@
             if(!recidsInTx.isEmpty()) throw new IllegalAccessError("Uncommited changes");
 
-            LongHashMap<Boolean> ff = new LongHashMap<Boolean>();
+            LongHashMap<Boolean> ff = new LongHashMap<>();
             for(long recid=0;recid<maxRecid;recid++){
                 long indexVal = recidsTable.getLong(recid*8);
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/StoreWAL.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/StoreWAL.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/StoreWAL.java	(revision 30737)
@@ -3,6 +3,4 @@
 import java.io.IOError;
 import java.io.IOException;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 /**
@@ -31,5 +29,5 @@
     protected long logSize;
 
-    protected final LongConcurrentHashMap<long[]> modified = new LongConcurrentHashMap<long[]>();
+    protected final LongConcurrentHashMap<long[]> modified = new LongConcurrentHashMap<>();
 
 
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/TxMaker.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/TxMaker.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/TxMaker.java	(revision 30737)
@@ -18,5 +18,5 @@
     protected final Object lock = new Object();
 
-    protected final LongMap<TxEngine> globalMod = new LongHashMap<TxEngine>();
+    protected final LongMap<TxEngine> globalMod = new LongHashMap<>();
 
 
@@ -59,7 +59,7 @@
 
         protected LongMap<Fun.Tuple2<?, Serializer>> modItems =
-                new LongHashMap<Fun.Tuple2<?, Serializer>>();
+                new LongHashMap<>();
 
-        protected Set<Long> newItems = new LinkedHashSet<Long>();
+        protected Set<Long> newItems = new LinkedHashSet<>();
 
         protected TxEngine(Engine engine) {
Index: applications/editors/josm/plugins/imagerycache/src/org/mapdb/Volume.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/mapdb/Volume.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/mapdb/Volume.java	(revision 30737)
@@ -28,6 +28,4 @@
 import java.util.Map;
 import java.util.WeakHashMap;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.logging.Level;
Index: applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/DBTile.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/DBTile.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/DBTile.java	(revision 30737)
@@ -16,7 +16,7 @@
         data = dbTile.data.clone();
         if (dbTile.metaData != null) {
-            metaData = new HashMap<String, String>(dbTile.metaData);
+            metaData = new HashMap<>(dbTile.metaData);
         } else {
-            metaData = new HashMap<String, String>();
+            metaData = new HashMap<>();
         }
         lastModified = dbTile.lastModified;
Index: applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/TileDAOMapDB.java
===================================================================
--- applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/TileDAOMapDB.java	(revision 30736)
+++ applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/TileDAOMapDB.java	(revision 30737)
@@ -19,6 +19,6 @@
     public static boolean dbNotAvailable = false;
 
-    protected HashMap<String, DB> dbs = new HashMap<String, DB>();
-    protected HashMap<String, Map<Long, DBTile>> storages = new HashMap<String, Map<Long, DBTile>>();
+    protected HashMap<String, DB> dbs = new HashMap<>();
+    protected HashMap<String, Map<Long, DBTile>> storages = new HashMap<>();
     private File cacheFolder;
     
Index: applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageEntries.java
===================================================================
--- applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageEntries.java	(revision 30736)
+++ applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageEntries.java	(revision 30737)
@@ -39,7 +39,7 @@
 
     private ImageEntries() {
-        this.images = new ArrayList<ImageEntry>();
-        this.locatedImages = new ArrayList<ImageEntry>();
-        this.listeners = new ArrayList<IImageChangeListener>();
+        this.images = new ArrayList<>();
+        this.locatedImages = new ArrayList<>();
+        this.listeners = new ArrayList<>();
         this.listener = new ImageReadyListener(this);
 
@@ -112,5 +112,5 @@
     private final List<String> getTextContentsFromWayPoint(
     final WayPoint wayPoint) {
-    final List<String> texts = new ArrayList<String>();
+    final List<String> texts = new ArrayList<>();
     for(String s : new String[]{"name", "cmt", "desc"})
     {
Index: applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointPlugin.java
===================================================================
--- applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointPlugin.java	(revision 30737)
@@ -60,5 +60,5 @@
             
                 // recursively find all files
-                final List<File> allFiles = new ArrayList<File>();
+                final List<File> allFiles = new ArrayList<>();
                 addFiles(allFiles, files.toArray(new File[0]));
 
Index: applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec/SvgImportTask.java
===================================================================
--- applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec/SvgImportTask.java	(revision 30736)
+++ applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec/SvgImportTask.java	(revision 30737)
@@ -39,6 +39,6 @@
  */
 public class SvgImportTask extends PleaseWaitRunnable {
-    LinkedList<Node> nodes = new LinkedList<Node>();
-    LinkedList<Way> ways = new LinkedList<Way>();
+    LinkedList<Node> nodes = new LinkedList<>();
+    LinkedList<Way> ways = new LinkedList<>();
     private List<File> files;
     private boolean canceled;
@@ -46,5 +46,5 @@
     public SvgImportTask(List<File> files) {
         super(I18n.tr("Importing..."), false);
-        this.files = new ArrayList<File>(files);
+        this.files = new ArrayList<>(files);
     }
 
@@ -184,5 +184,5 @@
             throw new IOException(e);
         }
-        LinkedList<Command> cmds = new LinkedList<Command>();
+        LinkedList<Command> cmds = new LinkedList<>();
         for (Node n : nodes) {
             cmds.add(new AddCommand(n));
Index: applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoMode.java
===================================================================
--- applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoMode.java	(revision 30736)
+++ applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoMode.java	(revision 30737)
@@ -10,15 +10,12 @@
 package org.openstreetmap.josm.plugins.infomode;
 
+import static org.openstreetmap.josm.tools.I18n.tr;
+
 import java.awt.AWTEvent;
 import java.awt.BasicStroke;
 import java.awt.Color;
-import java.awt.Point;
-import java.awt.event.MouseEvent;
-import org.openstreetmap.josm.data.coor.EastNorth;
-import org.openstreetmap.josm.data.gpx.WayPoint;
-import static org.openstreetmap.josm.tools.I18n.tr;
-
 import java.awt.Cursor;
 import java.awt.Graphics2D;
+import java.awt.Point;
 import java.awt.Stroke;
 import java.awt.Toolkit;
@@ -27,6 +24,8 @@
 import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
 import java.util.HashSet;
 import java.util.Set;
+
 import javax.swing.Popup;
 import javax.swing.PopupFactory;
@@ -35,6 +34,8 @@
 import org.openstreetmap.josm.actions.mapmode.MapMode;
 import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.gpx.GpxTrack;
 import org.openstreetmap.josm.data.gpx.GpxTrackSegment;
+import org.openstreetmap.josm.data.gpx.WayPoint;
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.MapView;
@@ -58,8 +59,8 @@
 
     InfoMode(MapFrame mapFrame) {
-        super(tr("InfoMode"), "infomode.png", tr("GPX info mode"), 
+        super(tr("InfoMode"), "infomode.png", tr("GPX info mode"),
 		Shortcut.registerShortcut("mapmode:infomode", tr("Mode: {0}", tr("GPX info mode")), KeyEvent.VK_BACK_SLASH, Shortcut.DIRECT), mapFrame, Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
         infoPanel=new InfoPanel();
-        
+
     }
 
@@ -105,5 +106,5 @@
         } catch (SecurityException ex) {
         }
-        
+
         repaint();
     }
@@ -122,5 +123,5 @@
         if (pos==null) return;
         Layer curL= Main.main.getActiveLayer();
-        if (curL instanceof GpxLayer) showLayerInfo(g,curL,mv); else {       
+        if (curL instanceof GpxLayer) showLayerInfo(g,curL,mv); else {
             for (Layer l:mv.getAllLayers()) {
                 if (l instanceof GpxLayer) {
@@ -157,5 +158,5 @@
             oldPopup.hide();
             oldPopup=null;        wpOld=null;
-        }        
+        }
         repaint();
     }
@@ -188,5 +189,5 @@
         }
     }
-    
+
 
     /**
@@ -220,8 +221,8 @@
     private synchronized void filterTracks() {
         Layer l = Main.main.getActiveLayer();
-        
+
         if (l instanceof GpxLayer && pos!=null) {
             GpxLayer gpxL = (GpxLayer )l;
-            Set<GpxTrack> toRemove = new HashSet<GpxTrack>();
+            Set<GpxTrack> toRemove = new HashSet<>();
             for (GpxTrack track : gpxL.data.tracks) {
                 boolean f=true;
@@ -234,5 +235,5 @@
             }
             gpxL.data.tracks.removeAll(toRemove);
-                                
+
 
         }
@@ -241,5 +242,5 @@
     private boolean showLayerInfo(Graphics2D g, Layer l, MapView mv) {
             GpxLayer gpxL = (GpxLayer )l;
-            
+
             double minDist=1e9,d;
             WayPoint wp=null,oldWp=null,prevWp=null;
@@ -251,5 +252,5 @@
                     for (WayPoint S : seg.getWayPoints()) {
                         d = S.getEastNorth().distance(pos);
-                        
+
                         if (d<minDist && d<maxD) {
                             minDist = d;
@@ -264,5 +265,5 @@
             if (wp!=null) {
                 Point p = mv.getPoint(wp.getCoor());
-                                
+
                 g.setColor(Color.RED);
                 g.fillOval(p.x-10, p.y-10, 20, 20); // mark selected point
@@ -285,5 +286,5 @@
                 int pcy = s.y+p.y+30;
                 if (shift) {pcx+=40; pcy-=30;}
-                
+
                 if (wp!=wpOld) {
                     if (oldPopup!=null) oldPopup.hide();
@@ -294,5 +295,5 @@
                     }
                     infoPanel.setData(wp,trk,vel,gpxL.data.tracks);
-                    Popup pp=PopupFactory.getSharedInstance().getPopup(mv, infoPanel, 
+                    Popup pp=PopupFactory.getSharedInstance().getPopup(mv, infoPanel,
                             pcx, pcy);
                     pp.show();
Index: applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoPanel.java
===================================================================
--- applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoPanel.java	(revision 30736)
+++ applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoPanel.java	(revision 30737)
@@ -1,29 +1,31 @@
 package org.openstreetmap.josm.plugins.infomode;
 
-import java.awt.event.MouseEvent;
-import java.util.HashSet;
-import java.util.Set;
-import org.openstreetmap.josm.data.gpx.GpxTrackSegment;
+import static org.openstreetmap.josm.tools.I18n.tr;
+
 import java.awt.GridBagLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
 import java.awt.event.MouseListener;
 import java.text.DateFormat;
 import java.util.Collection;
+import java.util.HashSet;
 import java.util.Locale;
+import java.util.Set;
+
 import javax.swing.BorderFactory;
 import javax.swing.JButton;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
+
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.gpx.GpxTrack;
+import org.openstreetmap.josm.data.gpx.GpxTrackSegment;
 import org.openstreetmap.josm.data.gpx.WayPoint;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.OpenBrowser;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
+class InfoPanel extends JPanel {
 
-class InfoPanel extends JPanel {
-    
     private Collection<GpxTrack> tracks;
     private GpxTrack trk;
@@ -38,8 +40,8 @@
     private JButton but1 = new JButton(tr("Delete this"));
     private JButton but2 = new JButton(tr("Delete this&older"));
-    
+
     public InfoPanel() {
         super(new GridBagLayout());
-        df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT,DateFormat.DEFAULT, Locale.getDefault()); 
+        df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT,DateFormat.DEFAULT, Locale.getDefault());
         setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
         add(label1, GBC.eol().insets(10,0,0,0));
@@ -54,12 +56,16 @@
         label6.addMouseListener(new MouseListener() {
             @Override
-            public void mouseClicked(MouseEvent e) { 
+            public void mouseClicked(MouseEvent e) {
                 String s = label6.getText();
-                OpenBrowser.displayUrl( s.substring(9, s.length()-11) ); 
+                OpenBrowser.displayUrl( s.substring(9, s.length()-11) );
             }
-            public void mousePressed(MouseEvent e) { }
-            public void mouseReleased(MouseEvent e) { }
-            public void mouseEntered(MouseEvent e) { }
-            public void mouseExited(MouseEvent e) { }
+            @Override
+			public void mousePressed(MouseEvent e) { }
+            @Override
+			public void mouseReleased(MouseEvent e) { }
+            @Override
+			public void mouseEntered(MouseEvent e) { }
+            @Override
+			public void mouseExited(MouseEvent e) { }
         });
         but1.addActionListener(new ActionListener() {
@@ -74,6 +80,6 @@
             public void actionPerformed(ActionEvent e) {
             if (tracks==null) return;
-            Set<GpxTrack> toRemove = new HashSet<GpxTrack>();
-            
+            Set<GpxTrack> toRemove = new HashSet<>();
+
             double tm=-1;
             for (GpxTrackSegment seg : trk.getSegments()) {
@@ -82,5 +88,5 @@
                     }
                 }
-            
+
             for (GpxTrack track : tracks) {
                 boolean f=true;
@@ -96,5 +102,5 @@
             }
         });
-        
+
 
     }
@@ -112,5 +118,5 @@
               else label2.setText(null);
         String s = (String) trk.getAttributes().get("name");
-        if (s!=null) label3.setText(tr("Track name: ")+s); 
+        if (s!=null) label3.setText(tr("Track name: ")+s);
                 else label3.setText(null);
         s = (String) trk.getAttributes().get("desc");
@@ -125,4 +131,4 @@
         } else label6.setText(null);
     }
-    
+
 }
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java	(revision 30737)
@@ -76,5 +76,5 @@
     protected void realRun() throws SAXException, IOException,
     OsmTransferException {
-        jc.checkjunctions(new ArrayList<Channel>(subset), getProgressMonitor());
+        jc.checkjunctions(new ArrayList<>(subset), getProgressMonitor());
     }
 
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionSearchTask.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionSearchTask.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionSearchTask.java	(revision 30737)
@@ -64,5 +64,5 @@
     protected void realRun() throws SAXException, IOException,
     OsmTransferException {
-        jc.junctionSearch(new ArrayList<Channel>(subset), getProgressMonitor());
+        jc.junctionSearch(new ArrayList<>(subset), getProgressMonitor());
     }
 
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/PrepareJunctionCheckorSearch.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/PrepareJunctionCheckorSearch.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/PrepareJunctionCheckorSearch.java	(revision 30737)
@@ -23,5 +23,5 @@
         this.plugin = plugin;
         this.n = n;
-        this.subset = new HashSet<Channel>();
+        this.subset = new HashSet<>();
         this.produceRelation = producerelation;
     }
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/commandlineinterface/CLI.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/commandlineinterface/CLI.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/commandlineinterface/CLI.java	(revision 30737)
@@ -91,5 +91,5 @@
 
         JunctionChecker jc = new JunctionChecker(cdgb.getDigraph(), n);
-        ArrayList<Channel> subset = new ArrayList<Channel>();
+        ArrayList<Channel> subset = new ArrayList<>();
 
         Channel seed = new Channel();
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/DiGraphSealer.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/DiGraphSealer.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/DiGraphSealer.java	(revision 30737)
@@ -34,6 +34,6 @@
      */
     public void sealingGraph() {
-        Vector<Integer> outgoingChannelIDs = new Vector<Integer>();
-        Vector<Integer> incomingChannelIDs = new Vector<Integer>();
+        Vector<Integer> outgoingChannelIDs = new Vector<>();
+        Vector<Integer> incomingChannelIDs = new Vector<>();
 
         for (int i = 0; i < digraph.numberOfChannels(); i++) {
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/StrongConnectednessCalculator.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/StrongConnectednessCalculator.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/StrongConnectednessCalculator.java	(revision 30737)
@@ -8,9 +8,9 @@
 
     private int index = 0;
-    private final ArrayList<Channel> stack = new ArrayList<Channel>();
-    private final ArrayList<ArrayList<Channel>> SCC = new ArrayList<ArrayList<Channel>>();
+    private final ArrayList<Channel> stack = new ArrayList<>();
+    private final ArrayList<ArrayList<Channel>> SCC = new ArrayList<>();
     private final int numberOfNodes;
     private int calculatedNodes = 0;
-    private ArrayList<Channel> nsccchannels = new ArrayList<Channel>();
+    private ArrayList<Channel> nsccchannels = new ArrayList<>();
     private final ChannelDiGraph digraph;
     int biggestPart = 0;
@@ -57,5 +57,5 @@
      **/
     private void saveNotSCCChannel() {
-        nsccchannels = new ArrayList<Channel>();
+        nsccchannels = new ArrayList<>();
         for (int i = 0; i < SCC.size(); i++) {
             if (i != biggestPart) {
@@ -124,5 +124,5 @@
         if (v.getLowlink() == v.getIndex()) {
             Channel n;
-            ArrayList<Channel> component = new ArrayList<Channel>();
+            ArrayList<Channel> component = new ArrayList<>();
             do {
                 n = stack.remove(0);
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/TurnRestrictionChecker.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/TurnRestrictionChecker.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/TurnRestrictionChecker.java	(revision 30737)
@@ -18,5 +18,5 @@
 public class TurnRestrictionChecker {
 
-    private final ArrayList<OSMRelation> turnrestrictionsrelations = new ArrayList<OSMRelation>();
+    private final ArrayList<OSMRelation> turnrestrictionsrelations = new ArrayList<>();
     private final ChannelDiGraph channelDigraph;
     private int relationpointer;
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/BasicChannel.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/BasicChannel.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/BasicChannel.java	(revision 30737)
@@ -11,10 +11,10 @@
     private OSMNode toNode;
     private OSMNode fromNode;
-    private ArrayList<LeadsTo> leadsTo = new ArrayList<LeadsTo>();
-    private final ArrayList<OSMWay> ways = new ArrayList<OSMWay>();
+    private ArrayList<LeadsTo> leadsTo = new ArrayList<>();
+    private final ArrayList<OSMWay> ways = new ArrayList<>();
     private int newid;
     //gibt es nur, wenn ein Channelobjekt aus einer Nichteinbahnstraße erzeugt wurde (backchannelID ist dann die ID des anderen Channels)
     private int backChannelID = -100;
-    private final ArrayList<Channel> predChannels = new ArrayList<Channel>();
+    private final ArrayList<Channel> predChannels = new ArrayList<>();
 
     //werden für den Tarjan-Algorithmus gebraucht
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/Channel.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/Channel.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/Channel.java	(revision 30737)
@@ -17,5 +17,5 @@
     private boolean subgraph;
     private int visited = BacktrackingColors.WHITE;
-    private final ArrayList<Channel> reachableNodes = new ArrayList<Channel>();
+    private final ArrayList<Channel> reachableNodes = new ArrayList<>();
     private int ennr;
     private boolean isStrongConnected = true;
@@ -23,5 +23,5 @@
     private boolean isPartOfJunction = false; //wird für den eigenen Layer benötigt, um Teile einer Kreuzung farbig repräsentieren zu können
     
-    private final HashMap<Channel , ArrayList<Channel>> paths2 = new HashMap<Channel , ArrayList<Channel>>();
+    private final HashMap<Channel , ArrayList<Channel>> paths2 = new HashMap<>();
 
 
@@ -197,5 +197,5 @@
      */
     public ArrayList<ArrayList<Channel>> getPaths() {
-        ArrayList<ArrayList<Channel>> t = new ArrayList<ArrayList<Channel>>();
+        ArrayList<ArrayList<Channel>> t = new ArrayList<>();
         t.addAll(paths2.values());
         return t;
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/ChannelDiGraph.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/ChannelDiGraph.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/ChannelDiGraph.java	(revision 30737)
@@ -11,8 +11,8 @@
 public class ChannelDiGraph extends Graph {
 
-    private ArrayList<Channel> channels = new ArrayList<Channel>();
-    private final ArrayList<LeadsTo> leadsTos = new ArrayList<LeadsTo>();
-    private final HashSet<Channel> selectedChannels = new HashSet<Channel>();
-    private HashSet<Channel> junctioncandidate = new HashSet<Channel>();
+    private ArrayList<Channel> channels = new ArrayList<>();
+    private final ArrayList<LeadsTo> leadsTos = new ArrayList<>();
+    private final HashSet<Channel> selectedChannels = new HashSet<>();
+    private HashSet<Channel> junctioncandidate = new HashSet<>();
 
     public void setChannels(ArrayList<Channel> channels) {
@@ -100,5 +100,5 @@
      */
     public OSMNode[] getAllOSMNodes() {
-        HashMap<Long, OSMNode> nodes = new HashMap<Long, OSMNode>();
+        HashMap<Long, OSMNode> nodes = new HashMap<>();
         for (int i = 0; i < channels.size(); i++) {
             if (!nodes.containsKey(channels.get(i).getFromNode().getId())) {
@@ -185,5 +185,5 @@
      */
     public ArrayList<Channel> getChannelsTouchingOSMNodes (ArrayList<OSMNode> nodes) {
-        ArrayList<Channel> touchingChannel = new ArrayList<Channel>();
+        ArrayList<Channel> touchingChannel = new ArrayList<>();
         for (int i = 0; i < nodes.size(); i++) {
             for (int j = 0; j < channels.size(); j++) {
@@ -204,5 +204,5 @@
 
     public ArrayList<Channel> getChannelsTouchingOSMNode(long id) {
-        ArrayList<Channel> returnchannels = new ArrayList<Channel>();
+        ArrayList<Channel> returnchannels = new ArrayList<>();
         for (int i = 0; i < channels.size(); i++) {
             if (channels.get(i).getFromNode().getId() == id) {
@@ -223,5 +223,5 @@
      */
     public ArrayList<Channel> getChannelsBetween(int idfrom, int idto) {
-        ArrayList<Channel> channelsresult = new ArrayList<Channel>();
+        ArrayList<Channel> channelsresult = new ArrayList<>();
         for (int i = 0; i < channels.size(); i++) {
             if (channels.get(i).getFromNode().getId() == idfrom) {
@@ -240,5 +240,5 @@
 
     public ArrayList<Channel> getChannelswithWayID(int id) {
-        ArrayList<Channel> channelsresult = new ArrayList<Channel>();
+        ArrayList<Channel> channelsresult = new ArrayList<>();
         for (int i = 0; i < channels.size(); i++) {
             if (channels.get(i).getWay().getId() == id) {
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMEntity.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMEntity.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMEntity.java	(revision 30737)
@@ -38,5 +38,5 @@
      * @uml.property  name="hashmap"
      */
-    private HashMap<String, String> hashmap = new HashMap<String, String>();
+    private HashMap<String, String> hashmap = new HashMap<>();
     /**
      * @uml.property  name="version"
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMGraph.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMGraph.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMGraph.java	(revision 30737)
@@ -16,7 +16,7 @@
 public class OSMGraph extends Graph{
 
-    private final HashMap<Long, OSMWay> ways = new HashMap<Long, OSMWay>();
-    private HashMap<Long, OSMRelation> relations = new HashMap<Long, OSMRelation>();
-    private final HashMap<Long, OSMNode> nodes = new HashMap<Long, OSMNode>();
+    private final HashMap<Long, OSMWay> ways = new HashMap<>();
+    private HashMap<Long, OSMRelation> relations = new HashMap<>();
+    private final HashMap<Long, OSMNode> nodes = new HashMap<>();
 
     public void addNode(OSMNode node) {
@@ -86,5 +86,5 @@
     public ArrayList<Long> getIDsfromWay(int id) {
         OSMWay w = ways.get(id);
-        ArrayList<Long> ids  = new ArrayList<Long>();
+        ArrayList<Long> ids  = new ArrayList<>();
         ids.add(w.getToNode().getId());
         ids.add(w.getFromNode().getId());
@@ -97,5 +97,5 @@
         OSMnode.setLatitude(node.getBBox().getTopLeft().lat());
         OSMnode.setLongitude(node.getBBox().getTopLeft().lon());
-        OSMnode.setHashmap(new HashMap<String, String>(node.getKeys()));
+        OSMnode.setHashmap(new HashMap<>(node.getKeys()));
         nodes.put(OSMnode.getId(), OSMnode);
     }
@@ -108,5 +108,5 @@
             osmway.addNode(getNode(it.next().getId()));
         }
-        osmway.setHashmap(new HashMap<String, String>(way.getKeys()));
+        osmway.setHashmap(new HashMap<>(way.getKeys()));
         ways.put(osmway.getId(), osmway);
     }
@@ -115,5 +115,5 @@
         OSMRelation osmrelation = new OSMRelation();
         osmrelation.setId(relation.getId());
-        osmrelation.setHashmap(new HashMap<String, String>(relation.getKeys()));
+        osmrelation.setHashmap(new HashMap<>(relation.getKeys()));
         RelationMember rmember;
         for (int i = 0; i < relation.getMembers().size(); i++) {
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMNode.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMNode.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMNode.java	(revision 30737)
@@ -11,7 +11,7 @@
     private double latitude;
     private double longitude;
-    private ArrayList<Channel> outgoingChannels = new ArrayList<Channel>();
-    private ArrayList<OSMNode> succNodeList = new ArrayList<OSMNode>();
-    private ArrayList<OSMNode> predNodeList = new ArrayList<OSMNode>();
+    private ArrayList<Channel> outgoingChannels = new ArrayList<>();
+    private ArrayList<OSMNode> succNodeList = new ArrayList<>();
+    private ArrayList<OSMNode> predNodeList = new ArrayList<>();
     
     public void addOutgoingChannel(Channel channel) {
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMRelation.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMRelation.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMRelation.java	(revision 30737)
@@ -9,5 +9,5 @@
 public class OSMRelation extends OSMEntity {
 
-    private ArrayList<Member> members = new ArrayList<Member>();
+    private ArrayList<Member> members = new ArrayList<>();
 
     public void setMembers(ArrayList<Member> members) {
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMWay.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMWay.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMWay.java	(revision 30737)
@@ -8,5 +8,5 @@
 public class OSMWay extends OSMEntity {
 
-    private Vector<OSMNode> nodes = new Vector<OSMNode>();
+    private Vector<OSMNode> nodes = new Vector<>();
 
     public OSMNode[] getNodes() {
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/filter/Filter.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/filter/Filter.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/filter/Filter.java	(revision 30737)
@@ -9,5 +9,5 @@
 public class Filter {
     
-    private HashSet<String> tagValues = new HashSet<String>();
+    private HashSet<String> tagValues = new HashSet<>();
     private String keyValue;
     
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JMinimality.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JMinimality.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JMinimality.java	(revision 30737)
@@ -28,12 +28,12 @@
     private final ArrayList<Channel> OrEx;
     private final int n;
-    private final List<List<Object>> L = new ArrayList<List<Object>>(); //The list of columns to be sorted
+    private final List<List<Object>> L = new ArrayList<>(); //The list of columns to be sorted
     private long EEovern = 0;
-    private final HashSet<Channel> subgraph = new HashSet<Channel>();//The candidate subgraph to be tested
+    private final HashSet<Channel> subgraph = new HashSet<>();//The candidate subgraph to be tested
     private ProgressMonitor pm;
     private final boolean pmenabled;
-    private final ArrayList<HashSet<Channel>> junctions = new ArrayList<HashSet<Channel>>();
+    private final ArrayList<HashSet<Channel>> junctions = new ArrayList<>();
     private final boolean searchFirstJunction;
-    private final ArrayList<Channel> subJunction = new ArrayList<Channel>();
+    private final ArrayList<Channel> subJunction = new ArrayList<>();
     private final JPrepare jprepare;
     private boolean Check = false;
@@ -92,5 +92,5 @@
             do {
                 int missing = 0;
-                C = new ArrayList<Object>(3);
+                C = new ArrayList<>(3);
                 v = new int[n][2];
                 C.add(i);//the first position of column variable C is the column index
@@ -133,5 +133,5 @@
         Iterator<List<Object>> l = L.listIterator();
         List<Object> C;
-        ArrayList<int[]> CandidateK = new ArrayList<int[]>(n*n); //saves the candidate K_{n-1} in entry-exit pairs
+        ArrayList<int[]> CandidateK = new ArrayList<>(n*n); //saves the candidate K_{n-1} in entry-exit pairs
         long lindex= 0;
         int h = 0;
@@ -229,5 +229,5 @@
             }
         }
-        jprepare.jPrepare(new ArrayList<Channel>(subgraph));
+        jprepare.jPrepare(new ArrayList<>(subgraph));
         JCheck jCheck = new JCheck();
         Check = jCheck.jCheck(jprepare.getEntries(), jprepare.getExits(), n);
@@ -253,5 +253,5 @@
                 }
                 if (isin == false) {
-                    junctions.add(new HashSet<Channel>(subgraph));
+                    junctions.add(new HashSet<>(subgraph));
                     //log.info("Kreuzungskandidat der Liste zugefügt" + junctions.size());
                 }
@@ -267,5 +267,5 @@
      */
     public ArrayList<Channel> getSubJunctionCandidate(){
-        return new ArrayList<Channel>(subgraph);
+        return new ArrayList<>(subgraph);
     }
 
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JPrepare.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JPrepare.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JPrepare.java	(revision 30737)
@@ -17,6 +17,6 @@
 
     public JPrepare(ChannelDiGraph digraph) {
-        entries = new ArrayList<Channel>();
-        exits = new ArrayList<Channel>();
+        entries = new ArrayList<>();
+        exits = new ArrayList<>();
         this.digraph = digraph;
     }
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JunctionChecker.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JunctionChecker.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JunctionChecker.java	(revision 30737)
@@ -33,5 +33,5 @@
     private JMinimality m;
     // Variable wird beim KreuzungsSuchen benutzt, sonst ist sie leer!
-    private ArrayList<HashSet<Channel>> junctions = new ArrayList<HashSet<Channel>>();
+    private ArrayList<HashSet<Channel>> junctions = new ArrayList<>();
     //dient zur Zeitmessung
     private long startIterate = 0;
@@ -44,5 +44,5 @@
         this.n = n;
         this.jCheck = new JCheck();
-        this.subjunction = new ArrayList<Channel>();
+        this.subjunction = new ArrayList<>();
         smallerJunction = false;
     }
@@ -138,5 +138,5 @@
 
     private void collectECandidates(ArrayList<Channel> subgraph) {
-        E = new ArrayList<Channel>();
+        E = new ArrayList<>();
         for (int i = 0; i < subgraph.size(); i++) {
             if ((subgraph.get(i).getIndegree() + subgraph.get(i).getOutdegree() >= 3)
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/TRDFS.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/TRDFS.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/TRDFS.java	(revision 30737)
@@ -26,5 +26,5 @@
         this.vertices = adnodes;
         this.digraph = digraph;
-        this.cycleEdges = new ArrayList<LeadsTo>();
+        this.cycleEdges = new ArrayList<>();
     }
 
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/ColorSchemeXMLReader.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/ColorSchemeXMLReader.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/ColorSchemeXMLReader.java	(revision 30737)
@@ -31,5 +31,5 @@
     @Override
     public void parseXML() {
-        colorScheme = new HashMap<String, Color>();
+        colorScheme = new HashMap<>();
         String tempValue;
         //String tempKeyValue ="";
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/OSMXMLReader.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/OSMXMLReader.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/OSMXMLReader.java	(revision 30737)
@@ -82,5 +82,5 @@
         OSMWay way = new OSMWay();
         OSMRelation relation = new OSMRelation();
-        HashMap<String, String> hashmap = new HashMap<String, String>();
+        HashMap<String, String> hashmap = new HashMap<>();
         try {
             while (parser.hasNext()) {
@@ -92,5 +92,5 @@
                     if (xmlelement.equals("node")) {
                         node = new OSMNode();
-                        hashmap = new HashMap<String, String>();
+                        hashmap = new HashMap<>();
                         readAttributes(node);
                         node.setLatitude(Double.parseDouble(parser
@@ -102,5 +102,5 @@
                     if (xmlelement.equals("way")) {
                         way = new OSMWay();
-                        hashmap = new HashMap<String, String>();
+                        hashmap = new HashMap<>();
                         readAttributes(way);
                     }
@@ -108,5 +108,5 @@
                     if (xmlelement.equals("relation")) {
                         relation = new OSMRelation();
-                        hashmap = new HashMap<String, String>();
+                        hashmap = new HashMap<>();
                         readAttributes(relation);
                     }
@@ -139,5 +139,5 @@
                     if (xmlelement.equals("relation")) {
                         relation = new OSMRelation();
-                        hashmap = new HashMap<String, String>();
+                        hashmap = new HashMap<>();
                         readAttributes(relation);
                     }
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLFilterReader.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLFilterReader.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLFilterReader.java	(revision 30737)
@@ -16,5 +16,5 @@
     public XMLFilterReader(String filename) {
         super(filename);
-        filters = new Vector<Filter>();
+        filters = new Vector<>();
     }
 
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java	(revision 30736)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java	(revision 30737)
@@ -24,5 +24,5 @@
     public RelationProducer(JunctionCheckerPlugin plugin) {
         this.plugin = plugin;
-        storedRelations = new HashSet<HashSet<Channel>>();
+        storedRelations = new HashSet<>();
     }
 
@@ -31,5 +31,5 @@
             return;
         }
-        LinkedList<OsmPrimitive> ways = new LinkedList<OsmPrimitive>();
+        LinkedList<OsmPrimitive> ways = new LinkedList<>();
         Iterator<Channel> cit = subset.iterator();
         while (cit.hasNext()) {
Index: applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/Lakewalker.java
===================================================================
--- applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/Lakewalker.java	(revision 30736)
+++ applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/Lakewalker.java	(revision 30737)
@@ -93,5 +93,5 @@
             Boolean detect_loop = false;
 
-            ArrayList<double[]> nodelist = new ArrayList<double[]>();
+            ArrayList<double[]> nodelist = new ArrayList<>();
 
             int[] xy = geo_to_xy(lat,lon,this.resolution);
@@ -255,5 +255,5 @@
 
         double[] test_v = nodes.get(0);
-        ArrayList<double[]> reducednodes = new ArrayList<double[]>();
+        ArrayList<double[]> reducednodes = new ArrayList<>();
 
         double prox_sq = Math.pow(proximity, 2);
@@ -362,5 +362,5 @@
         double[] last = nodes.get(nodes.size()-1);
 
-        ArrayList<double[]> new_nodes = new ArrayList<double[]>();
+        ArrayList<double[]> new_nodes = new ArrayList<>();
 
         double d = 0;
@@ -391,5 +391,5 @@
 
     private ArrayList<double[]> sublist(ArrayList<double[]> l, int i, int f) throws ArrayIndexOutOfBoundsException {
-        ArrayList<double[]> sub = new ArrayList<double[]>();
+        ArrayList<double[]> sub = new ArrayList<>();
 
         if(f<i || i < 0 || f < 0 || f > l.size()){
Index: applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java
===================================================================
--- applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java	(revision 30736)
+++ applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java	(revision 30737)
@@ -46,6 +46,6 @@
     protected boolean active = false;
 
-    protected Collection<Command> commands = new LinkedList<Command>();
-    protected Collection<Way> ways = new ArrayList<Way>();
+    protected Collection<Command> commands = new LinkedList<>();
+    protected Collection<Way> ways = new ArrayList<>();
 
     public LakewalkerAction(String name) {
@@ -170,5 +170,5 @@
         progressMonitor.beginTask(null, 3);
         try {
-            ArrayList<double[]> nodelist = new ArrayList<double[]>();
+            ArrayList<double[]> nodelist = new ArrayList<>();
 
             Lakewalker lw = new Lakewalker(waylen,maxnode,threshold,epsilon,resolution,tilesize,startdir,wmslayer,workingdir);
@@ -291,6 +291,6 @@
             }
 
-            commands = new LinkedList<Command>();
-            ways = new ArrayList<Way>();
+            commands = new LinkedList<>();
+            ways = new ArrayList<>();
         } finally {
             progressMonitor.finishTask();
Index: applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerWMS.java
===================================================================
--- applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerWMS.java	(revision 30736)
+++ applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerWMS.java	(revision 30737)
@@ -29,7 +29,7 @@
 
     // Vector to cache images in memory
-    private List<BufferedImage> images = new Vector<BufferedImage>();
+    private List<BufferedImage> images = new Vector<>();
     // Hashmap to hold the mapping of cached images
-    private Map<String,Integer> imageindex = new HashMap<String,Integer>();
+    private Map<String,Integer> imageindex = new HashMap<>();
 
     private int resolution;
Index: applications/editors/josm/plugins/livegps/src/livegps/AppendableGpxTrackSegment.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/AppendableGpxTrackSegment.java	(revision 30736)
+++ applications/editors/josm/plugins/livegps/src/livegps/AppendableGpxTrackSegment.java	(revision 30737)
@@ -26,5 +26,5 @@
     @Override
     public Collection<WayPoint> getWayPoints() {
-        return new CopyList<WayPoint>(wayPoints, size);
+        return new CopyList<>(wayPoints, size);
     }
 
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java	(revision 30736)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java	(revision 30737)
@@ -35,5 +35,5 @@
     private boolean JSONProtocol = true;
 
-    private final List<PropertyChangeListener> propertyChangeListener = new ArrayList<PropertyChangeListener>();
+    private final List<PropertyChangeListener> propertyChangeListener = new ArrayList<>();
     private PropertyChangeEvent lastStatusEvent;
     private PropertyChangeEvent lastDataEvent;
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java	(revision 30736)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java	(revision 30737)
@@ -56,5 +56,5 @@
         trackSegment = new AppendableGpxTrackSegment();
 
-        Map<String, Object> attr = new HashMap<String, Object>();
+        Map<String, Object> attr = new HashMap<>();
         attr.put("desc", "josm live gps");
 
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java	(revision 30737)
@@ -33,5 +33,5 @@
     private LiveGpsDialog lgpsdialog;
     /* List of foreign (e.g. other plugins) subscribers */
-    List<PropertyChangeListener> listenerQueue = new ArrayList<PropertyChangeListener>();
+    List<PropertyChangeListener> listenerQueue = new ArrayList<>();
 
     private GpxData data = new GpxData();
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 30737)
@@ -214,5 +214,5 @@
     public synchronized void changedData(MapdustBug mapdustBug) {
         if (mapdustBugList == null) {
-            mapdustBugList = new ArrayList<MapdustBug>();
+            mapdustBugList = new ArrayList<>();
         }
         if (getMapdustGUI().isDialogShowing()) {
@@ -554,5 +554,5 @@
             } catch (MapdustServiceHandlerException e) {
                 wasError = true;
-                mapdustBugList = new ArrayList<MapdustBug>();
+                mapdustBugList = new ArrayList<>();
             }
             /* update the view */
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustGUI.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustGUI.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustGUI.java	(revision 30737)
@@ -69,9 +69,9 @@
     /** The list of MapDust bug details observers */
     private final ArrayList<MapdustBugDetailsObserver> bugDetailsObservers =
-            new ArrayList<MapdustBugDetailsObserver>();
+            new ArrayList<>();
 
     /** The list of MapDust initial update observers */
     private final ArrayList<MapdustUpdateObserver> initialUpdateObservers =
-            new ArrayList<MapdustUpdateObserver>();
+            new ArrayList<>();
 
     /** The <code>MapdustPlugin</code> plug-in */
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteActionList.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteActionList.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteActionList.java	(revision 30737)
@@ -58,5 +58,5 @@
     /** List of MapdustRefreshObserver objects */
     private final ArrayList<MapdustUpdateObserver> observers =
-            new ArrayList<MapdustUpdateObserver>();
+            new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteAddBug.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteAddBug.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteAddBug.java	(revision 30737)
@@ -71,9 +71,9 @@
     /** The list of MapDust bug observers */
     private final ArrayList<MapdustBugObserver> bugObservers =
-            new ArrayList<MapdustBugObserver>();
+            new ArrayList<>();
 
     /** The list of MapDust action observers */
     private final ArrayList<MapdustActionObserver> actionObservers =
-            new ArrayList<MapdustActionObserver>();
+            new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCloseBug.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCloseBug.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCloseBug.java	(revision 30737)
@@ -67,9 +67,9 @@
     /** The list of Mapdust bug observers */
     private final ArrayList<MapdustBugObserver> bugObservers =
-            new ArrayList<MapdustBugObserver>();
+            new ArrayList<>();
 
     /** The list of Mapdust action observers */
     private final ArrayList<MapdustActionObserver> actionObservers =
-            new ArrayList<MapdustActionObserver>();
+            new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCommentBug.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCommentBug.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCommentBug.java	(revision 30737)
@@ -69,9 +69,9 @@
     /** The list of MapDust bug observers */
     private final ArrayList<MapdustBugObserver> bugObservers =
-            new ArrayList<MapdustBugObserver>();
+            new ArrayList<>();
 
     /** The list of mapdust action observers */
     private final ArrayList<MapdustActionObserver> actionObservers =
-            new ArrayList<MapdustActionObserver>();
+            new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteFilterBug.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteFilterBug.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteFilterBug.java	(revision 30737)
@@ -60,5 +60,5 @@
     /** The list MapDustBug filter observers */
     private final ArrayList<MapdustUpdateObserver> observers =
-            new ArrayList<MapdustUpdateObserver>();
+            new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteInvalidateBug.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteInvalidateBug.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteInvalidateBug.java	(revision 30737)
@@ -71,9 +71,9 @@
     /** The list of mapdust bug observers */
     private final ArrayList<MapdustBugObserver> bugObservers =
-            new ArrayList<MapdustBugObserver>();
+            new ArrayList<>();
 
     /** The list of mapdust action observers */
     private final ArrayList<MapdustActionObserver> actionObservers =
-            new ArrayList<MapdustActionObserver>();
+            new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteReOpenBug.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteReOpenBug.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteReOpenBug.java	(revision 30737)
@@ -71,9 +71,9 @@
     /** The list of MapDust bug observers */
     private final ArrayList<MapdustBugObserver> bugObservers =
-            new ArrayList<MapdustBugObserver>();
+            new ArrayList<>();
 
     /** The list of MapDust action observers */
     private final ArrayList<MapdustActionObserver> actionObservers =
-            new ArrayList<MapdustActionObserver>();
+            new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteRefresh.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteRefresh.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteRefresh.java	(revision 30737)
@@ -55,5 +55,5 @@
     /** The list of MapDust refresh observers */
     private final ArrayList<MapdustUpdateObserver> observers =
-            new ArrayList<MapdustUpdateObserver>();
+            new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteWorkOffline.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteWorkOffline.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteWorkOffline.java	(revision 30737)
@@ -63,5 +63,5 @@
     /** The list of MapDust refresh observers */
     private final ArrayList<MapdustUpdateObserver> observers =
-            new ArrayList<MapdustUpdateObserver>();
+            new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/FilterBugDialog.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/FilterBugDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/FilterBugDialog.java	(revision 30737)
@@ -335,5 +335,5 @@
      */
     public List<Integer> getCheckedStatuses() {
-        List<Integer> statusList = new ArrayList<Integer>();
+        List<Integer> statusList = new ArrayList<>();
         for (FilterCheckBox filter : filterStatuses) {
             if (filter.getChbFilter().isSelected()) {
@@ -351,5 +351,5 @@
      */
     public List<String> getCheckedTypes() {
-        List<String> typeList = new ArrayList<String>();
+        List<String> typeList = new ArrayList<>();
         for (FilterCheckBox filter : filterTypes) {
             if (filter.getChbFilter().isSelected()) {
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugListPanel.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugListPanel.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugListPanel.java	(revision 30737)
@@ -73,5 +73,5 @@
     /** The list of observers */
     private final ArrayList<MapdustBugDetailsObserver> observers =
-            new ArrayList<MapdustBugDetailsObserver>();
+            new ArrayList<>();
 
     /** The list of <code>MapdustBug</code> objects */
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/RelevanceSlider.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/RelevanceSlider.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/RelevanceSlider.java	(revision 30737)
@@ -91,5 +91,5 @@
         setFocusable(false);
         /* set label for the slider values */
-        Dictionary<Integer, JLabel> values = new Hashtable<Integer, JLabel>();
+        Dictionary<Integer, JLabel> values = new Hashtable<>();
         Font font = new Font("Times New Roman", Font.BOLD, 12);
         values.put(MapdustRelevanceValue.LOW.getSliderValue(), ComponentUtil
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustRelevanceValue.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustRelevanceValue.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustRelevanceValue.java	(revision 30737)
@@ -95,5 +95,5 @@
         if (MapdustRelevanceValue.map == null) {
             MapdustRelevanceValue.map =
-                    new HashMap<MapdustRelevance, Integer>();
+                    new HashMap<>();
         }
         MapdustRelevanceValue.map.put(relevance, sliderValue);
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustConverter.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustConverter.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustConverter.java	(revision 30737)
@@ -135,5 +135,5 @@
     static List<MapdustBug> buildMapdustBugList(
             MapdustGetBugsResponse bugsResponse) {
-        List<MapdustBug> bugsList = new ArrayList<MapdustBug>();
+        List<MapdustBug> bugsList = new ArrayList<>();
         if (bugsResponse != null) {
             MapdustBugContent[] bugContent = bugsResponse.getFeatures();
@@ -251,5 +251,5 @@
     private static MapdustComment[] buildMapdustCommentArray(Long bugId,
             MapdustCommentProperties[] commentProperties) {
-        List<MapdustComment> commentList = new ArrayList<MapdustComment>();
+        List<MapdustComment> commentList = new ArrayList<>();
         if (bugId != null) {
             if (commentProperties != null) {
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/MapdustConnector.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/MapdustConnector.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/MapdustConnector.java	(revision 30737)
@@ -372,5 +372,5 @@
         String mapdustApiKey = Configuration.getInstance().getMapdustKey();
         String urlString = null;
-        Map<String, String> requestParameters = new HashMap<String, String>();
+        Map<String, String> requestParameters = new HashMap<>();
         if (mapdustUri != null && mapdustApiKey != null) {
             urlString = mapdustUri;
@@ -409,5 +409,5 @@
         String mapdustApiKey = Configuration.getInstance().getMapdustKey();
         String urlString = null;
-        Map<String, String> requestParameters = new HashMap<String, String>();
+        Map<String, String> requestParameters = new HashMap<>();
         if (mapdustUri != null && mapdustApiKey != null) {
             urlString = mapdustUri;
@@ -445,5 +445,5 @@
         String mapdustApiKey = Configuration.getInstance().getMapdustKey();
         String urlString = null;
-        Map<String, String> requestParameters = new HashMap<String, String>();
+        Map<String, String> requestParameters = new HashMap<>();
         if (mapdustUri != null && mapdustApiKey != null) {
             urlString = mapdustUri;
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/BugType.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/BugType.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/BugType.java	(revision 30737)
@@ -69,5 +69,5 @@
         this.value = value;
         if (BugType.table == null) {
-            BugType.table = new HashMap<String, BugType>();
+            BugType.table = new HashMap<>();
         }
         BugType.table.put(key, this);
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustRelevance.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustRelevance.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustRelevance.java	(revision 30737)
@@ -96,5 +96,5 @@
         if (MapdustRelevance.map == null) {
             MapdustRelevance.map =
-                    new HashMap<RelevanceRange, MapdustRelevance>();
+                    new HashMap<>();
         }
         MapdustRelevance.map.put(range, this);
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/RelevanceRange.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/RelevanceRange.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/RelevanceRange.java	(revision 30737)
@@ -92,5 +92,5 @@
         this.upperValue = upperValue;
         if (set == null) {
-            set = new HashSet<RelevanceRange>();
+            set = new HashSet<>();
         }
         set.add(this);
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/Status.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/Status.java	(revision 30736)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/Status.java	(revision 30737)
@@ -67,5 +67,5 @@
         this.value = value;
         if (Status.table == null) {
-            Status.table = new HashMap<Integer, Status>();
+            Status.table = new HashMap<>();
         }
         Status.table.put(key, this);
Index: applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementDialog.java
===================================================================
--- applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementDialog.java	(revision 30737)
@@ -32,6 +32,6 @@
 import org.openstreetmap.josm.data.osm.event.WayNodesChangedEvent;
 import org.openstreetmap.josm.gui.NavigatableComponent;
+import org.openstreetmap.josm.gui.NavigatableComponent.SoMChangeListener;
 import org.openstreetmap.josm.gui.SideButton;
-import org.openstreetmap.josm.gui.NavigatableComponent.SoMChangeListener;
 import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
 import org.openstreetmap.josm.gui.help.HelpUtil;
@@ -73,10 +73,10 @@
      */
     protected JLabel segAngleLabel;
-    
+
     private DataSet ds;
 
     private Collection<Way> ways;
     private Collection<Node> nodes;
-    
+
     /**
      * Constructor
@@ -131,5 +131,5 @@
             resetButton
         }));
-        
+
         DataSet.addSelectionListener(this);
         NavigatableComponent.addSoMChangeListener(this);
@@ -162,7 +162,7 @@
         Node lastNode = null;
         // Don't mix up way and nodes computation (fix #6872). Priority given to ways
-        ways = new SubclassFilteredCollection<OsmPrimitive, Way>(newSelection, OsmPrimitive.wayPredicate);
+        ways = new SubclassFilteredCollection<>(newSelection, OsmPrimitive.wayPredicate);
         if (ways.isEmpty()) {
-            nodes = new SubclassFilteredCollection<OsmPrimitive, Node>(newSelection, OsmPrimitive.nodePredicate);
+            nodes = new SubclassFilteredCollection<>(newSelection, OsmPrimitive.nodePredicate);
             for (Node n : nodes) {
                 if (n.getCoor() != null) {
@@ -198,9 +198,9 @@
             }
         }
-        
+
         final String lengthLabel = getDistText(length);
         final String angleLabel = getAngleText(segAngle);
         final String areaLabel = getAreaText(area);
-        
+
         GuiHelper.runInEDT(new Runnable() {
             @Override
@@ -211,7 +211,7 @@
             }
         });
-        
+
         DataSet currentDs = Main.main.getCurrentDataSet();
-    
+
         if (ds != currentDs) {
             if (ds != null) {
@@ -246,5 +246,5 @@
         return false;
     }
-    
+
     @Override public void nodeMoved(NodeMovedEvent event) {
         Node n = event.getNode();
Index: applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java
===================================================================
--- applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java	(revision 30736)
+++ applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java	(revision 30737)
@@ -52,5 +52,5 @@
 
     private static Icon icon = new ImageIcon(Toolkit.getDefaultToolkit().createImage(MeasurementPlugin.class.getResource("/images/measurement.png")));
-    private Collection<WayPoint> points = new ArrayList<WayPoint>(32);
+    private Collection<WayPoint> points = new ArrayList<>(32);
 
     @Override
@@ -146,5 +146,5 @@
             last = p;
         }
-        if (MeasurementPlugin.measurementDialog != null) { 
+        if (MeasurementPlugin.measurementDialog != null) {
             MeasurementPlugin.measurementDialog.pathLengthLabel.setText(NavigatableComponent.getDistText(pathLength));
         }
@@ -153,5 +153,5 @@
         }
     }
-    
+
     /*
      * Use an equal area sinusoidal projection to improve accuracy and so we can still use normal polygon area calculation
@@ -222,5 +222,5 @@
          */
         private DefaultListModel<GpxLayer> model = new DefaultListModel<>();
-    
+
         /**
          * @param layer the targeting measurement layer
@@ -229,5 +229,5 @@
             super(tr("Import path from GPX layer"), ImageProvider.get("dialogs", "edit")); // TODO: find better image
         }
-    
+
         @Override
         public void actionPerformed(ActionEvent e) {
@@ -237,5 +237,5 @@
             Layer lastLayer = null;
             int layerCnt = 0;
-    
+
             for (Layer l : data) {
                 if (l instanceof GpxLayer) {
@@ -261,10 +261,10 @@
                     }
                 });
-    
+
                 JCheckBox dropFirst = new JCheckBox(tr("Drop existing path"));
-    
+
                 panel.add(layerList);
                 panel.add(dropFirst);
-    
+
                 final JOptionPane optionPane = new JOptionPane(panel, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION){
                         @Override
@@ -275,5 +275,5 @@
                 final JDialog dlg = optionPane.createDialog(Main.parent, tr("Import path from GPX layer"));
                 dlg.setVisible(true);
-    
+
                 Object answer = optionPane.getValue();
                 if (answer == null || answer == JOptionPane.UNINITIALIZED_VALUE ||
@@ -281,8 +281,8 @@
                     return;
                 }
-    
-                GpxLayer gpx = (GpxLayer)layerList.getSelectedValue();
+
+                GpxLayer gpx = layerList.getSelectedValue();
                 if (dropFirst.isSelected()) {
-                    points = new ArrayList<WayPoint>(32);
+                    points = new ArrayList<>(32);
                 }
 
Index: applications/editors/josm/plugins/michigan_left/src/MichiganLeft/MichiganLeft.java
===================================================================
--- applications/editors/josm/plugins/michigan_left/src/MichiganLeft/MichiganLeft.java	(revision 30736)
+++ applications/editors/josm/plugins/michigan_left/src/MichiganLeft/MichiganLeft.java	(revision 30737)
@@ -42,5 +42,5 @@
          */
     private static final long serialVersionUID = 1L;
-    private LinkedList<Command> cmds = new LinkedList<Command>();
+    private LinkedList<Command> cmds = new LinkedList<>();
 
     public MichiganLeftAction() {
@@ -56,5 +56,5 @@
           .getSelected();
 
-      ArrayList<OsmPrimitive> selection = new ArrayList<OsmPrimitive>();
+      ArrayList<OsmPrimitive> selection = new ArrayList<>();
 
       for (OsmPrimitive prim: mainSelection) selection.add(prim);
@@ -74,5 +74,5 @@
       if (ways == 4) {
         // Find extremities of ways
-        Hashtable<Node, Integer> ExtremNodes = new Hashtable<Node, Integer>();
+        Hashtable<Node, Integer> ExtremNodes = new Hashtable<>();
         for (OsmPrimitive prim : selection) {
           if (prim instanceof Way) {
@@ -90,5 +90,5 @@
 
         // order the ways
-        ArrayList<Way> orderedWays = new ArrayList<Way>();
+        ArrayList<Way> orderedWays = new ArrayList<>();
         Way currentWay = (Way) selection.iterator().next();
         orderedWays.add((Way) currentWay);
@@ -130,5 +130,5 @@
       if (ways == 5) {
         // Find extremities of ways
-        Hashtable<Node, Integer> ExtremNodes = new Hashtable<Node, Integer>();
+        Hashtable<Node, Integer> ExtremNodes = new Hashtable<>();
         for (OsmPrimitive prim : selection) {
           if (prim instanceof Way) {
@@ -140,5 +140,5 @@
         // System.out.println(tr("{0} extrem nodes.", ExtremNodes.size()));
 
-        ArrayList<Node> viaNodes = new ArrayList<Node>();
+        ArrayList<Node> viaNodes = new ArrayList<>();
         // find via nodes (they have 3 occurences in the list)
         for (Enumeration<Node> enumKey = ExtremNodes.keys(); enumKey
Index: applications/editors/josm/plugins/mirrored_download/src/mirrored_download/UrlSelectionDialog.java
===================================================================
--- applications/editors/josm/plugins/mirrored_download/src/mirrored_download/UrlSelectionDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/mirrored_download/src/mirrored_download/UrlSelectionDialog.java	(revision 30737)
@@ -104,5 +104,5 @@
     // List can be edited at https://josm.openstreetmap.de/wiki/MirroredDownloadInfo
     String src = Main.pref.get("plugin.mirrored_download.url-src", "https://josm.openstreetmap.de/mirrored_download_info");
-    Collection<String> urls = new ArrayList<String>();
+    Collection<String> urls = new ArrayList<>();
     try (
       InputStream in = new CachedFile(src).setMaxAge(24*60*60).getInputStream();
Index: applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/countryData/CountryDataMemory.java
===================================================================
--- applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/countryData/CountryDataMemory.java	(revision 30736)
+++ applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/countryData/CountryDataMemory.java	(revision 30737)
@@ -10,5 +10,5 @@
     public static void instantiateCountryCache() {
         if (countryCache == null) {
-            countryCache = new HashMap<String, Country>();
+            countryCache = new HashMap<>();
         }
     }
Index: applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/dialog/NameManagerDialog.java
===================================================================
--- applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/dialog/NameManagerDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/dialog/NameManagerDialog.java	(revision 30737)
@@ -244,5 +244,5 @@
     public void setCountryComboBox() {
         Set<String> keySetUnsorted = CountryDataMemory.getCountryCache().keySet();
-        List<String> keySet = new ArrayList<String>(keySetUnsorted);
+        List<String> keySet = new ArrayList<>(keySetUnsorted);
         Collections.sort(keySet);
         country.removeAllItems();
Index: applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/utils/NameManagerUtils.java
===================================================================
--- applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/utils/NameManagerUtils.java	(revision 30736)
+++ applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/utils/NameManagerUtils.java	(revision 30737)
@@ -43,5 +43,5 @@
 
     public static List<Way> getWaysInsideSelectedArea(Way areaBorder) {
-        List<Way> waysInsideSelectedArea = new ArrayList<Way>();
+        List<Way> waysInsideSelectedArea = new ArrayList<>();
         if (areaBorder != null) {
             Coordinate topLeftCorner = getTopLeftCorener(areaBorder);
Index: applications/editors/josm/plugins/native-password-manager/src/org/netbeans/modules/keyring/fallback/FallbackProvider.java
===================================================================
--- applications/editors/josm/plugins/native-password-manager/src/org/netbeans/modules/keyring/fallback/FallbackProvider.java	(revision 30736)
+++ applications/editors/josm/plugins/native-password-manager/src/org/netbeans/modules/keyring/fallback/FallbackProvider.java	(revision 30737)
@@ -46,5 +46,4 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
-import org.netbeans.modules.keyring.impl.Utils;
 import org.netbeans.modules.keyring.spi.EncryptionProvider;
 import org.netbeans.spi.keyring.KeyringProvider;
Index: applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/InitializationWizard.java
===================================================================
--- applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/InitializationWizard.java	(revision 30736)
+++ applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/InitializationWizard.java	(revision 30737)
@@ -61,5 +61,5 @@
     protected JPanel cardPanel;
     
-    List<WizardPanel> panels = new ArrayList<WizardPanel>();
+    List<WizardPanel> panels = new ArrayList<>();
     int panelIndex;
     
Index: applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/NPMCredentialsAgent.java
===================================================================
--- applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/NPMCredentialsAgent.java	(revision 30736)
+++ applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/NPMCredentialsAgent.java	(revision 30737)
@@ -38,5 +38,5 @@
      * In contrast, this cache avoids read request the backend in general.
      */
-    private Map<RequestorType, PasswordAuthentication> credentialsCache = new HashMap<RequestorType, PasswordAuthentication>();
+    private Map<RequestorType, PasswordAuthentication> credentialsCache = new HashMap<>();
     private OAuthToken oauthCache;
     
@@ -222,5 +222,5 @@
                     + tr("The username and password is protected by {0}.", type.getName())
         );
-        List<String> sensitive = new ArrayList<String>();
+        List<String> sensitive = new ArrayList<>();
         if (Main.pref.get("osm-server.username", null) != null) {
             sensitive.add(tr("username"));
Index: applications/editors/josm/plugins/opendata/includes/org/apache/commons/collections/iterators/AbstractEmptyIterator.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/commons/collections/iterators/AbstractEmptyIterator.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/commons/collections/iterators/AbstractEmptyIterator.java	(revision 30737)
@@ -21,14 +21,14 @@
 import org.apache.commons.collections.ResettableIterator;
 
-/** 
+/**
  * Provides an implementation of an empty iterator.
  *
  * @since Commons Collections 3.1
  * @version $Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (jeu., 10 avr. 2008) $
- * 
+ *
  * @author Stephen Colebourne
  */
 abstract class AbstractEmptyIterator implements ResettableIterator {
- 
+
     /**
      * Constructor.
@@ -38,8 +38,10 @@
     }
 
+    @Override
     public boolean hasNext() {
         return false;
     }
 
+    @Override
     public Object next() {
         throw new NoSuchElementException("Iterator contains no elements");
@@ -62,14 +64,13 @@
     }
 
-    @SuppressWarnings("unused")
-	public void add(Object obj) {
+    public void add(Object obj) {
         throw new UnsupportedOperationException("add() not supported for empty Iterator");
     }
 
-    @SuppressWarnings("unused")
-	public void set(Object obj) {
+    public void set(Object obj) {
         throw new IllegalStateException("Iterator contains no elements");
     }
 
+    @Override
     public void remove() {
         throw new IllegalStateException("Iterator contains no elements");
@@ -84,6 +85,5 @@
     }
 
-    @SuppressWarnings("unused")
-	public Object setValue(Object value) {
+    public Object setValue(Object value) {
         throw new IllegalStateException("Iterator contains no elements");
     }
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/MutablePropertySet.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/MutablePropertySet.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/MutablePropertySet.java	(revision 30737)
@@ -68,5 +68,5 @@
         /* Initialize the sections. Since property set must have at least
          * one section it is added right here. */
-        sections = new LinkedList<Section>();
+        sections = new LinkedList<>();
         sections.add(new MutableSection());
     }
@@ -90,5 +90,5 @@
         clearSections();
         if (sections == null)
-            sections = new LinkedList<Section>();
+            sections = new LinkedList<>();
         for (final Iterator<Section> i = ps.getSections().iterator(); i.hasNext();)
         {
@@ -182,5 +182,5 @@
     {
         if (sections == null)
-            sections = new LinkedList<Section>();
+            sections = new LinkedList<>();
         sections.add(section);
     }
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/MutableSection.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/MutableSection.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/MutableSection.java	(revision 30737)
@@ -74,5 +74,5 @@
         formatID = null;
         offset = -1;
-        preprops = new LinkedList<Property>();
+        preprops = new LinkedList<>();
     }
 
@@ -124,5 +124,5 @@
     {
         this.properties = properties;
-        preprops = new LinkedList<Property>();
+        preprops = new LinkedList<>();
         for (int i = 0; i < properties.length; i++)
             preprops.add(properties[i]);
@@ -200,4 +200,5 @@
      * @return the section's size.
      */
+    @Override
     public int getSize()
     {
@@ -315,4 +316,5 @@
         Collections.sort(preprops, new Comparator<Property>()
             {
+                @Override
                 public int compare(final Property p1, final Property p2)
                 {
@@ -453,4 +455,5 @@
      * @return The number of properties in this section
      */
+    @Override
     public int getPropertyCount()
     {
@@ -465,4 +468,5 @@
      * @return this section's properties.
      */
+    @Override
     public Property[] getProperties()
     {
@@ -479,4 +483,5 @@
      * @return The property or <code>null</code> if there is no such property
      */
+    @Override
     public Object getProperty(final long id)
     {
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/Property.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/Property.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/Property.java	(revision 30737)
@@ -211,5 +211,5 @@
         o += LittleEndian.INT_SIZE;
 
-        final Map<Long, String> m = new HashMap<Long, String>((int) nrEntries, (float) 1.0);
+        final Map<Long, String> m = new HashMap<>((int) nrEntries, (float) 1.0);
 
         try
@@ -298,4 +298,5 @@
      * @see Object#equals(java.lang.Object)
      */
+    @Override
     public boolean equals(final Object o)
     {
@@ -343,4 +344,5 @@
      * @see Object#hashCode()
      */
+    @Override
     public int hashCode()
     {
@@ -360,4 +362,5 @@
      * @see Object#toString()
      */
+    @Override
     public String toString()
     {
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/PropertySet.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/PropertySet.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/PropertySet.java	(revision 30737)
@@ -383,5 +383,5 @@
          * exception and is no longer fostered by Microsoft.
          */
-        sections = new ArrayList<Section>(sectionCount);
+        sections = new ArrayList<>(sectionCount);
 
         /*
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/Section.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/Section.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/Section.java	(revision 30737)
@@ -209,5 +209,5 @@
         /* Pass 1: Read the property list. */
         int pass1Offset = o1;
-        final List<PropertyListEntry> propertyList = new ArrayList<PropertyListEntry>(propertyCount);
+        final List<PropertyListEntry> propertyList = new ArrayList<>(propertyCount);
         PropertyListEntry ple;
         for (int i = 0; i < properties.length; i++)
@@ -308,4 +308,5 @@
          * @see Comparable#compareTo(java.lang.Object)
          */
+        @Override
         public int compareTo(final PropertyListEntry o)
         {
@@ -319,4 +320,5 @@
         }
 
+        @Override
         public String toString()
         {
@@ -457,4 +459,5 @@
      * not
      */
+    @Override
     public boolean equals(final Object o)
     {
@@ -550,4 +553,5 @@
      * @see Object#hashCode()
      */
+    @Override
     public int hashCode()
     {
@@ -566,4 +570,5 @@
      * @see Object#toString()
      */
+    @Override
     public String toString()
     {
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/Variant.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/Variant.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/Variant.java	(revision 30737)
@@ -136,5 +136,5 @@
     {
         /* Initialize the number-to-name map: */
-        Map<Long, Object> tm1 = new HashMap<Long, Object>();
+        Map<Long, Object> tm1 = new HashMap<>();
         tm1.put(Long.valueOf(0), "VT_EMPTY");
         tm1.put(Long.valueOf(1), "VT_NULL");
@@ -177,5 +177,5 @@
         tm1.put(Long.valueOf(71), "VT_CF");
         tm1.put(Long.valueOf(72), "VT_CLSID");
-        Map<Long, Object> tm2 = new HashMap<Long, Object>(tm1.size(), 1.0F);
+        Map<Long, Object> tm2 = new HashMap<>(tm1.size(), 1.0F);
         tm2.putAll(tm1);
         numberToName = Collections.unmodifiableMap(tm2);
@@ -223,5 +223,5 @@
         tm1.put(Long.valueOf(71), LENGTH_UNKNOWN);
         tm1.put(Long.valueOf(72), LENGTH_UNKNOWN);
-        tm2 = new HashMap<Long, Object>(tm1.size(), 1.0F);
+        tm2 = new HashMap<>(tm1.size(), 1.0F);
         tm2.putAll(tm1);
     }
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/VariantSupport.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/VariantSupport.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/VariantSupport.java	(revision 30737)
@@ -87,5 +87,5 @@
         {
             if (unsupportedMessage == null)
-                unsupportedMessage = new LinkedList<Long>();
+                unsupportedMessage = new LinkedList<>();
             Long vt = Long.valueOf(ex.getVariantType());
             if (!unsupportedMessage.contains(vt))
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/InternalSheet.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/InternalSheet.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/InternalSheet.java	(revision 30737)
@@ -119,5 +119,5 @@
         RowRecordsAggregate rra = null;
 
-        List<RecordBase> records = new ArrayList<RecordBase>(128);
+        List<RecordBase> records = new ArrayList<>(128);
         _records = records; // needed here due to calls to findFirstRecordLocBySid before we're done
         int dimsloc = -1;
@@ -254,5 +254,5 @@
     private InternalSheet() {
         _mergedCellsTable = new MergedCellsTable();
-        List<RecordBase> records = new ArrayList<RecordBase>(32);
+        List<RecordBase> records = new ArrayList<>(32);
 
         if (log.check( POILogger.DEBUG ))
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/InternalWorkbook.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/InternalWorkbook.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/InternalWorkbook.java	(revision 30737)
@@ -112,11 +112,11 @@
     	records     = new WorkbookRecordList();
 
-		boundsheets = new ArrayList<BoundSheetRecord>();
-		formats = new ArrayList<FormatRecord>();
-		hyperlinks = new ArrayList<HyperlinkRecord>();
+		boundsheets = new ArrayList<>();
+		formats = new ArrayList<>();
+		hyperlinks = new ArrayList<>();
 		numxfs = 0;
 		maxformatid = -1;
 		uses1904datewindowing = false;
-		commentRecords = new LinkedHashMap<String, NameCommentRecord>();
+		commentRecords = new LinkedHashMap<>();
     }
 
@@ -138,5 +138,5 @@
                     Integer.valueOf(recs.size()));
         InternalWorkbook retval = new InternalWorkbook();
-        List<Record> records = new ArrayList<Record>(recs.size() / 3);
+        List<Record> records = new ArrayList<>(recs.size() / 3);
         retval.records.setRecords(records);
 
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/LinkTable.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/LinkTable.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/LinkTable.java	(revision 30737)
@@ -90,5 +90,5 @@
 		public ExternalBookBlock(RecordStream rs) {
 			_externalBookRecord = (SupBookRecord) rs.getNext();
-			List<Object> temp = new ArrayList<Object>();
+			List<Object> temp = new ArrayList<>();
 			while(rs.peekNextClass() == ExternalNameRecord.class) {
 			   temp.add(rs.getNext());
@@ -127,5 +127,5 @@
 		RecordStream rs = new RecordStream(inputList, startIndex);
 
-		List<ExternalBookBlock> temp = new ArrayList<ExternalBookBlock>();
+		List<ExternalBookBlock> temp = new ArrayList<>();
 		while(rs.peekNextClass() == SupBookRecord.class) {
 		   temp.add(new ExternalBookBlock(rs));
@@ -148,5 +148,5 @@
 		}
 
-		_definedNames = new ArrayList<NameRecord>();
+		_definedNames = new ArrayList<>();
 		// collect zero or more DEFINEDNAMEs id=0x18,
 		//  with their comments if present
@@ -171,5 +171,5 @@
 
 	private static ExternSheetRecord readExtSheetRecord(RecordStream rs) {
-		List<ExternSheetRecord> temp = new ArrayList<ExternSheetRecord>(2);
+		List<ExternSheetRecord> temp = new ArrayList<>(2);
 		while(rs.peekNextClass() == ExternSheetRecord.class) {
 			temp.add((ExternSheetRecord) rs.getNext());
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/RowBlocksReader.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/RowBlocksReader.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/RowBlocksReader.java	(revision 30737)
@@ -48,10 +48,10 @@
 	 */
 	public RowBlocksReader(RecordStream rs) {
-		List<Record> plainRecords = new ArrayList<Record>();
-		List<Record> shFrmRecords = new ArrayList<Record>();
-		List<CellReference> firstCellRefs = new ArrayList<CellReference>();
-		List<Record> arrayRecords = new ArrayList<Record>();
-		List<Record> tableRecords = new ArrayList<Record>();
-		List<Record> mergeCellRecords = new ArrayList<Record>();
+		List<Record> plainRecords = new ArrayList<>();
+		List<Record> shFrmRecords = new ArrayList<>();
+		List<CellReference> firstCellRefs = new ArrayList<>();
+		List<Record> arrayRecords = new ArrayList<>();
+		List<Record> tableRecords = new ArrayList<>();
+		List<Record> mergeCellRecords = new ArrayList<>();
 
 		Record prevRec = null;
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/WorkbookRecordList.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/WorkbookRecordList.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/WorkbookRecordList.java	(revision 30737)
@@ -25,5 +25,5 @@
 
 public final class WorkbookRecordList implements Iterable<Record> {
-    private List<Record> records = new ArrayList<Record>();
+    private List<Record> records = new ArrayList<>();
 
 	private int  protpos	 = 0;   // holds the position of the protect record.
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/ExternSheetRecord.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/ExternSheetRecord.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/ExternSheetRecord.java	(revision 30737)
@@ -81,9 +81,9 @@
 	
 	public ExternSheetRecord() {
-		_list = new ArrayList<RefSubRecord>();
+		_list = new ArrayList<>();
 	}
 
 	public ExternSheetRecord(RecordInputStream in) { // NO_UCD
-		_list = new ArrayList<RefSubRecord>();
+		_list = new ArrayList<>();
 		
 		int nItems  = in.readShort();
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/ObjRecord.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/ObjRecord.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/ObjRecord.java	(revision 30737)
@@ -53,5 +53,5 @@
 
 	public ObjRecord() {
-		subrecords = new ArrayList<SubRecord>(2);
+		subrecords = new ArrayList<>(2);
 		// TODO - ensure 2 sub-records (ftCmo 15h, and ftEnd 00h) are always created
 		_uninterpretedData = null;
@@ -88,5 +88,5 @@
         */
 
-		subrecords = new ArrayList<SubRecord>();
+		subrecords = new ArrayList<>();
 		ByteArrayInputStream bais = new ByteArrayInputStream(subRecordData);
 		LittleEndianInputStream subRecStream = new LittleEndianInputStream(bais);
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/PageBreakRecord.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/PageBreakRecord.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/PageBreakRecord.java	(revision 30737)
@@ -76,6 +76,6 @@
 
     protected PageBreakRecord() {
-        _breaks = new ArrayList<Break>();
-        _breakMap = new HashMap<Integer, Break>();
+        _breaks = new ArrayList<>();
+        _breakMap = new HashMap<>();
     }
 
@@ -83,6 +83,6 @@
     {
         int nBreaks = in.readShort();
-        _breaks = new ArrayList<Break>(nBreaks + 2);
-        _breakMap = new HashMap<Integer, Break>();
+        _breaks = new ArrayList<>(nBreaks + 2);
+        _breakMap = new HashMap<>();
 
         for(int k = 0; k < nBreaks; k++) {
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/RecordFactory.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/RecordFactory.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/RecordFactory.java	(revision 30737)
@@ -245,6 +245,6 @@
 	 */
 	private static Map<Integer, I_RecordCreator> recordsToMap(Class<? extends Record> [] records) {
-		Map<Integer, I_RecordCreator> result = new HashMap<Integer, I_RecordCreator>();
-		Set<Class<?>> uniqueRecClasses = new HashSet<Class<?>>(records.length * 3 / 2);
+		Map<Integer, I_RecordCreator> result = new HashMap<>();
+		Set<Class<?>> uniqueRecClasses = new HashSet<>(records.length * 3 / 2);
 
 		for (int i = 0; i < records.length; i++) {
@@ -306,5 +306,5 @@
 	public static List<Record> createRecords(InputStream in) throws RecordFormatException {
 
-		List<Record> records = new ArrayList<Record>(NUM_RECORDS);
+		List<Record> records = new ArrayList<>(NUM_RECORDS);
 
 		RecordFactoryInputStream recStream = new RecordFactoryInputStream(in, true);
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/RecordFactoryInputStream.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/RecordFactoryInputStream.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/RecordFactoryInputStream.java	(revision 30737)
@@ -125,5 +125,5 @@
 	public RecordFactoryInputStream(InputStream in, boolean shouldIncludeContinueRecords) {
 		RecordInputStream rs = new RecordInputStream(in);
-		List<Record> records = new ArrayList<Record>();
+		List<Record> records = new ArrayList<>();
 		StreamEncryptionInfo sei = new StreamEncryptionInfo(rs, records);
 
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/SSTRecord.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/SSTRecord.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/SSTRecord.java	(revision 30737)
@@ -56,5 +56,5 @@
         field_1_num_strings = 0;
         field_2_num_unique_strings = 0;
-        field_3_strings = new IntMapper<UnicodeString>();
+        field_3_strings = new IntMapper<>();
     }
 
@@ -227,5 +227,5 @@
         field_1_num_strings = in.readInt();
         field_2_num_unique_strings = in.readInt();
-        field_3_strings = new IntMapper<UnicodeString>();
+        field_3_strings = new IntMapper<>();
         deserializer = new SSTDeserializer(field_3_strings);
         deserializer.manufactureStrings( field_2_num_unique_strings, in );
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/ColumnInfoRecordsAggregate.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/ColumnInfoRecordsAggregate.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/ColumnInfoRecordsAggregate.java	(revision 30737)
@@ -53,5 +53,5 @@
 	 */
 	public ColumnInfoRecordsAggregate() {
-		records = new ArrayList<ColumnInfoRecord>();
+		records = new ArrayList<>();
 	}
 	public ColumnInfoRecordsAggregate(RecordStream rs) {
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/DataValidityTable.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/DataValidityTable.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/DataValidityTable.java	(revision 30737)
@@ -42,5 +42,5 @@
 	public DataValidityTable(RecordStream rs) {
 		_headerRec = (DVALRecord) rs.getNext();
-		List<Record> temp = new ArrayList<Record>();
+		List<Record> temp = new ArrayList<>();
 		while (rs.peekNextClass() == DVRecord.class) {
 			temp.add(rs.getNext());
@@ -51,5 +51,5 @@
 	public DataValidityTable() {
 		_headerRec = new DVALRecord();
-		_validationList = new ArrayList<Record>();
+		_validationList = new ArrayList<>();
 	}
 
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/MergedCellsTable.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/MergedCellsTable.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/MergedCellsTable.java	(revision 30737)
@@ -39,5 +39,5 @@
 	 */
 	public MergedCellsTable() {
-		_mergedRegions = new ArrayList<CellRangeAddress>();
+		_mergedRegions = new ArrayList<>();
 	}
 
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java	(revision 30737)
@@ -61,7 +61,7 @@
 			throw new IllegalArgumentException("SharedValueManager must be provided.");
 		}
-		_rowRecords = new TreeMap<Integer, RowRecord>();
+		_rowRecords = new TreeMap<>();
 		_valuesAgg = new ValueRecordsAggregate();
-		_unknownRecords = new ArrayList<Record>();
+		_unknownRecords = new ArrayList<>();
 		_sharedValueManager = svm;
 	}
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/SharedValueManager.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/SharedValueManager.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/SharedValueManager.java	(revision 30737)
@@ -135,5 +135,5 @@
 		_arrayRecords = toList(arrayRecords);
 		_tableRecords = tableRecords;
-		Map<SharedFormulaRecord, SharedFormulaGroup> m = new HashMap<SharedFormulaRecord, SharedFormulaGroup>(nShF * 3 / 2);
+		Map<SharedFormulaRecord, SharedFormulaGroup> m = new HashMap<>(nShF * 3 / 2);
 		for (int i = 0; i < nShF; i++) {
 			SharedFormulaRecord sfr = sharedFormulaRecords[i];
@@ -147,5 +147,5 @@
 	 */
 	private static <Z> List<Z> toList(Z[] zz) {
-		List<Z> result = new ArrayList<Z>(zz.length);
+		List<Z> result = new ArrayList<>(zz.length);
 		for (int i = 0; i < zz.length; i++) {
 			result.add(zz[i]);
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java	(revision 30737)
@@ -241,5 +241,5 @@
 	 */
 	public CellValueRecordInterface[] getValueRecords() {
-		List<CellValueRecordInterface> temp = new ArrayList<CellValueRecordInterface>();
+		List<CellValueRecordInterface> temp = new ArrayList<>();
 
 		for (int rowIx = 0; rowIx < records.length; rowIx++) {
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/common/UnicodeString.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/common/UnicodeString.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/common/UnicodeString.java	(revision 30737)
@@ -414,5 +414,5 @@
 
         if (isRichText() && (runCount > 0)) {
-          field_4_format_runs = new ArrayList<FormatRun>(runCount);
+          field_4_format_runs = new ArrayList<>(runCount);
           for (int i=0;i<runCount;i++) {
             field_4_format_runs.add(new FormatRun(in));
@@ -539,5 +539,5 @@
     public void addFormatRun(FormatRun r) {
       if (field_4_format_runs == null) {
-		field_4_format_runs = new ArrayList<FormatRun>();
+		field_4_format_runs = new ArrayList<>();
 	}
 
@@ -709,5 +709,5 @@
         str.field_3_string = field_3_string;
         if (field_4_format_runs != null) {
-          str.field_4_format_runs = new ArrayList<FormatRun>();
+          str.field_4_format_runs = new ArrayList<>();
           for (FormatRun r : field_4_format_runs) {
             str.field_4_format_runs.add(new FormatRun(r._character, r._fontIndex));
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/Ptg.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/Ptg.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/Ptg.java	(revision 30737)
@@ -50,5 +50,5 @@
 	 */
 	public static Ptg[] readTokens(int size, LittleEndianInput in) {
-		List<Ptg> temp = new ArrayList<Ptg>(4 + size / 2);
+		List<Ptg> temp = new ArrayList<>(4 + size / 2);
 		int pos = 0;
 		boolean hasArrayPtgs = false;
@@ -216,5 +216,5 @@
 			if (ptg instanceof ArrayPtg) {
 				if (arrayPtgs == null) {
-					arrayPtgs = new ArrayList<Ptg>(5);
+					arrayPtgs = new ArrayList<>(5);
 				}
 				arrayPtgs.add(ptg);
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/function/FunctionDataBuilder.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/function/FunctionDataBuilder.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/function/FunctionDataBuilder.java	(revision 30737)
@@ -38,7 +38,7 @@
 	public FunctionDataBuilder(int sizeEstimate) {
 		_maxFunctionIndex = -1;
-		_functionDataByName = new HashMap<String, FunctionMetadata>(sizeEstimate * 3 / 2);
-		_functionDataByIndex = new HashMap<Integer, FunctionMetadata>(sizeEstimate * 3 / 2);
-		_mutatingFunctionIndexes = new HashSet<Integer>();
+		_functionDataByName = new HashMap<>(sizeEstimate * 3 / 2);
+		_functionDataByIndex = new HashMap<>(sizeEstimate * 3 / 2);
+		_mutatingFunctionIndexes = new HashSet<>();
 	}
 
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/function/FunctionMetadataReader.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/function/FunctionMetadataReader.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/function/FunctionMetadataReader.java	(revision 30737)
@@ -51,5 +51,5 @@
 		"LOG10", "ATAN2", "DAYS360", "SUMXMY2", "SUMX2MY2", "SUMX2PY2",
 	};
-	private static final Set<String> DIGIT_ENDING_FUNCTION_NAMES_SET = new HashSet<String>(Arrays.asList(DIGIT_ENDING_FUNCTION_NAMES));
+	private static final Set<String> DIGIT_ENDING_FUNCTION_NAMES_SET = new HashSet<>(Arrays.asList(DIGIT_ENDING_FUNCTION_NAMES));
 
 	public static FunctionMetadataRegistry createRegistry() {
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/usermodel/HSSFDataFormat.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/usermodel/HSSFDataFormat.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/usermodel/HSSFDataFormat.java	(revision 30737)
@@ -50,5 +50,5 @@
 	private static final String[] _builtinFormats = BuiltinFormats.getAll();
 
-	private final Vector<String> _formats = new Vector<String>();
+	private final Vector<String> _formats = new Vector<>();
 	private boolean _movedBuiltins = false;  // Flag to see if need to
 	// check the built in list
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/usermodel/HSSFSheet.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/usermodel/HSSFSheet.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/usermodel/HSSFSheet.java	(revision 30737)
@@ -73,5 +73,5 @@
     protected HSSFSheet(HSSFWorkbook workbook, InternalSheet sheet) {
         this._sheet = sheet;
-        _rows = new TreeMap<Integer, HSSFRow>();
+        _rows = new TreeMap<>();
         this._workbook = workbook;
         setPropertiesFromSheet(sheet);
@@ -264,5 +264,5 @@
         int height = lastRow - firstRow + 1;
         int width = lastColumn - firstColumn + 1;
-        List<HSSFCell> temp = new ArrayList<HSSFCell>(height*width);
+        List<HSSFCell> temp = new ArrayList<>(height*width);
         for (int rowIn = firstRow; rowIn <= lastRow; rowIn++) {
             for (int colIn = firstColumn; colIn <= lastColumn; colIn++) {
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/usermodel/HSSFWorkbook.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/usermodel/HSSFWorkbook.java	(revision 30737)
@@ -94,6 +94,6 @@
 		super(null);
 		workbook = book;
-		_sheets = new ArrayList<HSSFSheet>(INITIAL_CAPACITY);
-		names = new ArrayList<HSSFName>(INITIAL_CAPACITY);
+		_sheets = new ArrayList<>(INITIAL_CAPACITY);
+		names = new ArrayList<>(INITIAL_CAPACITY);
 	}
 
@@ -182,6 +182,6 @@
         }
 
-        _sheets = new ArrayList<HSSFSheet>(INITIAL_CAPACITY);
-        names  = new ArrayList<HSSFName>(INITIAL_CAPACITY);
+        _sheets = new ArrayList<>(INITIAL_CAPACITY);
+        names  = new ArrayList<>(INITIAL_CAPACITY);
 
         // Grab the data from the workbook stream, however
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/filesystem/DirectoryNode.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/filesystem/DirectoryNode.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/filesystem/DirectoryNode.java	(revision 30737)
@@ -81,6 +81,6 @@
         }
         _filesystem = filesystem;
-        _byname     = new HashMap<String, Entry>();
-        _entries    = new ArrayList<Entry>();
+        _byname     = new HashMap<>();
+        _entries    = new ArrayList<>();
         Iterator<Property> iter = property.getChildren();
 
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/filesystem/POIFSDocument.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/filesystem/POIFSDocument.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/filesystem/POIFSDocument.java	(revision 30737)
@@ -98,5 +98,5 @@
 	 */
 	public POIFSDocument(String name, POIFSBigBlockSize bigBlockSize, InputStream stream) throws IOException {
-		List<DocumentBlock> blocks = new ArrayList<DocumentBlock>();
+		List<DocumentBlock> blocks = new ArrayList<>();
 
 		_size = 0;
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/filesystem/POIFSFileSystem.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/filesystem/POIFSFileSystem.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/filesystem/POIFSFileSystem.java	(revision 30737)
@@ -69,5 +69,5 @@
     {
         _property_table = new PropertyTable();
-        _documents      = new ArrayList<POIFSDocument>();
+        _documents      = new ArrayList<>();
         _root           = null;
     }
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/property/DirectoryProperty.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/property/DirectoryProperty.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/property/DirectoryProperty.java	(revision 30737)
@@ -48,6 +48,6 @@
     {
         super();
-        _children       = new ArrayList<Property>();
-        _children_names = new HashSet<String>();
+        _children       = new ArrayList<>();
+        _children_names = new HashSet<>();
         setName(name);
         setSize(0);
@@ -68,6 +68,6 @@
     {
         super(index, array, offset);
-        _children       = new ArrayList<Property>();
-        _children_names = new HashSet<String>();
+        _children       = new ArrayList<>();
+        _children_names = new HashSet<>();
     }
 
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/property/PropertyFactory.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/property/PropertyFactory.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/property/PropertyFactory.java	(revision 30737)
@@ -61,5 +61,5 @@
         throws IOException
     {
-        List<Property> properties = new ArrayList<Property>();
+        List<Property> properties = new ArrayList<>();
 
         for (int j = 0; j < blocks.length; j++)
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/property/PropertyTable.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/property/PropertyTable.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/property/PropertyTable.java	(revision 30737)
@@ -40,5 +40,5 @@
     public PropertyTable()
     {
-        _properties  = new ArrayList<Property>();
+        _properties  = new ArrayList<>();
         addProperty(new RootProperty());
         _blocks = null;
@@ -111,5 +111,5 @@
             return;
         }
-        Stack<Property> children = new Stack<Property>();
+        Stack<Property> children = new Stack<>();
 
         children.push(_properties.get(index));
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/storage/BlockAllocationTableReader.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/storage/BlockAllocationTableReader.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/storage/BlockAllocationTableReader.java	(revision 30737)
@@ -202,5 +202,5 @@
     ListManagedBlock[] fetchBlocks(int startBlock, int headerPropertiesStartBlock,
             BlockList blockList) throws IOException {
-        List<ListManagedBlock> blocks = new ArrayList<ListManagedBlock>();
+        List<ListManagedBlock> blocks = new ArrayList<>();
         int  currentBlock = startBlock;
         boolean firstPass = true;
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/storage/RawDataBlockList.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/storage/RawDataBlockList.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/storage/RawDataBlockList.java	(revision 30737)
@@ -50,5 +50,5 @@
         throws IOException
     {
-        List<RawDataBlock> blocks = new ArrayList<RawDataBlock>();
+        List<RawDataBlock> blocks = new ArrayList<>();
 
         while (true)
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/storage/SmallDocumentBlock.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/storage/SmallDocumentBlock.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/storage/SmallDocumentBlock.java	(revision 30737)
@@ -147,5 +147,5 @@
         int _blocks_per_big_block = getBlocksPerBigBlock(bigBlockSize);
         
-        List<SmallDocumentBlock> sdbs = new ArrayList<SmallDocumentBlock>();
+        List<SmallDocumentBlock> sdbs = new ArrayList<>();
 
         for (int j = 0; j < blocks.length; j++)
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/format/CellElapsedFormatter.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/format/CellElapsedFormatter.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/format/CellElapsedFormatter.java	(revision 30737)
@@ -132,5 +132,5 @@
         super(pattern);
 
-        specs = new ArrayList<TimeSpec>();
+        specs = new ArrayList<>();
 
         StringBuffer desc = CellFormatPart.parseFormat(pattern,
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/format/CellNumberFormatter.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/format/CellNumberFormatter.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/format/CellNumberFormatter.java	(revision 30737)
@@ -246,5 +246,5 @@
         scale = 1;
 
-        specials = new LinkedList<Special>();
+        specials = new LinkedList<>();
 
         NumPartHandler partHandler = new NumPartHandler();
@@ -573,5 +573,5 @@
         }
 
-        Set<StringMod> mods = new TreeSet<StringMod>();
+        Set<StringMod> mods = new TreeSet<>();
         StringBuffer output = new StringBuffer(desc);
 
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/formula/FormulaRenderer.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/formula/FormulaRenderer.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/formula/FormulaRenderer.java	(revision 30737)
@@ -48,5 +48,5 @@
             throw new IllegalArgumentException("ptgs must not be null");
         }
-        Stack<String> stack = new Stack<String>();
+        Stack<String> stack = new Stack<>();
 
         for (int i=0 ; i < ptgs.length; i++) {
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/usermodel/BuiltinFormats.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/usermodel/BuiltinFormats.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/usermodel/BuiltinFormats.java	(revision 30737)
@@ -75,5 +75,5 @@
 
 	static {
-		List<String> m = new ArrayList<String>();
+		List<String> m = new ArrayList<>();
 		putFormat(m, 0, "General");
 		putFormat(m, 1, "0");
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/util/CellRangeAddressList.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/util/CellRangeAddressList.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/util/CellRangeAddressList.java	(revision 30737)
@@ -45,5 +45,5 @@
 
 	public CellRangeAddressList() {
-		_list = new ArrayList<CellRangeAddress>();
+		_list = new ArrayList<>();
 	}
 	/**
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/util/SSCellRange.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/util/SSCellRange.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/util/SSCellRange.java	(revision 30737)
@@ -50,9 +50,9 @@
 		B[] flattenedArray = (B[]) Array.newInstance(cellClass, nItems);
 		flattenedList.toArray(flattenedArray);
-		return new SSCellRange<B>(firstRow, firstColumn, height, width, flattenedArray);
+		return new SSCellRange<>(firstRow, firstColumn, height, width, flattenedArray);
 	}
 
 	public Iterator<K> iterator() {
-		return new ArrayIterator<K>(_flattenedArray);
+		return new ArrayIterator<>(_flattenedArray);
 	}
 	private static final class ArrayIterator<D> implements Iterator<D> {
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/BitFieldFactory.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/BitFieldFactory.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/BitFieldFactory.java	(revision 30737)
@@ -29,5 +29,5 @@
 
 public class BitFieldFactory {
-    private static Map<Integer, BitField> instances = new HashMap<Integer, BitField>();
+    private static Map<Integer, BitField> instances = new HashMap<>();
 
     public static BitField getInstance(int mask) {
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/HexRead.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/HexRead.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/HexRead.java	(revision 30737)
@@ -38,5 +38,5 @@
         int characterCount = 0;
         byte b = (byte) 0;
-        List<Byte> bytes = new ArrayList<Byte>();
+        List<Byte> bytes = new ArrayList<>();
         boolean done = false;
         while ( !done )
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/IntMapper.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/IntMapper.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/IntMapper.java	(revision 30737)
@@ -56,6 +56,6 @@
     public IntMapper(final int initialCapacity)
     {
-        elements = new ArrayList<T>(initialCapacity);
-        valueKeyMap = new HashMap<T,Integer>(initialCapacity);
+        elements = new ArrayList<>(initialCapacity);
+        valueKeyMap = new HashMap<>(initialCapacity);
     }
 
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/POILogFactory.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/POILogFactory.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/POILogFactory.java	(revision 30737)
@@ -38,5 +38,5 @@
      * Map of POILogger instances, with classes as keys
      */
-    private static Map<String, POILogger> _loggers = new HashMap<String, POILogger>();
+    private static Map<String, POILogger> _loggers = new HashMap<>();
 
     /**
Index: applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/POILogger.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/POILogger.java	(revision 30736)
+++ applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/POILogger.java	(revision 30737)
@@ -571,5 +571,5 @@
     private Object [] flattenArrays(Object [] objects)
     {
-        List<Object> results = new ArrayList<Object>();
+        List<Object> results = new ArrayList<>();
 
         for (int i = 0; i < objects.length; i++)
@@ -582,5 +582,5 @@
     private List<Object> objectToObjectArray(Object object)
     {
-        List<Object> results = new ArrayList<Object>();
+        List<Object> results = new ArrayList<>();
 
         if (object instanceof byte [])
Index: applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java
===================================================================
--- applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java	(revision 30737)
@@ -80,5 +80,5 @@
 
                 // Write nodes, make list of ways and relations
-                Set<OsmPrimitive> parents = new HashSet<OsmPrimitive>();
+                Set<OsmPrimitive> parents = new HashSet<>();
                 for (Node n : ds.getNodes()) {
                     if (n.isUsable() && n.getCoor() != null && n.getCoor().isWithin(b)) {
@@ -89,5 +89,5 @@
 
                 // I'm not sure why (if) is this usefull
-                for (OsmPrimitive p : new HashSet<OsmPrimitive>(parents)) {
+                for (OsmPrimitive p : new HashSet<>(parents)) {
                     if (p instanceof Way) {
                         for (Node n : ((Way) p).getNodes()) {
Index: applications/editors/josm/plugins/pbf/gen/com/google/protobuf/DescriptorProtos.java
===================================================================
--- applications/editors/josm/plugins/pbf/gen/com/google/protobuf/DescriptorProtos.java	(revision 30736)
+++ applications/editors/josm/plugins/pbf/gen/com/google/protobuf/DescriptorProtos.java	(revision 30737)
@@ -96,5 +96,5 @@
             case 10: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
-                file_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.FileDescriptorProto>();
+                file_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000001;
               }
@@ -460,5 +460,5 @@
       private void ensureFileIsMutable() {
         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
-          file_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.FileDescriptorProto>(file_);
+          file_ = new java.util.ArrayList<>(file_);
           bitField0_ |= 0x00000001;
          }
@@ -685,6 +685,5 @@
           getFileFieldBuilder() {
         if (fileBuilder_ == null) {
-          fileBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.FileDescriptorProto, com.google.protobuf.DescriptorProtos.FileDescriptorProto.Builder, com.google.protobuf.DescriptorProtos.FileDescriptorProtoOrBuilder>(
+          fileBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   file_,
                   ((bitField0_ & 0x00000001) == 0x00000001),
@@ -1093,5 +1092,5 @@
             case 34: {
               if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
-                messageType_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.DescriptorProto>();
+                messageType_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000020;
               }
@@ -1101,5 +1100,5 @@
             case 42: {
               if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
-                enumType_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.EnumDescriptorProto>();
+                enumType_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000040;
               }
@@ -1109,5 +1108,5 @@
             case 50: {
               if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
-                service_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.ServiceDescriptorProto>();
+                service_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000080;
               }
@@ -1117,5 +1116,5 @@
             case 58: {
               if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
-                extension_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.FieldDescriptorProto>();
+                extension_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000100;
               }
@@ -1151,5 +1150,5 @@
             case 80: {
               if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
-                publicDependency_ = new java.util.ArrayList<java.lang.Integer>();
+                publicDependency_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000008;
               }
@@ -1161,5 +1160,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) {
-                publicDependency_ = new java.util.ArrayList<java.lang.Integer>();
+                publicDependency_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000008;
               }
@@ -1172,5 +1171,5 @@
             case 88: {
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
-                weakDependency_ = new java.util.ArrayList<java.lang.Integer>();
+                weakDependency_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000010;
               }
@@ -1182,5 +1181,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) {
-                weakDependency_ = new java.util.ArrayList<java.lang.Integer>();
+                weakDependency_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000010;
               }
@@ -2687,5 +2686,5 @@
       private void ensurePublicDependencyIsMutable() {
         if (!((bitField0_ & 0x00000008) == 0x00000008)) {
-          publicDependency_ = new java.util.ArrayList<java.lang.Integer>(publicDependency_);
+          publicDependency_ = new java.util.ArrayList<>(publicDependency_);
           bitField0_ |= 0x00000008;
          }
@@ -2781,5 +2780,5 @@
       private void ensureWeakDependencyIsMutable() {
         if (!((bitField0_ & 0x00000010) == 0x00000010)) {
-          weakDependency_ = new java.util.ArrayList<java.lang.Integer>(weakDependency_);
+          weakDependency_ = new java.util.ArrayList<>(weakDependency_);
           bitField0_ |= 0x00000010;
          }
@@ -2883,5 +2882,5 @@
       private void ensureMessageTypeIsMutable() {
         if (!((bitField0_ & 0x00000020) == 0x00000020)) {
-          messageType_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.DescriptorProto>(messageType_);
+          messageType_ = new java.util.ArrayList<>(messageType_);
           bitField0_ |= 0x00000020;
          }
@@ -3180,6 +3179,5 @@
           getMessageTypeFieldBuilder() {
         if (messageTypeBuilder_ == null) {
-          messageTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.DescriptorProto, com.google.protobuf.DescriptorProtos.DescriptorProto.Builder, com.google.protobuf.DescriptorProtos.DescriptorProtoOrBuilder>(
+          messageTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   messageType_,
                   ((bitField0_ & 0x00000020) == 0x00000020),
@@ -3195,5 +3193,5 @@
       private void ensureEnumTypeIsMutable() {
         if (!((bitField0_ & 0x00000040) == 0x00000040)) {
-          enumType_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.EnumDescriptorProto>(enumType_);
+          enumType_ = new java.util.ArrayList<>(enumType_);
           bitField0_ |= 0x00000040;
          }
@@ -3420,6 +3418,5 @@
           getEnumTypeFieldBuilder() {
         if (enumTypeBuilder_ == null) {
-          enumTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.EnumDescriptorProto, com.google.protobuf.DescriptorProtos.EnumDescriptorProto.Builder, com.google.protobuf.DescriptorProtos.EnumDescriptorProtoOrBuilder>(
+          enumTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   enumType_,
                   ((bitField0_ & 0x00000040) == 0x00000040),
@@ -3435,5 +3432,5 @@
       private void ensureServiceIsMutable() {
         if (!((bitField0_ & 0x00000080) == 0x00000080)) {
-          service_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.ServiceDescriptorProto>(service_);
+          service_ = new java.util.ArrayList<>(service_);
           bitField0_ |= 0x00000080;
          }
@@ -3660,6 +3657,5 @@
           getServiceFieldBuilder() {
         if (serviceBuilder_ == null) {
-          serviceBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.ServiceDescriptorProto, com.google.protobuf.DescriptorProtos.ServiceDescriptorProto.Builder, com.google.protobuf.DescriptorProtos.ServiceDescriptorProtoOrBuilder>(
+          serviceBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   service_,
                   ((bitField0_ & 0x00000080) == 0x00000080),
@@ -3675,5 +3671,5 @@
       private void ensureExtensionIsMutable() {
         if (!((bitField0_ & 0x00000100) == 0x00000100)) {
-          extension_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.FieldDescriptorProto>(extension_);
+          extension_ = new java.util.ArrayList<>(extension_);
           bitField0_ |= 0x00000100;
          }
@@ -3900,6 +3896,5 @@
           getExtensionFieldBuilder() {
         if (extensionBuilder_ == null) {
-          extensionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.FieldDescriptorProto, com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Builder, com.google.protobuf.DescriptorProtos.FieldDescriptorProtoOrBuilder>(
+          extensionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   extension_,
                   ((bitField0_ & 0x00000100) == 0x00000100),
@@ -4017,6 +4012,5 @@
           getOptionsFieldBuilder() {
         if (optionsBuilder_ == null) {
-          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
-              com.google.protobuf.DescriptorProtos.FileOptions, com.google.protobuf.DescriptorProtos.FileOptions.Builder, com.google.protobuf.DescriptorProtos.FileOptionsOrBuilder>(
+          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<>(
                   getOptions(),
                   getParentForChildren(),
@@ -4196,6 +4190,5 @@
           getSourceCodeInfoFieldBuilder() {
         if (sourceCodeInfoBuilder_ == null) {
-          sourceCodeInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
-              com.google.protobuf.DescriptorProtos.SourceCodeInfo, com.google.protobuf.DescriptorProtos.SourceCodeInfo.Builder, com.google.protobuf.DescriptorProtos.SourceCodeInfoOrBuilder>(
+          sourceCodeInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<>(
                   getSourceCodeInfo(),
                   getParentForChildren(),
@@ -4456,5 +4449,5 @@
             case 18: {
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
-                field_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.FieldDescriptorProto>();
+                field_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -4464,5 +4457,5 @@
             case 26: {
               if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
-                nestedType_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.DescriptorProto>();
+                nestedType_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000008;
               }
@@ -4472,5 +4465,5 @@
             case 34: {
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
-                enumType_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.EnumDescriptorProto>();
+                enumType_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000010;
               }
@@ -4480,5 +4473,5 @@
             case 42: {
               if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
-                extensionRange_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRange>();
+                extensionRange_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000020;
               }
@@ -4488,5 +4481,5 @@
             case 50: {
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
-                extension_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.FieldDescriptorProto>();
+                extension_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -4509,5 +4502,5 @@
             case 66: {
               if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
-                oneofDecl_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.OneofDescriptorProto>();
+                oneofDecl_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000040;
               }
@@ -6022,5 +6015,5 @@
       private void ensureFieldIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
-          field_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.FieldDescriptorProto>(field_);
+          field_ = new java.util.ArrayList<>(field_);
           bitField0_ |= 0x00000002;
          }
@@ -6247,6 +6240,5 @@
           getFieldFieldBuilder() {
         if (fieldBuilder_ == null) {
-          fieldBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.FieldDescriptorProto, com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Builder, com.google.protobuf.DescriptorProtos.FieldDescriptorProtoOrBuilder>(
+          fieldBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   field_,
                   ((bitField0_ & 0x00000002) == 0x00000002),
@@ -6262,5 +6254,5 @@
       private void ensureExtensionIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
-          extension_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.FieldDescriptorProto>(extension_);
+          extension_ = new java.util.ArrayList<>(extension_);
           bitField0_ |= 0x00000004;
          }
@@ -6487,6 +6479,5 @@
           getExtensionFieldBuilder() {
         if (extensionBuilder_ == null) {
-          extensionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.FieldDescriptorProto, com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Builder, com.google.protobuf.DescriptorProtos.FieldDescriptorProtoOrBuilder>(
+          extensionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   extension_,
                   ((bitField0_ & 0x00000004) == 0x00000004),
@@ -6502,5 +6493,5 @@
       private void ensureNestedTypeIsMutable() {
         if (!((bitField0_ & 0x00000008) == 0x00000008)) {
-          nestedType_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.DescriptorProto>(nestedType_);
+          nestedType_ = new java.util.ArrayList<>(nestedType_);
           bitField0_ |= 0x00000008;
          }
@@ -6727,6 +6718,5 @@
           getNestedTypeFieldBuilder() {
         if (nestedTypeBuilder_ == null) {
-          nestedTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.DescriptorProto, com.google.protobuf.DescriptorProtos.DescriptorProto.Builder, com.google.protobuf.DescriptorProtos.DescriptorProtoOrBuilder>(
+          nestedTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   nestedType_,
                   ((bitField0_ & 0x00000008) == 0x00000008),
@@ -6742,5 +6732,5 @@
       private void ensureEnumTypeIsMutable() {
         if (!((bitField0_ & 0x00000010) == 0x00000010)) {
-          enumType_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.EnumDescriptorProto>(enumType_);
+          enumType_ = new java.util.ArrayList<>(enumType_);
           bitField0_ |= 0x00000010;
          }
@@ -6967,6 +6957,5 @@
           getEnumTypeFieldBuilder() {
         if (enumTypeBuilder_ == null) {
-          enumTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.EnumDescriptorProto, com.google.protobuf.DescriptorProtos.EnumDescriptorProto.Builder, com.google.protobuf.DescriptorProtos.EnumDescriptorProtoOrBuilder>(
+          enumTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   enumType_,
                   ((bitField0_ & 0x00000010) == 0x00000010),
@@ -6982,5 +6971,5 @@
       private void ensureExtensionRangeIsMutable() {
         if (!((bitField0_ & 0x00000020) == 0x00000020)) {
-          extensionRange_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRange>(extensionRange_);
+          extensionRange_ = new java.util.ArrayList<>(extensionRange_);
           bitField0_ |= 0x00000020;
          }
@@ -7207,6 +7196,5 @@
           getExtensionRangeFieldBuilder() {
         if (extensionRangeBuilder_ == null) {
-          extensionRangeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRange, com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRange.Builder, com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRangeOrBuilder>(
+          extensionRangeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   extensionRange_,
                   ((bitField0_ & 0x00000020) == 0x00000020),
@@ -7222,5 +7210,5 @@
       private void ensureOneofDeclIsMutable() {
         if (!((bitField0_ & 0x00000040) == 0x00000040)) {
-          oneofDecl_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.OneofDescriptorProto>(oneofDecl_);
+          oneofDecl_ = new java.util.ArrayList<>(oneofDecl_);
           bitField0_ |= 0x00000040;
          }
@@ -7447,6 +7435,5 @@
           getOneofDeclFieldBuilder() {
         if (oneofDeclBuilder_ == null) {
-          oneofDeclBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.OneofDescriptorProto, com.google.protobuf.DescriptorProtos.OneofDescriptorProto.Builder, com.google.protobuf.DescriptorProtos.OneofDescriptorProtoOrBuilder>(
+          oneofDeclBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   oneofDecl_,
                   ((bitField0_ & 0x00000040) == 0x00000040),
@@ -7564,6 +7551,5 @@
           getOptionsFieldBuilder() {
         if (optionsBuilder_ == null) {
-          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
-              com.google.protobuf.DescriptorProtos.MessageOptions, com.google.protobuf.DescriptorProtos.MessageOptions.Builder, com.google.protobuf.DescriptorProtos.MessageOptionsOrBuilder>(
+          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<>(
                   getOptions(),
                   getParentForChildren(),
@@ -9801,6 +9787,5 @@
           getOptionsFieldBuilder() {
         if (optionsBuilder_ == null) {
-          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
-              com.google.protobuf.DescriptorProtos.FieldOptions, com.google.protobuf.DescriptorProtos.FieldOptions.Builder, com.google.protobuf.DescriptorProtos.FieldOptionsOrBuilder>(
+          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<>(
                   getOptions(),
                   getParentForChildren(),
@@ -10425,5 +10410,5 @@
             case 18: {
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
-                value_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto>();
+                value_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -11000,5 +10985,5 @@
       private void ensureValueIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
-          value_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto>(value_);
+          value_ = new java.util.ArrayList<>(value_);
           bitField0_ |= 0x00000002;
          }
@@ -11225,6 +11210,5 @@
           getValueFieldBuilder() {
         if (valueBuilder_ == null) {
-          valueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto, com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto.Builder, com.google.protobuf.DescriptorProtos.EnumValueDescriptorProtoOrBuilder>(
+          valueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   value_,
                   ((bitField0_ & 0x00000002) == 0x00000002),
@@ -11342,6 +11326,5 @@
           getOptionsFieldBuilder() {
         if (optionsBuilder_ == null) {
-          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
-              com.google.protobuf.DescriptorProtos.EnumOptions, com.google.protobuf.DescriptorProtos.EnumOptions.Builder, com.google.protobuf.DescriptorProtos.EnumOptionsOrBuilder>(
+          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<>(
                   getOptions(),
                   getParentForChildren(),
@@ -12105,6 +12088,5 @@
           getOptionsFieldBuilder() {
         if (optionsBuilder_ == null) {
-          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
-              com.google.protobuf.DescriptorProtos.EnumValueOptions, com.google.protobuf.DescriptorProtos.EnumValueOptions.Builder, com.google.protobuf.DescriptorProtos.EnumValueOptionsOrBuilder>(
+          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<>(
                   getOptions(),
                   getParentForChildren(),
@@ -12245,5 +12227,5 @@
             case 18: {
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
-                method_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.MethodDescriptorProto>();
+                method_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -12820,5 +12802,5 @@
       private void ensureMethodIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
-          method_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.MethodDescriptorProto>(method_);
+          method_ = new java.util.ArrayList<>(method_);
           bitField0_ |= 0x00000002;
          }
@@ -13045,6 +13027,5 @@
           getMethodFieldBuilder() {
         if (methodBuilder_ == null) {
-          methodBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.MethodDescriptorProto, com.google.protobuf.DescriptorProtos.MethodDescriptorProto.Builder, com.google.protobuf.DescriptorProtos.MethodDescriptorProtoOrBuilder>(
+          methodBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   method_,
                   ((bitField0_ & 0x00000002) == 0x00000002),
@@ -13162,6 +13143,5 @@
           getOptionsFieldBuilder() {
         if (optionsBuilder_ == null) {
-          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
-              com.google.protobuf.DescriptorProtos.ServiceOptions, com.google.protobuf.DescriptorProtos.ServiceOptions.Builder, com.google.protobuf.DescriptorProtos.ServiceOptionsOrBuilder>(
+          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<>(
                   getOptions(),
                   getParentForChildren(),
@@ -14221,6 +14201,5 @@
           getOptionsFieldBuilder() {
         if (optionsBuilder_ == null) {
-          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
-              com.google.protobuf.DescriptorProtos.MethodOptions, com.google.protobuf.DescriptorProtos.MethodOptions.Builder, com.google.protobuf.DescriptorProtos.MethodOptionsOrBuilder>(
+          optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<>(
                   getOptions(),
                   getParentForChildren(),
@@ -14684,5 +14663,5 @@
             case 7994: {
               if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) {
-                uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>();
+                uninterpretedOption_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000800;
               }
@@ -16606,5 +16585,5 @@
       private void ensureUninterpretedOptionIsMutable() {
         if (!((bitField0_ & 0x00000800) == 0x00000800)) {
-          uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>(uninterpretedOption_);
+          uninterpretedOption_ = new java.util.ArrayList<>(uninterpretedOption_);
           bitField0_ |= 0x00000800;
          }
@@ -16903,6 +16882,5 @@
           getUninterpretedOptionFieldBuilder() {
         if (uninterpretedOptionBuilder_ == null) {
-          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.UninterpretedOption, com.google.protobuf.DescriptorProtos.UninterpretedOption.Builder, com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder>(
+          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   uninterpretedOption_,
                   ((bitField0_ & 0x00000800) == 0x00000800),
@@ -17133,5 +17111,5 @@
             case 7994: {
               if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
-                uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>();
+                uninterpretedOption_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000008;
               }
@@ -17908,5 +17886,5 @@
       private void ensureUninterpretedOptionIsMutable() {
         if (!((bitField0_ & 0x00000008) == 0x00000008)) {
-          uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>(uninterpretedOption_);
+          uninterpretedOption_ = new java.util.ArrayList<>(uninterpretedOption_);
           bitField0_ |= 0x00000008;
          }
@@ -18205,6 +18183,5 @@
           getUninterpretedOptionFieldBuilder() {
         if (uninterpretedOptionBuilder_ == null) {
-          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.UninterpretedOption, com.google.protobuf.DescriptorProtos.UninterpretedOption.Builder, com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder>(
+          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   uninterpretedOption_,
                   ((bitField0_ & 0x00000008) == 0x00000008),
@@ -18576,5 +18553,5 @@
             case 7994: {
               if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
-                uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>();
+                uninterpretedOption_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000040;
               }
@@ -19979,5 +19956,5 @@
       private void ensureUninterpretedOptionIsMutable() {
         if (!((bitField0_ & 0x00000040) == 0x00000040)) {
-          uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>(uninterpretedOption_);
+          uninterpretedOption_ = new java.util.ArrayList<>(uninterpretedOption_);
           bitField0_ |= 0x00000040;
          }
@@ -20276,6 +20253,5 @@
           getUninterpretedOptionFieldBuilder() {
         if (uninterpretedOptionBuilder_ == null) {
-          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.UninterpretedOption, com.google.protobuf.DescriptorProtos.UninterpretedOption.Builder, com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder>(
+          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   uninterpretedOption_,
                   ((bitField0_ & 0x00000040) == 0x00000040),
@@ -20454,5 +20430,5 @@
             case 7994: {
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
-                uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>();
+                uninterpretedOption_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -21051,5 +21027,5 @@
       private void ensureUninterpretedOptionIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
-          uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>(uninterpretedOption_);
+          uninterpretedOption_ = new java.util.ArrayList<>(uninterpretedOption_);
           bitField0_ |= 0x00000004;
          }
@@ -21348,6 +21324,5 @@
           getUninterpretedOptionFieldBuilder() {
         if (uninterpretedOptionBuilder_ == null) {
-          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.UninterpretedOption, com.google.protobuf.DescriptorProtos.UninterpretedOption.Builder, com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder>(
+          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   uninterpretedOption_,
                   ((bitField0_ & 0x00000004) == 0x00000004),
@@ -21502,5 +21477,5 @@
             case 7994: {
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
-                uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>();
+                uninterpretedOption_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -22005,5 +21980,5 @@
       private void ensureUninterpretedOptionIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
-          uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>(uninterpretedOption_);
+          uninterpretedOption_ = new java.util.ArrayList<>(uninterpretedOption_);
           bitField0_ |= 0x00000002;
          }
@@ -22302,6 +22277,5 @@
           getUninterpretedOptionFieldBuilder() {
         if (uninterpretedOptionBuilder_ == null) {
-          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.UninterpretedOption, com.google.protobuf.DescriptorProtos.UninterpretedOption.Builder, com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder>(
+          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   uninterpretedOption_,
                   ((bitField0_ & 0x00000002) == 0x00000002),
@@ -22456,5 +22430,5 @@
             case 7994: {
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
-                uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>();
+                uninterpretedOption_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -22959,5 +22933,5 @@
       private void ensureUninterpretedOptionIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
-          uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>(uninterpretedOption_);
+          uninterpretedOption_ = new java.util.ArrayList<>(uninterpretedOption_);
           bitField0_ |= 0x00000002;
          }
@@ -23256,6 +23230,5 @@
           getUninterpretedOptionFieldBuilder() {
         if (uninterpretedOptionBuilder_ == null) {
-          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.UninterpretedOption, com.google.protobuf.DescriptorProtos.UninterpretedOption.Builder, com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder>(
+          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   uninterpretedOption_,
                   ((bitField0_ & 0x00000002) == 0x00000002),
@@ -23410,5 +23383,5 @@
             case 7994: {
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
-                uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>();
+                uninterpretedOption_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -23913,5 +23886,5 @@
       private void ensureUninterpretedOptionIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
-          uninterpretedOption_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption>(uninterpretedOption_);
+          uninterpretedOption_ = new java.util.ArrayList<>(uninterpretedOption_);
           bitField0_ |= 0x00000002;
          }
@@ -24210,6 +24183,5 @@
           getUninterpretedOptionFieldBuilder() {
         if (uninterpretedOptionBuilder_ == null) {
-          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.UninterpretedOption, com.google.protobuf.DescriptorProtos.UninterpretedOption.Builder, com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder>(
+          uninterpretedOptionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   uninterpretedOption_,
                   ((bitField0_ & 0x00000002) == 0x00000002),
@@ -24402,5 +24374,5 @@
             case 18: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
-                name_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart>();
+                name_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000001;
               }
@@ -25656,5 +25628,5 @@
       private void ensureNameIsMutable() {
         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
-          name_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart>(name_);
+          name_ = new java.util.ArrayList<>(name_);
           bitField0_ |= 0x00000001;
          }
@@ -25881,6 +25853,5 @@
           getNameFieldBuilder() {
         if (nameBuilder_ == null) {
-          nameBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart, com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart.Builder, com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePartOrBuilder>(
+          nameBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   name_,
                   ((bitField0_ & 0x00000001) == 0x00000001),
@@ -26523,5 +26494,5 @@
             case 10: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
-                location_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location>();
+                location_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000001;
               }
@@ -26869,5 +26840,5 @@
               case 8: {
                 if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
-                  path_ = new java.util.ArrayList<java.lang.Integer>();
+                  path_ = new java.util.ArrayList<>();
                   mutable_bitField0_ |= 0x00000001;
                 }
@@ -26879,5 +26850,5 @@
                 int limit = input.pushLimit(length);
                 if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
-                  path_ = new java.util.ArrayList<java.lang.Integer>();
+                  path_ = new java.util.ArrayList<>();
                   mutable_bitField0_ |= 0x00000001;
                 }
@@ -26890,5 +26861,5 @@
               case 16: {
                 if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
-                  span_ = new java.util.ArrayList<java.lang.Integer>();
+                  span_ = new java.util.ArrayList<>();
                   mutable_bitField0_ |= 0x00000002;
                 }
@@ -26900,5 +26871,5 @@
                 int limit = input.pushLimit(length);
                 if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
-                  span_ = new java.util.ArrayList<java.lang.Integer>();
+                  span_ = new java.util.ArrayList<>();
                   mutable_bitField0_ |= 0x00000002;
                 }
@@ -27614,5 +27585,5 @@
         private void ensurePathIsMutable() {
           if (!((bitField0_ & 0x00000001) == 0x00000001)) {
-            path_ = new java.util.ArrayList<java.lang.Integer>(path_);
+            path_ = new java.util.ArrayList<>(path_);
             bitField0_ |= 0x00000001;
            }
@@ -27848,5 +27819,5 @@
         private void ensureSpanIsMutable() {
           if (!((bitField0_ & 0x00000002) == 0x00000002)) {
-            span_ = new java.util.ArrayList<java.lang.Integer>(span_);
+            span_ = new java.util.ArrayList<>(span_);
             bitField0_ |= 0x00000002;
            }
@@ -28834,5 +28805,5 @@
       private void ensureLocationIsMutable() {
         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
-          location_ = new java.util.ArrayList<com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location>(location_);
+          location_ = new java.util.ArrayList<>(location_);
           bitField0_ |= 0x00000001;
          }
@@ -29851,6 +29822,5 @@
           getLocationFieldBuilder() {
         if (locationBuilder_ == null) {
-          locationBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
-              com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location, com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location.Builder, com.google.protobuf.DescriptorProtos.SourceCodeInfo.LocationOrBuilder>(
+          locationBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<>(
                   location_,
                   ((bitField0_ & 0x00000001) == 0x00000001),
Index: applications/editors/josm/plugins/pbf/gen/crosby/binary/Osmformat.java
===================================================================
--- applications/editors/josm/plugins/pbf/gen/crosby/binary/Osmformat.java	(revision 30736)
+++ applications/editors/josm/plugins/pbf/gen/crosby/binary/Osmformat.java	(revision 30737)
@@ -2416,5 +2416,5 @@
             case 18: {
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
-                primitivegroup_ = new java.util.ArrayList<crosby.binary.Osmformat.PrimitiveGroup>();
+                primitivegroup_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -2982,5 +2982,5 @@
       private void ensurePrimitivegroupIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
-          primitivegroup_ = new java.util.ArrayList<crosby.binary.Osmformat.PrimitiveGroup>(primitivegroup_);
+          primitivegroup_ = new java.util.ArrayList<>(primitivegroup_);
           bitField0_ |= 0x00000002;
          }
@@ -3415,5 +3415,5 @@
             case 10: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
-                nodes_ = new java.util.ArrayList<crosby.binary.Osmformat.Node>();
+                nodes_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000001;
               }
@@ -3436,5 +3436,5 @@
             case 26: {
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
-                ways_ = new java.util.ArrayList<crosby.binary.Osmformat.Way>();
+                ways_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -3444,5 +3444,5 @@
             case 34: {
               if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
-                relations_ = new java.util.ArrayList<crosby.binary.Osmformat.Relation>();
+                relations_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000008;
               }
@@ -3452,5 +3452,5 @@
             case 42: {
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
-                changesets_ = new java.util.ArrayList<crosby.binary.Osmformat.ChangeSet>();
+                changesets_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000010;
               }
@@ -4007,5 +4007,5 @@
       private void ensureNodesIsMutable() {
         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
-          nodes_ = new java.util.ArrayList<crosby.binary.Osmformat.Node>(nodes_);
+          nodes_ = new java.util.ArrayList<>(nodes_);
           bitField0_ |= 0x00000001;
          }
@@ -4192,5 +4192,5 @@
       private void ensureWaysIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
-          ways_ = new java.util.ArrayList<crosby.binary.Osmformat.Way>(ways_);
+          ways_ = new java.util.ArrayList<>(ways_);
           bitField0_ |= 0x00000004;
          }
@@ -4317,5 +4317,5 @@
       private void ensureRelationsIsMutable() {
         if (!((bitField0_ & 0x00000008) == 0x00000008)) {
-          relations_ = new java.util.ArrayList<crosby.binary.Osmformat.Relation>(relations_);
+          relations_ = new java.util.ArrayList<>(relations_);
           bitField0_ |= 0x00000008;
          }
@@ -4442,5 +4442,5 @@
       private void ensureChangesetsIsMutable() {
         if (!((bitField0_ & 0x00000010) == 0x00000010)) {
-          changesets_ = new java.util.ArrayList<crosby.binary.Osmformat.ChangeSet>(changesets_);
+          changesets_ = new java.util.ArrayList<>(changesets_);
           bitField0_ |= 0x00000010;
          }
@@ -4649,5 +4649,5 @@
             case 10: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
-                s_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
+                s_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000001;
               }
@@ -4925,5 +4925,5 @@
       private void ensureSIsMutable() {
         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
-          s_ = new java.util.ArrayList<com.google.protobuf.ByteString>(s_);
+          s_ = new java.util.ArrayList<>(s_);
           bitField0_ |= 0x00000001;
          }
@@ -6094,5 +6094,5 @@
             case 8: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
-                version_ = new java.util.ArrayList<java.lang.Integer>();
+                version_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000001;
               }
@@ -6104,5 +6104,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
-                version_ = new java.util.ArrayList<java.lang.Integer>();
+                version_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000001;
               }
@@ -6115,5 +6115,5 @@
             case 16: {
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
-                timestamp_ = new java.util.ArrayList<java.lang.Long>();
+                timestamp_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -6125,5 +6125,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
-                timestamp_ = new java.util.ArrayList<java.lang.Long>();
+                timestamp_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -6136,5 +6136,5 @@
             case 24: {
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
-                changeset_ = new java.util.ArrayList<java.lang.Long>();
+                changeset_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -6146,5 +6146,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
-                changeset_ = new java.util.ArrayList<java.lang.Long>();
+                changeset_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -6157,5 +6157,5 @@
             case 32: {
               if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
-                uid_ = new java.util.ArrayList<java.lang.Integer>();
+                uid_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000008;
               }
@@ -6167,5 +6167,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) {
-                uid_ = new java.util.ArrayList<java.lang.Integer>();
+                uid_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000008;
               }
@@ -6178,5 +6178,5 @@
             case 40: {
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
-                userSid_ = new java.util.ArrayList<java.lang.Integer>();
+                userSid_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000010;
               }
@@ -6188,5 +6188,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) {
-                userSid_ = new java.util.ArrayList<java.lang.Integer>();
+                userSid_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000010;
               }
@@ -6199,5 +6199,5 @@
             case 48: {
               if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
-                visible_ = new java.util.ArrayList<java.lang.Boolean>();
+                visible_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000020;
               }
@@ -6209,5 +6209,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) {
-                visible_ = new java.util.ArrayList<java.lang.Boolean>();
+                visible_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000020;
               }
@@ -6899,5 +6899,5 @@
       private void ensureVersionIsMutable() {
         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
-          version_ = new java.util.ArrayList<java.lang.Integer>(version_);
+          version_ = new java.util.ArrayList<>(version_);
           bitField0_ |= 0x00000001;
          }
@@ -6965,5 +6965,5 @@
       private void ensureTimestampIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
-          timestamp_ = new java.util.ArrayList<java.lang.Long>(timestamp_);
+          timestamp_ = new java.util.ArrayList<>(timestamp_);
           bitField0_ |= 0x00000002;
          }
@@ -7059,5 +7059,5 @@
       private void ensureChangesetIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
-          changeset_ = new java.util.ArrayList<java.lang.Long>(changeset_);
+          changeset_ = new java.util.ArrayList<>(changeset_);
           bitField0_ |= 0x00000004;
          }
@@ -7153,5 +7153,5 @@
       private void ensureUidIsMutable() {
         if (!((bitField0_ & 0x00000008) == 0x00000008)) {
-          uid_ = new java.util.ArrayList<java.lang.Integer>(uid_);
+          uid_ = new java.util.ArrayList<>(uid_);
           bitField0_ |= 0x00000008;
          }
@@ -7247,5 +7247,5 @@
       private void ensureUserSidIsMutable() {
         if (!((bitField0_ & 0x00000010) == 0x00000010)) {
-          userSid_ = new java.util.ArrayList<java.lang.Integer>(userSid_);
+          userSid_ = new java.util.ArrayList<>(userSid_);
           bitField0_ |= 0x00000010;
          }
@@ -7341,5 +7341,5 @@
       private void ensureVisibleIsMutable() {
         if (!((bitField0_ & 0x00000020) == 0x00000020)) {
-          visible_ = new java.util.ArrayList<java.lang.Boolean>(visible_);
+          visible_ = new java.util.ArrayList<>(visible_);
           bitField0_ |= 0x00000020;
          }
@@ -8081,5 +8081,5 @@
             case 16: {
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
-                keys_ = new java.util.ArrayList<java.lang.Integer>();
+                keys_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -8091,5 +8091,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
-                keys_ = new java.util.ArrayList<java.lang.Integer>();
+                keys_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -8102,5 +8102,5 @@
             case 24: {
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
-                vals_ = new java.util.ArrayList<java.lang.Integer>();
+                vals_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -8112,5 +8112,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
-                vals_ = new java.util.ArrayList<java.lang.Integer>();
+                vals_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -8702,5 +8702,5 @@
       private void ensureKeysIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
-          keys_ = new java.util.ArrayList<java.lang.Integer>(keys_);
+          keys_ = new java.util.ArrayList<>(keys_);
           bitField0_ |= 0x00000002;
          }
@@ -8796,5 +8796,5 @@
       private void ensureValsIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
-          vals_ = new java.util.ArrayList<java.lang.Integer>(vals_);
+          vals_ = new java.util.ArrayList<>(vals_);
           bitField0_ |= 0x00000004;
          }
@@ -9219,5 +9219,5 @@
             case 8: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
-                id_ = new java.util.ArrayList<java.lang.Long>();
+                id_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000001;
               }
@@ -9229,5 +9229,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
-                id_ = new java.util.ArrayList<java.lang.Long>();
+                id_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000001;
               }
@@ -9253,5 +9253,5 @@
             case 64: {
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
-                lat_ = new java.util.ArrayList<java.lang.Long>();
+                lat_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -9263,5 +9263,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
-                lat_ = new java.util.ArrayList<java.lang.Long>();
+                lat_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -9274,5 +9274,5 @@
             case 72: {
               if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
-                lon_ = new java.util.ArrayList<java.lang.Long>();
+                lon_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000008;
               }
@@ -9284,5 +9284,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) {
-                lon_ = new java.util.ArrayList<java.lang.Long>();
+                lon_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000008;
               }
@@ -9295,5 +9295,5 @@
             case 80: {
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
-                keysVals_ = new java.util.ArrayList<java.lang.Integer>();
+                keysVals_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000010;
               }
@@ -9305,5 +9305,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) {
-                keysVals_ = new java.util.ArrayList<java.lang.Integer>();
+                keysVals_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000010;
               }
@@ -9874,5 +9874,5 @@
       private void ensureIdIsMutable() {
         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
-          id_ = new java.util.ArrayList<java.lang.Long>(id_);
+          id_ = new java.util.ArrayList<>(id_);
           bitField0_ |= 0x00000001;
          }
@@ -10052,5 +10052,5 @@
       private void ensureLatIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
-          lat_ = new java.util.ArrayList<java.lang.Long>(lat_);
+          lat_ = new java.util.ArrayList<>(lat_);
           bitField0_ |= 0x00000004;
          }
@@ -10146,5 +10146,5 @@
       private void ensureLonIsMutable() {
         if (!((bitField0_ & 0x00000008) == 0x00000008)) {
-          lon_ = new java.util.ArrayList<java.lang.Long>(lon_);
+          lon_ = new java.util.ArrayList<>(lon_);
           bitField0_ |= 0x00000008;
          }
@@ -10240,5 +10240,5 @@
       private void ensureKeysValsIsMutable() {
         if (!((bitField0_ & 0x00000010) == 0x00000010)) {
-          keysVals_ = new java.util.ArrayList<java.lang.Integer>(keysVals_);
+          keysVals_ = new java.util.ArrayList<>(keysVals_);
           bitField0_ |= 0x00000010;
          }
@@ -10484,5 +10484,5 @@
             case 16: {
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
-                keys_ = new java.util.ArrayList<java.lang.Integer>();
+                keys_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -10494,5 +10494,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
-                keys_ = new java.util.ArrayList<java.lang.Integer>();
+                keys_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -10505,5 +10505,5 @@
             case 24: {
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
-                vals_ = new java.util.ArrayList<java.lang.Integer>();
+                vals_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -10515,5 +10515,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
-                vals_ = new java.util.ArrayList<java.lang.Integer>();
+                vals_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -10539,5 +10539,5 @@
             case 64: {
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
-                refs_ = new java.util.ArrayList<java.lang.Long>();
+                refs_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000010;
               }
@@ -10549,5 +10549,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) {
-                refs_ = new java.util.ArrayList<java.lang.Long>();
+                refs_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000010;
               }
@@ -11093,5 +11093,5 @@
       private void ensureKeysIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
-          keys_ = new java.util.ArrayList<java.lang.Integer>(keys_);
+          keys_ = new java.util.ArrayList<>(keys_);
           bitField0_ |= 0x00000002;
          }
@@ -11187,5 +11187,5 @@
       private void ensureValsIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
-          vals_ = new java.util.ArrayList<java.lang.Integer>(vals_);
+          vals_ = new java.util.ArrayList<>(vals_);
           bitField0_ |= 0x00000004;
          }
@@ -11313,5 +11313,5 @@
       private void ensureRefsIsMutable() {
         if (!((bitField0_ & 0x00000010) == 0x00000010)) {
-          refs_ = new java.util.ArrayList<java.lang.Long>(refs_);
+          refs_ = new java.util.ArrayList<>(refs_);
           bitField0_ |= 0x00000010;
          }
@@ -11595,5 +11595,5 @@
             case 16: {
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
-                keys_ = new java.util.ArrayList<java.lang.Integer>();
+                keys_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -11605,5 +11605,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
-                keys_ = new java.util.ArrayList<java.lang.Integer>();
+                keys_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000002;
               }
@@ -11616,5 +11616,5 @@
             case 24: {
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
-                vals_ = new java.util.ArrayList<java.lang.Integer>();
+                vals_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -11626,5 +11626,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
-                vals_ = new java.util.ArrayList<java.lang.Integer>();
+                vals_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000004;
               }
@@ -11650,5 +11650,5 @@
             case 64: {
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
-                rolesSid_ = new java.util.ArrayList<java.lang.Integer>();
+                rolesSid_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000010;
               }
@@ -11660,5 +11660,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) {
-                rolesSid_ = new java.util.ArrayList<java.lang.Integer>();
+                rolesSid_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000010;
               }
@@ -11671,5 +11671,5 @@
             case 72: {
               if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
-                memids_ = new java.util.ArrayList<java.lang.Long>();
+                memids_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000020;
               }
@@ -11681,5 +11681,5 @@
               int limit = input.pushLimit(length);
               if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) {
-                memids_ = new java.util.ArrayList<java.lang.Long>();
+                memids_ = new java.util.ArrayList<>();
                 mutable_bitField0_ |= 0x00000020;
               }
@@ -11698,5 +11698,5 @@
                 } else {
                 if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
-                  types_ = new java.util.ArrayList<crosby.binary.Osmformat.Relation.MemberType>();
+                  types_ = new java.util.ArrayList<>();
                   mutable_bitField0_ |= 0x00000040;
                 }
@@ -11716,5 +11716,5 @@
                   } else {
                   if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
-                    types_ = new java.util.ArrayList<crosby.binary.Osmformat.Relation.MemberType>();
+                    types_ = new java.util.ArrayList<>();
                     mutable_bitField0_ |= 0x00000040;
                   }
@@ -12464,5 +12464,5 @@
       private void ensureKeysIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
-          keys_ = new java.util.ArrayList<java.lang.Integer>(keys_);
+          keys_ = new java.util.ArrayList<>(keys_);
           bitField0_ |= 0x00000002;
          }
@@ -12558,5 +12558,5 @@
       private void ensureValsIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
-          vals_ = new java.util.ArrayList<java.lang.Integer>(vals_);
+          vals_ = new java.util.ArrayList<>(vals_);
           bitField0_ |= 0x00000004;
          }
@@ -12684,5 +12684,5 @@
       private void ensureRolesSidIsMutable() {
         if (!((bitField0_ & 0x00000010) == 0x00000010)) {
-          rolesSid_ = new java.util.ArrayList<java.lang.Integer>(rolesSid_);
+          rolesSid_ = new java.util.ArrayList<>(rolesSid_);
           bitField0_ |= 0x00000010;
          }
@@ -12778,5 +12778,5 @@
       private void ensureMemidsIsMutable() {
         if (!((bitField0_ & 0x00000020) == 0x00000020)) {
-          memids_ = new java.util.ArrayList<java.lang.Long>(memids_);
+          memids_ = new java.util.ArrayList<>(memids_);
           bitField0_ |= 0x00000020;
          }
@@ -12873,5 +12873,5 @@
       private void ensureTypesIsMutable() {
         if (!((bitField0_ & 0x00000040) == 0x00000040)) {
-          types_ = new java.util.ArrayList<crosby.binary.Osmformat.Relation.MemberType>(types_);
+          types_ = new java.util.ArrayList<>(types_);
           bitField0_ |= 0x00000040;
         }
Index: applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfReader.java
===================================================================
--- applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfReader.java	(revision 30736)
+++ applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfReader.java	(revision 30737)
@@ -137,5 +137,5 @@
                         // Each node's tags are encoded in alternating <key_id> <value_id>.
                         // A single stringid of 0 delimit when the tags of a node ends and the tags of the next node begin.
-                        Map<String, String> keys = new HashMap<String, String>();
+                        Map<String, String> keys = new HashMap<>();
                         while (keyIndex < nodes.getKeysValsCount()) {
                             int key_id = nodes.getKeysVals(keyIndex++);
@@ -172,5 +172,5 @@
                         checkTimestamp(info.getTimestamp());
                         node.setTimestamp(getDate(info));
-                        Map<String, String> keys = new HashMap<String, String>();
+                        Map<String, String> keys = new HashMap<>();
                         for (int i=0; i<n.getKeysCount(); i++) {
                             keys.put(getStringById(n.getKeys(i)), getStringById(n.getVals(i)));
@@ -197,5 +197,5 @@
                         checkTimestamp(info.getTimestamp());
                         way.setTimestamp(getDate(info));
-                        Map<String, String> keys = new HashMap<String, String>();
+                        Map<String, String> keys = new HashMap<>();
                         for (int i=0; i<w.getKeysCount(); i++) {
                             keys.put(getStringById(w.getKeys(i)), getStringById(w.getVals(i)));
@@ -203,5 +203,5 @@
                         way.setKeys(keys);
                         long previousId = 0; // Node ids are delta coded
-                        Collection<Long> nodeIds = new ArrayList<Long>();
+                        Collection<Long> nodeIds = new ArrayList<>();
                         for (Long id : w.getRefsList()) {
                             nodeIds.add(previousId+=id);
@@ -228,5 +228,5 @@
                         checkTimestamp(info.getTimestamp());
                         rel.setTimestamp(getDate(info));
-                        Map<String, String> keys = new HashMap<String, String>();
+                        Map<String, String> keys = new HashMap<>();
                         for (int i=0; i<r.getKeysCount(); i++) {
                             keys.put(getStringById(r.getKeys(i)), getStringById(r.getVals(i)));
@@ -234,5 +234,5 @@
                         rel.setKeys(keys);
                         long previousId = 0; // Member ids are delta coded
-                        Collection<RelationMemberData> members = new ArrayList<RelationMemberData>();
+                        Collection<RelationMemberData> members = new ArrayList<>();
                         for (int i = 0; i<r.getMemidsCount(); i++) {
                             long id = previousId+=r.getMemids(i);
Index: applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfWriter.java
===================================================================
--- applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfWriter.java	(revision 30736)
+++ applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfWriter.java	(revision 30737)
@@ -69,5 +69,5 @@
         private abstract class Prim<T extends OsmPrimitive> {
             /** Queue that tracks the list of all primitives. */
-            ArrayList<T> contents = new ArrayList<T>();
+            ArrayList<T> contents = new ArrayList<>();
 
             /**
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/DuplicateNodesFinder.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/DuplicateNodesFinder.java	(revision 30736)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/DuplicateNodesFinder.java	(revision 30737)
@@ -20,5 +20,5 @@
 	 */
 	public static Map<Point2D, Point2D> findDuplicateNodes(Collection<Point2D> nodes, final double tolerance){
-		List<Point2D> points = new ArrayList<Point2D>(nodes);
+		List<Point2D> points = new ArrayList<>(nodes);
 		Collections.sort(points, new Comparator<Point2D>(){
 			public int compare(Point2D o1, Point2D o2) {
@@ -28,6 +28,6 @@
 		});
 
-		Map<Point2D, Point2D> result = new HashMap<Point2D, Point2D>();
-		TreeMap<Point2D, Point2D> sweepLine = new TreeMap<Point2D, Point2D>(new Comparator<Point2D>(){
+		Map<Point2D, Point2D> result = new HashMap<>();
+		TreeMap<Point2D, Point2D> sweepLine = new TreeMap<>(new Comparator<Point2D>(){
 			public int compare(Point2D o1, Point2D o2) {
 				double diff = o1.getX() - o2.getX();
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/LayerContents.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/LayerContents.java	(revision 30736)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/LayerContents.java	(revision 30737)
@@ -10,7 +10,7 @@
 public class LayerContents{
 
-	List<Point2D> points = new ArrayList<Point2D>();
-	List<PdfPath> paths = new ArrayList<PdfPath>();
-	List<PdfMultiPath> multiPaths = new ArrayList<PdfMultiPath>();
+	List<Point2D> points = new ArrayList<>();
+	List<PdfPath> paths = new ArrayList<>();
+	List<PdfMultiPath> multiPaths = new ArrayList<>();
 	LayerInfo info;
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/OsmBuilder.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/OsmBuilder.java	(revision 30736)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/OsmBuilder.java	(revision 30737)
@@ -66,5 +66,5 @@
 
 	private void addLayer(DataSet target, LayerContents layer) {
-		Map<Point2D, Node> point2Node = new HashMap<Point2D, Node>();
+		Map<Point2D, Node> point2Node = new HashMap<>();
 
 		this.fillName = this.printColor(layer.info.fill);
@@ -82,5 +82,5 @@
 
 		//insert ways
-		Map<PdfPath, Way> path2Way = new HashMap<PdfPath, Way>();
+		Map<PdfPath, Way> path2Way = new HashMap<>();
 
 		for (PdfPath path: layer.paths){
@@ -105,5 +105,5 @@
 				Relation rel = new Relation();
 
-				Map<String, String> keys = new HashMap<String, String>();
+				Map<String, String> keys = new HashMap<>();
 				keys.put("type", "multipolygon");
 				keys.put("area", "yes");
@@ -128,5 +128,5 @@
 		this.monitorPos ++;
 
-		List<Node> nodes = new ArrayList<Node>(path.points.size());
+		List<Node> nodes = new ArrayList<>(path.points.size());
 
 		for (Point2D point: path.points) {
@@ -139,5 +139,5 @@
 		}
 
-		Map<String, String> keys = new HashMap<String, String>();
+		Map<String, String> keys = new HashMap<>();
 
 		if (this.mode != Mode.Draft) {
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/ParallelSegmentsFinder.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/ParallelSegmentsFinder.java	(revision 30736)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/ParallelSegmentsFinder.java	(revision 30737)
@@ -16,5 +16,5 @@
 	public double angleSum;
 	public int refCount;
-	public List<PdfPath> paths = new ArrayList<PdfPath>();
+	public List<PdfPath> paths = new ArrayList<>();
 
 	public void addPath(PdfPath path, double angle2) {
@@ -30,5 +30,5 @@
 		tr.rotate(-angle);
 
-		final Map<PdfPath, Point2D> positions = new HashMap<PdfPath, Point2D>();
+		final Map<PdfPath, Point2D> positions = new HashMap<>();
 		Point2D src = new Point2D.Double();
 
@@ -55,11 +55,11 @@
 
 		//process sweep
-		List<ParallelSegmentsFinder> result = new ArrayList<ParallelSegmentsFinder>();
+		List<ParallelSegmentsFinder> result = new ArrayList<>();
 
-		Map<PdfPath, ParallelSegmentsFinder> sweepLine = new HashMap<PdfPath, ParallelSegmentsFinder>();
+		Map<PdfPath, ParallelSegmentsFinder> sweepLine = new HashMap<>();
 
-		Set<ParallelSegmentsFinder> adjacentClustersSet = new HashSet<ParallelSegmentsFinder>();
-		List<ParallelSegmentsFinder> adjacentClusters = new ArrayList<ParallelSegmentsFinder>();
-		List<PdfPath> pathsToRemove = new ArrayList<PdfPath>();
+		Set<ParallelSegmentsFinder> adjacentClustersSet = new HashSet<>();
+		List<ParallelSegmentsFinder> adjacentClusters = new ArrayList<>();
+		List<PdfPath> pathsToRemove = new ArrayList<>();
 
 		for (PdfPath path: paths){
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/PathOptimizer.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/PathOptimizer.java	(revision 30736)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/PathOptimizer.java	(revision 30737)
@@ -27,8 +27,8 @@
 	public PathOptimizer(double _pointsTolerance, Color _color, boolean _splitOnColorChange)
 	{
-		uniquePointMap = new HashMap<Point2D, Point2D>();
-		uniquePoints = new ArrayList<Point2D>();
-		layerMap = new HashMap<LayerInfo, LayerContents>();
-		layers = new ArrayList<LayerContents>();
+		uniquePointMap = new HashMap<>();
+		uniquePoints = new ArrayList<>();
+		layerMap = new HashMap<>();
+		layers = new ArrayList<>();
 		pointsTolerance = _pointsTolerance;
 		color = _color;
@@ -67,5 +67,5 @@
 
 		//optimize the paths
-		Set<Point2D> points = new HashSet<Point2D>();
+		Set<Point2D> points = new HashSet<>();
 		for(PdfPath path: paths) {
 			points.addAll(path.points);
@@ -148,5 +148,5 @@
 
 	public void splitLayersBySimilarShapes(double tolerance) {
-		List<LayerContents> newLayers = new ArrayList<LayerContents>();
+		List<LayerContents> newLayers = new ArrayList<>();
 		for(LayerContents l: this.layers) {
 			List<LayerContents> splitResult = splitBySimilarGroups(l);
@@ -160,5 +160,5 @@
 
 	public void splitLayersByPathKind(boolean closed, boolean single, boolean orthogonal) {
-		List<LayerContents> newLayers = new ArrayList<LayerContents>();
+		List<LayerContents> newLayers = new ArrayList<>();
 		for(LayerContents l: this.layers) {
 			List<LayerContents> splitResult = splitBySegmentKind(l, closed, single, orthogonal);
@@ -211,6 +211,6 @@
 
 	private void finalizeLayer(LayerContents layer){
-		Set<Point2D> points = new HashSet<Point2D>();
-		layer.points = new ArrayList<Point2D>();
+		Set<Point2D> points = new HashSet<>();
+		layer.points = new ArrayList<>();
 
 		for(PdfPath pp: layer.paths){
@@ -242,5 +242,5 @@
 	private void fixPoints(LayerContents layer, Map<Point2D, Point2D> pointMap) {
 
-		List<PdfPath> newPaths = new ArrayList<PdfPath>(layer.paths.size());
+		List<PdfPath> newPaths = new ArrayList<>(layer.paths.size());
 
 		for(PdfPath path: layer.paths) {
@@ -265,5 +265,5 @@
 	private List<Point2D> fixPoints(List<Point2D> points, Map<Point2D, Point2D> pointMap) {
 
-		List<Point2D> newPoints = new ArrayList<Point2D>(points.size());
+		List<Point2D> newPoints = new ArrayList<>(points.size());
 		Point2D prevPoint = null;
 
@@ -287,5 +287,5 @@
 
 	private void removeSmallObjects(LayerContents layer, double min, double max) {
-		List<PdfPath> newPaths = new ArrayList<PdfPath>(layer.paths.size());
+		List<PdfPath> newPaths = new ArrayList<>(layer.paths.size());
 
 		for(PdfPath path: layer.paths) {
@@ -300,5 +300,5 @@
 		layer.paths = newPaths;
 
-		List<PdfMultiPath> newMPaths = new ArrayList<PdfMultiPath>(layer.multiPaths.size());
+		List<PdfMultiPath> newMPaths = new ArrayList<>(layer.multiPaths.size());
 
 		for (PdfMultiPath mp: layer.multiPaths){
@@ -341,5 +341,5 @@
 
 		//filter paths by direction
-		List<ParallelSegmentsFinder> angles = new ArrayList<ParallelSegmentsFinder>();
+		List<ParallelSegmentsFinder> angles = new ArrayList<>();
 
 		for(PdfPath path: layer.paths) {
@@ -371,5 +371,5 @@
 		}
 
-		Set<PdfPath> pathsToRemove = new HashSet<PdfPath>();
+		Set<PdfPath> pathsToRemove = new HashSet<>();
 
 		//process each direction
@@ -389,5 +389,5 @@
 
 		//generate new path list
-		List<PdfPath> result = new ArrayList<PdfPath>(layer.paths.size() - pathsToRemove.size());
+		List<PdfPath> result = new ArrayList<>(layer.paths.size() - pathsToRemove.size());
 
 		for(PdfPath path: layer.paths) {
@@ -406,7 +406,7 @@
 	 */
 	private void concatenatePaths(LayerContents layer) {
-		Map<Point2D, List<PdfPath>> pathEndpoints = new HashMap<Point2D, List<PdfPath>>();
-		Set<PdfPath> mergedPaths = new HashSet<PdfPath>();
-		List<PdfPath> newPaths = new ArrayList<PdfPath>();
+		Map<Point2D, List<PdfPath>> pathEndpoints = new HashMap<>();
+		Set<PdfPath> mergedPaths = new HashSet<>();
+		List<PdfPath> newPaths = new ArrayList<>();
 
 		//fill pathEndpoints map
@@ -419,5 +419,5 @@
 			List<PdfPath> paths = pathEndpoints.get(pp.firstPoint());
 			if (paths == null){
-				paths = new ArrayList<PdfPath>(2);
+				paths = new ArrayList<>(2);
 				pathEndpoints.put(pp.firstPoint(), paths);
 			}
@@ -426,5 +426,5 @@
 			paths = pathEndpoints.get(pp.lastPoint());
 			if (paths == null){
-				paths = new ArrayList<PdfPath>(2);
+				paths = new ArrayList<>(2);
 				pathEndpoints.put(pp.lastPoint(), paths);
 			}
@@ -432,6 +432,6 @@
 		}
 
-		List<PdfPath> pathChain = new ArrayList<PdfPath>(2);
-		Set<Point2D> pointsInPath = new HashSet<Point2D>();
+		List<PdfPath> pathChain = new ArrayList<>(2);
+		Set<Point2D> pointsInPath = new HashSet<>();
 
 		//join the paths
@@ -567,5 +567,5 @@
 	private boolean isSubpathOf(PdfPath main, PdfPath sub) {
 
-		Set<Point2D> points = new HashSet<Point2D>(main.points);
+		Set<Point2D> points = new HashSet<>(main.points);
 
 		for(Point2D point: sub.points) {
@@ -586,9 +586,9 @@
 		OrthogonalShapesFilter of = new OrthogonalShapesFilter(10);
 
-		List<PdfPath> singleSegmentPaths = new ArrayList<PdfPath>();
-		List<PdfPath> multiSegmentPaths = new ArrayList<PdfPath>();
-		List<PdfPath> closedPaths = new ArrayList<PdfPath>();
-		List<PdfPath> orthogonalPaths = new ArrayList<PdfPath>();
-		List<PdfPath> orthogonalClosedPaths = new ArrayList<PdfPath>();
+		List<PdfPath> singleSegmentPaths = new ArrayList<>();
+		List<PdfPath> multiSegmentPaths = new ArrayList<>();
+		List<PdfPath> closedPaths = new ArrayList<>();
+		List<PdfPath> orthogonalPaths = new ArrayList<>();
+		List<PdfPath> orthogonalClosedPaths = new ArrayList<>();
 
 		for(PdfPath path: layer.paths) {
@@ -621,5 +621,5 @@
 		}
 
-		List<LayerContents> layers = new ArrayList<LayerContents>();
+		List<LayerContents> layers = new ArrayList<>();
 
 		if (multiSegmentPaths.size() > 0) {
@@ -665,5 +665,5 @@
 
 	private List<LayerContents> splitBySimilarGroups(LayerContents layer) {
-		List<List<PdfPath>> subparts = new ArrayList<List<PdfPath>>();
+		List<List<PdfPath>> subparts = new ArrayList<>();
 
 		//split into similar parts
@@ -680,5 +680,5 @@
 
 			if (sublayer == null) {
-				sublayer = new ArrayList<PdfPath>();
+				sublayer = new ArrayList<>();
 				subparts.add(sublayer);
 			}
@@ -690,6 +690,6 @@
 		int minGroupTreshold = 10;
 
-		List<PdfPath> independantPaths = new ArrayList<PdfPath>();
-		List<LayerContents> result = new ArrayList<LayerContents>();
+		List<PdfPath> independantPaths = new ArrayList<>();
+		List<LayerContents> result = new ArrayList<>();
 
 		for(List<PdfPath> list: subparts){
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/ProjectionInfo.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/ProjectionInfo.java	(revision 30736)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/ProjectionInfo.java	(revision 30737)
@@ -11,6 +11,6 @@
 
 public class ProjectionInfo {
-    private static Map<String, ProjectionChoice> allCodesPC = new HashMap<String, ProjectionChoice>();
-    private static Map<String, Projection> allCodes = new HashMap<String, Projection>();
+    private static Map<String, ProjectionChoice> allCodesPC = new HashMap<>();
+    private static Map<String, Projection> allCodes = new HashMap<>();
 
     static {
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/GraphicsProcessor.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/GraphicsProcessor.java	(revision 30736)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/GraphicsProcessor.java	(revision 30737)
@@ -76,6 +76,6 @@
 
 	private List<PdfPath> parsePath(Shape s, boolean closed) {
-		List<PdfPath> result = new ArrayList<PdfPath>(2);
-		List<Point2D> points = new ArrayList<Point2D>(2);
+		List<PdfPath> result = new ArrayList<>(2);
+		List<Point2D> points = new ArrayList<>(2);
 
 		PathIterator iter = s.getPathIterator(null);
@@ -91,5 +91,5 @@
 					result.add(new PdfPath(points));
 				}
-				points = new ArrayList<Point2D>(2);
+				points = new ArrayList<>(2);
 			} else if (type == PathIterator.SEG_CUBICTO) {
 				//cubic curve
@@ -104,5 +104,5 @@
 					result.add(new PdfPath(points));
 				}
-				points = new ArrayList<Point2D>(2);
+				points = new ArrayList<>(2);
 				this.addPoint(points, this.parsePoint(coords, 0));
 			}
Index: applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java
===================================================================
--- applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java	(revision 30736)
+++ applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java	(revision 30737)
@@ -63,5 +63,5 @@
         GeoImageLayer layer = getLayer();
 
-        final List<ImageEntry> images = new ArrayList<ImageEntry>();
+        final List<ImageEntry> images = new ArrayList<>();
         for (ImageEntry e : layer.getImages()) {
              /* Only write lat/lon to the file, if the position is known and
Index: applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java
===================================================================
--- applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java	(revision 30736)
+++ applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java	(revision 30737)
@@ -213,5 +213,5 @@
      */
     private List<GeoImageLayer> getVisibleGeoImageLayers() {
-        List<GeoImageLayer> all = new ArrayList<GeoImageLayer>(Main.map.mapView.getLayersOfType(GeoImageLayer.class));
+        List<GeoImageLayer> all = new ArrayList<>(Main.map.mapView.getLayersOfType(GeoImageLayer.class));
         Iterator<GeoImageLayer> it = all.iterator();
         while (it.hasNext()) {
Index: applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustPlugin.java
===================================================================
--- applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustPlugin.java	(revision 30737)
@@ -49,5 +49,5 @@
             public void mousePressed(MouseEvent evt) {
                 if (imageLayer != null) {
-                    List<GeoImageLayer> layers = new ArrayList<GeoImageLayer>(1);
+                    List<GeoImageLayer> layers = new ArrayList<>(1);
                     layers.add(imageLayer);
                     worker.doMousePressed(evt, layers);
Index: applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/UntaggedGeoImageLayerAction.java
===================================================================
--- applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/UntaggedGeoImageLayerAction.java	(revision 30736)
+++ applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/UntaggedGeoImageLayerAction.java	(revision 30737)
@@ -41,5 +41,5 @@
         GeoImageLayer layer = getSelectedLayer();
         if (layer != null) {
-            List<ImageEntry> untagged = new ArrayList<ImageEntry>();
+            List<ImageEntry> untagged = new ArrayList<>();
             List<ImageEntry> images = layer.getImages();
             ImageEntry img;
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java	(revision 30737)
@@ -100,5 +100,5 @@
             // Create plugin buttons and add them to the toolbar
 
-            buttonList = new ArrayList<IconToggleButton>(7);
+            buttonList = new ArrayList<>(7);
             buttonList.add(picLayerActionButtonFactory(movePictureAction));
             buttonList.add(picLayerActionButtonFactory(movePointAction));
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java	(revision 30736)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java	(revision 30737)
@@ -60,5 +60,5 @@
 
         public ImageFileFilter() {
-            List<String> extensions = new ArrayList<String>();
+            List<String> extensions = new ArrayList<>();
             extensions.add("zip");
             extensions.add("kml");
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/kml/KMLReader.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/kml/KMLReader.java	(revision 30736)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/kml/KMLReader.java	(revision 30737)
@@ -52,5 +52,5 @@
 
     public KMLHandler() {
-        result = new ArrayList<KMLGroundOverlay>();
+        result = new ArrayList<>();
     }
 
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/transform/PictureTransform.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/transform/PictureTransform.java	(revision 30736)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/transform/PictureTransform.java	(revision 30737)
@@ -27,5 +27,5 @@
     public PictureTransform() {
         cachedTransform = new AffineTransform();
-        originPoints = new ArrayList<Point2D>(3);
+        originPoints = new ArrayList<>(3);
     }
 
@@ -73,5 +73,5 @@
         case 2: {
             // find triangle and move it
-            List<Point2D> desiredPoints = new ArrayList<Point2D>(3);
+            List<Point2D> desiredPoints = new ArrayList<>(3);
             Point2D o1 = originPoints.get(0);
             Point2D o2 = originPoints.get(1);
@@ -93,5 +93,5 @@
         }
         case 3: {
-            List<Point2D> desiredPoints = new ArrayList<Point2D>(3);
+            List<Point2D> desiredPoints = new ArrayList<>(3);
 
             for (Point2D origin : originPoints) {
@@ -185,5 +185,5 @@
 
     public void setOriginPoints(List<Point2D> list) {
-        this.originPoints = new ArrayList<Point2D>(list);
+        this.originPoints = new ArrayList<>(list);
     }
 
Index: applications/editors/josm/plugins/poly/src/poly/PolyExporter.java
===================================================================
--- applications/editors/josm/plugins/poly/src/poly/PolyExporter.java	(revision 30736)
+++ applications/editors/josm/plugins/poly/src/poly/PolyExporter.java	(revision 30737)
@@ -40,5 +40,5 @@
             try {
                 DataSet ds = ((OsmDataLayer)layer).data;
-                Map<Way, Boolean> ways = new TreeMap<Way, Boolean>();
+                Map<Way, Boolean> ways = new TreeMap<>();
                 String polygonName = file.getName();
                 if( polygonName.indexOf('.') > 0 )
@@ -91,6 +91,6 @@
 
     private Map<Way, Boolean> sortOuterInner( Map<Way, Boolean> ways ) {
-        LinkedHashMap<Way, Boolean> result = new LinkedHashMap<Way, Boolean>(ways.size());
-        List<Way> inner = new ArrayList<Way>();
+        LinkedHashMap<Way, Boolean> result = new LinkedHashMap<>(ways.size());
+        List<Way> inner = new ArrayList<>();
         for( Way w : ways.keySet() ) {
             Boolean outer = ways.get(w);
Index: applications/editors/josm/plugins/poly/src/poly/PolyImporter.java
===================================================================
--- applications/editors/josm/plugins/poly/src/poly/PolyImporter.java	(revision 30736)
+++ applications/editors/josm/plugins/poly/src/poly/PolyImporter.java	(revision 30737)
@@ -72,5 +72,5 @@
         if( name == null || name.trim().length() == 0 )
             throw new IllegalDataException(tr("The file must begin with a polygon name"));
-        List<Area> areas = new ArrayList<Area>();
+        List<Area> areas = new ArrayList<>();
         Area area = null;
         boolean parsingSection = false;
@@ -177,5 +177,5 @@
             if( !outer )
                 this.name = this.name.substring(1);
-            nodes = new ArrayList<LatLon>();
+            nodes = new ArrayList<>();
             way = null;
             polygonName = null;
Index: applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintDialog.java
===================================================================
--- applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintDialog.java	(revision 30737)
@@ -475,5 +475,5 @@
         PrintService service = job.getPrintService();
         if (service != null) {
-            Collection<Collection<String>> serviceAttributes = new ArrayList<Collection<String>>();
+            Collection<Collection<String>> serviceAttributes = new ArrayList<>();
             for (Attribute a : service.getAttributes().toArray()) {
                 if ("printer-name".equals(a.getName()) && a instanceof TextSyntax) {
@@ -486,5 +486,5 @@
         // Save all request attributes
         Collection<String> ignoredAttributes = Arrays.asList("media-printable-area");
-        Collection<Collection<String>> requestAttributes = new ArrayList<Collection<String>>();
+        Collection<Collection<String>> requestAttributes = new ArrayList<>();
         for (Attribute a : attrs.toArray()) {
             Collection<String> setting = null;
@@ -507,5 +507,5 @@
     
     protected Collection<String> marshallPrintSetting(Attribute a, Class<?> syntaxClass, String value) {
-        return new ArrayList<String>(Arrays.asList(a.getCategory().getName(), a.getClass().getName(), syntaxClass.getName(), value));
+        return new ArrayList<>(Arrays.asList(a.getCategory().getName(), a.getClass().getName(), syntaxClass.getName(), value));
     }
     
Index: applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintableMapView.java
===================================================================
--- applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintableMapView.java	(revision 30736)
+++ applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintableMapView.java	(revision 30737)
@@ -412,5 +412,5 @@
     @Override
     protected List<Layer> getVisibleLayersInZOrder() {
-        ArrayList<Layer> layers = new ArrayList<Layer>();
+        ArrayList<Layer> layers = new ArrayList<>();
         for (Layer l: mapView.getAllLayersAsList()) {
             if (l.isVisible()) {
Index: applications/editors/josm/plugins/proj4j/src/org/openstreetmap/josm/plugins/proj4j/Proj4JProjectionChoice.java
===================================================================
--- applications/editors/josm/plugins/proj4j/src/org/openstreetmap/josm/plugins/proj4j/Proj4JProjectionChoice.java	(revision 30736)
+++ applications/editors/josm/plugins/proj4j/src/org/openstreetmap/josm/plugins/proj4j/Proj4JProjectionChoice.java	(revision 30737)
@@ -62,5 +62,5 @@
         }
 
-        sorter = new TableRowSorter<CRSTableModel>(model);
+        sorter = new TableRowSorter<>(model);
     }
     
@@ -254,5 +254,5 @@
 
         private String[] columnNames = {tr("Code"), tr("Description")};
-        private ArrayList<CRSEntry> crsList = new ArrayList<CRSEntry>();
+        private ArrayList<CRSEntry> crsList = new ArrayList<>();
 
         public CRSTableModel() throws java.io.IOException {
Index: applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/CoordinateTransform.java
===================================================================
--- applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/CoordinateTransform.java	(revision 30736)
+++ applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/CoordinateTransform.java	(revision 30737)
@@ -1,5 +1,3 @@
 package org.osgeo.proj4j;
-
-import org.osgeo.proj4j.datum.*;
 
 /**
Index: applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/CoordinateTransformFactory.java
===================================================================
--- applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/CoordinateTransformFactory.java	(revision 30736)
+++ applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/CoordinateTransformFactory.java	(revision 30737)
@@ -1,5 +1,3 @@
 package org.osgeo.proj4j;
-
-import org.osgeo.proj4j.datum.Datum;
 
 /**
Index: applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/cmd/MetaCRSTestCmd.java
===================================================================
--- applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/cmd/MetaCRSTestCmd.java	(revision 30736)
+++ applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/cmd/MetaCRSTestCmd.java	(revision 30737)
@@ -44,5 +44,5 @@
   private static CRSFactory csFactory = new CRSFactory();
 
-  private List<String> filenames = new ArrayList<String>();
+  private List<String> filenames = new ArrayList<>();
   private boolean verbose = false;
   
Index: applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/io/MetaCRSTestFileReader.java
===================================================================
--- applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/io/MetaCRSTestFileReader.java	(revision 30736)
+++ applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/io/MetaCRSTestFileReader.java	(revision 30737)
@@ -48,5 +48,5 @@
   throws IOException
   {
-    List<MetaCRSTestCase> tests = new ArrayList<MetaCRSTestCase>();
+    List<MetaCRSTestCase> tests = new ArrayList<>();
     boolean isHeaderRead = false;
     while (true) {
Index: applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/parser/Proj4Keyword.java
===================================================================
--- applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/parser/Proj4Keyword.java	(revision 30736)
+++ applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/parser/Proj4Keyword.java	(revision 30737)
@@ -57,5 +57,5 @@
   {
     if (supportedParams == null) {
-      supportedParams = new TreeSet<String>();
+      supportedParams = new TreeSet<>();
       
       supportedParams.add(a);
Index: applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/parser/Proj4Parser.java
===================================================================
--- applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/parser/Proj4Parser.java	(revision 30736)
+++ applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/parser/Proj4Parser.java	(revision 30737)
@@ -10,5 +10,4 @@
 import org.osgeo.proj4j.proj.TransverseMercatorProjection;
 import org.osgeo.proj4j.units.Angle;
-import org.osgeo.proj4j.units.AngleFormat;
 import org.osgeo.proj4j.units.Unit;
 import org.osgeo.proj4j.units.Units;
Index: applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/proj/ObliqueStereographicAlternativeProjection.java
===================================================================
--- applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/proj/ObliqueStereographicAlternativeProjection.java	(revision 30736)
+++ applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/proj/ObliqueStereographicAlternativeProjection.java	(revision 30737)
@@ -21,6 +21,4 @@
 
 import org.osgeo.proj4j.ProjCoordinate;
-import org.osgeo.proj4j.ProjectionException;
-import org.osgeo.proj4j.util.ProjectionMath;
 
 public class ObliqueStereographicAlternativeProjection extends GaussProjection {
Index: applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/proj/SwissObliqueMercatorProjection.java
===================================================================
--- applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/proj/SwissObliqueMercatorProjection.java	(revision 30736)
+++ applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/proj/SwissObliqueMercatorProjection.java	(revision 30737)
@@ -22,5 +22,4 @@
 import org.osgeo.proj4j.ProjCoordinate;
 import org.osgeo.proj4j.ProjectionException;
-import org.osgeo.proj4j.datum.Ellipsoid;
 import org.osgeo.proj4j.util.ProjectionMath;
 
Index: applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/util/CRSCache.java
===================================================================
--- applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/util/CRSCache.java	(revision 30736)
+++ applications/editors/josm/plugins/proj4j/src/org/osgeo/proj4j/util/CRSCache.java	(revision 30737)
@@ -7,5 +7,5 @@
 public class CRSCache 
 {
-  private static Map<String, CoordinateReferenceSystem> projCache = new HashMap<String, CoordinateReferenceSystem>();
+  private static Map<String, CoordinateReferenceSystem> projCache = new HashMap<>();
   private static CRSFactory crsFactory = new CRSFactory();
 
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/ChosenRelation.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/ChosenRelation.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/ChosenRelation.java	(revision 30737)
@@ -20,5 +20,5 @@
 public class ChosenRelation implements EditLayerChangeListener, MapViewPaintable, DataSetListener {
     protected Relation chosenRelation = null;
-    private Set<ChosenRelationListener> chosenRelationListeners = new HashSet<ChosenRelationListener>();
+    private Set<ChosenRelationListener> chosenRelationListeners = new HashSet<>();
 
     public void set( Relation rel ) {
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/RelContextDialog.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/RelContextDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/RelContextDialog.java	(revision 30737)
@@ -358,5 +358,5 @@
             return;
 
-        Set<Relation> relations = new TreeSet<Relation>(
+        Set<Relation> relations = new TreeSet<>(
                 DefaultNameFormatter.getInstance().getRelationComparator());
         for( OsmPrimitive element : newSelection ) {
@@ -415,5 +415,5 @@
 
     private static Map<String, List<String>> loadRoles() {
-        Map<String, List<String>> result = new HashMap<String, List<String>>();
+        Map<String, List<String>> result = new HashMap<>();
         try {
             ClassLoader classLoader = RelContextDialog.class.getClassLoader();
@@ -425,5 +425,5 @@
                 if( t.hasMoreTokens() ) {
                     String type = t.nextToken();
-                    List<String> roles = new ArrayList<String>();
+                    List<String> roles = new ArrayList<>();
                     while( t.hasMoreTokens() )
                         roles.add(t.nextToken());
@@ -442,5 +442,5 @@
         JPanel panel = new JPanel(new GridBagLayout());
 
-        List<String> items = new ArrayList<String>();
+        List<String> items = new ArrayList<>();
         for( String role : roleBoxModel.getRoles() ) {
             if( role.length() > 1 )
@@ -527,5 +527,5 @@
             Collection<OsmPrimitive> selected = Main.main.getCurrentDataSet().getSelected();
             Relation r = chosenRelation.get();
-            List<Command> commands = new ArrayList<Command>();
+            List<Command> commands = new ArrayList<>();
             for( int i = 0; i < r.getMembersCount(); i++ ) {
                 RelationMember m = r.getMember(i);
@@ -623,5 +623,5 @@
         
     private class RoleComboBoxModel extends AbstractListModel<String> implements ComboBoxModel<String> {
-        private List<String> roles = new ArrayList<String>();
+        private List<String> roles = new ArrayList<>();
         private int selectedIndex = -1;
         private JComboBox<String> combobox;
@@ -646,5 +646,5 @@
                 combobox.setEnabled(true);
 
-            List<String> items = new ArrayList<String>();
+            List<String> items = new ArrayList<>();
             if( chosenRelation != null && chosenRelation.get() != null ) {
                 if( chosenRelation.isMultipolygon() ) {
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/AddRemoveMemberAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/AddRemoveMemberAction.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/AddRemoveMemberAction.java	(revision 30737)
@@ -52,5 +52,5 @@
         Relation r = new Relation(rel.get());
 
-        Collection<OsmPrimitive> toAdd = new ArrayList<OsmPrimitive>(getCurrentDataSet().getSelected());
+        Collection<OsmPrimitive> toAdd = new ArrayList<>(getCurrentDataSet().getSelected());
         toAdd.remove(rel.get());
         toAdd.removeAll(r.getMemberPrimitives());
@@ -132,5 +132,5 @@
             state = 0;
         else {
-            Collection<OsmPrimitive> toAdd = new ArrayList<OsmPrimitive>(getCurrentDataSet().getSelected());
+            Collection<OsmPrimitive> toAdd = new ArrayList<>(getCurrentDataSet().getSelected());
             toAdd.remove(rel.get());
             int selectedSize = toAdd.size();
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/CreateMultipolygonAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/CreateMultipolygonAction.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/CreateMultipolygonAction.java	(revision 30737)
@@ -69,5 +69,5 @@
 	    } else {
 		if( TheRing.areAllOfThoseRings(selectedWays) ) {
-		    List<Command> commands = new ArrayList<Command>();
+		    List<Command> commands = new ArrayList<>();
 		    rels = TheRing.makeManySimpleMultipolygons(getCurrentDataSet().getSelectedWays(), commands);
 		    if( !commands.isEmpty() )
@@ -108,5 +108,5 @@
 	if( !list.isEmpty() && isBoundary ) {
 	    Main.main.undoRedo.add(new SequenceCommand(tr("Move tags from ways to relation"), list));
-	    list = new ArrayList<Command>();
+	    list = new ArrayList<>();
 	}
 	if( isBoundary ) {
@@ -179,5 +179,5 @@
      */
     private List<Command> fixWayTagsForBoundary( Relation rel ) {
-	List<Command> commands = new ArrayList<Command>();
+	List<Command> commands = new ArrayList<>();
 	if( !rel.hasKey("boundary") || !rel.hasKey("admin_level") )
 	    return commands;
@@ -189,6 +189,6 @@
 	    return commands;
 	}
-	Set<OsmPrimitive> waysBoundary = new HashSet<OsmPrimitive>();
-	Set<OsmPrimitive> waysAdminLevel = new HashSet<OsmPrimitive>();
+	Set<OsmPrimitive> waysBoundary = new HashSet<>();
+	Set<OsmPrimitive> waysAdminLevel = new HashSet<>();
 	for( OsmPrimitive p : rel.getMemberPrimitives() ) {
 	    if( p instanceof Way ) {
@@ -222,5 +222,5 @@
     }
     static public final List<String> DEFAULT_LINEAR_TAGS = Arrays.asList(new String[] {"barrier", "source"});
-    private static final Set<String> REMOVE_FROM_BOUNDARY_TAGS = new TreeSet<String>(Arrays.asList(new String[] {
+    private static final Set<String> REMOVE_FROM_BOUNDARY_TAGS = new TreeSet<>(Arrays.asList(new String[] {
 		"boundary", "boundary_type", "type", "admin_level"
 	    }));
@@ -232,5 +232,5 @@
      */
     private List<Command> removeTagsFromInnerWays( Relation relation ) {
-	Map<String, String> values = new HashMap<String, String>();
+	Map<String, String> values = new HashMap<>();
 
 	if( relation.hasKeys() ) {
@@ -240,8 +240,8 @@
 	}
 
-	List<Way> innerWays = new ArrayList<Way>();
-	List<Way> outerWays = new ArrayList<Way>();
-
-	Set<String> conflictingKeys = new TreeSet<String>();
+	List<Way> innerWays = new ArrayList<>();
+	List<Way> outerWays = new ArrayList<>();
+
+	Set<String> conflictingKeys = new TreeSet<>();
 
 	for( RelationMember m : relation.getMembers() ) {
@@ -284,5 +284,5 @@
 	String name = values.get("name");
 	if( isBoundary ) {
-	    Set<String> keySet = new TreeSet<String>(values.keySet());
+	    Set<String> keySet = new TreeSet<>(values.keySet());
 	    for( String key : keySet )
 		if( !REMOVE_FROM_BOUNDARY_TAGS.contains(key) )
@@ -292,9 +292,9 @@
 	values.put("area", "yes");
 
-	List<Command> commands = new ArrayList<Command>();
+	List<Command> commands = new ArrayList<>();
 	boolean moveTags = getPref("tags");
 
 	for( String key : values.keySet() ) {
-	    List<OsmPrimitive> affectedWays = new ArrayList<OsmPrimitive>();
+	    List<OsmPrimitive> affectedWays = new ArrayList<>();
 	    String value = values.get(key);
 
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadChosenRelationAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadChosenRelationAction.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadChosenRelationAction.java	(revision 30737)
@@ -68,5 +68,5 @@
     protected void downloadIncomplete( Relation rel ) {
         if( rel.isNew() ) return;
-        Set<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         ret.addAll(rel.getIncompleteMembers());
         if( ret.isEmpty() ) return;
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadParentsAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadParentsAction.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadParentsAction.java	(revision 30737)
@@ -43,5 +43,5 @@
         Relation relation = rel.get();
         if( relation == null ) return;
-        List<OsmPrimitive> objects = new ArrayList<OsmPrimitive>();
+        List<OsmPrimitive> objects = new ArrayList<>();
         objects.add(relation);
         objects.addAll(relation.getMemberPrimitives());
@@ -61,5 +61,5 @@
     protected void downloadIncomplete( Relation rel ) {
         if( rel.isNew() ) return;
-        Set<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         ret.addAll(rel.getIncompleteMembers());
         if( ret.isEmpty() ) return;
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/FindRelationAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/FindRelationAction.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/FindRelationAction.java	(revision 30737)
@@ -123,5 +123,5 @@
         String[] keywords = filter == null ? new String[0] : filter.split("\\s+");
         if( keywords.length > 0 ) {
-            List<String> filteredKeywords = new ArrayList<String>(keywords.length);
+            List<String> filteredKeywords = new ArrayList<>(keywords.length);
             for( String s : keywords )
                 if( s.length() > 0 )
@@ -134,5 +134,5 @@
             System.out.println("keyword["+i+"] = " + keywords[i]);
 
-        List<Relation> relations = new ArrayList<Relation>();
+        List<Relation> relations = new ArrayList<>();
         if( getEditLayer() != null ) {
             for( Relation r : getEditLayer().data.getRelations() ) {
@@ -168,5 +168,5 @@
      */
     protected class FindRelationListModel extends AbstractListModel<Relation> {
-        private final ArrayList<Relation> relations = new ArrayList<Relation>();
+        private final ArrayList<Relation> relations = new ArrayList<>();
         private DefaultListSelectionModel selectionModel;
 
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java	(revision 30737)
@@ -55,5 +55,5 @@
     public void actionPerformed( ActionEvent e ) {
         Relation r = rel.get();
-	List<Way> ways = new ArrayList<Way>();
+	List<Way> ways = new ArrayList<>();
 	boolean wont = false;
 	for( RelationMember m : r.getMembers() ) {
@@ -81,6 +81,6 @@
 	
 	rel.clear();
-	List<Way> newSelection = new ArrayList<Way>();
-	List<Command> commands = new ArrayList<Command>();
+	List<Way> newSelection = new ArrayList<>();
+	List<Command> commands = new ArrayList<>();
         Command c = DeleteCommand.delete(Main.main.getEditLayer(), Collections.singleton(r), true, true);
         if( c == null )
@@ -92,5 +92,5 @@
 	    Map<String, String> tags = p.ways.get(0).getKeys();
 	    List<OsmPrimitive> relations = p.ways.get(0).getReferrers();
-	    Set<String> noTags = new HashSet<String>(r.keySet());
+	    Set<String> noTags = new HashSet<>(r.keySet());
 	    for( int i = 1; i < p.ways.size(); i++ ) {
 		Way w = p.ways.get(i);
@@ -115,5 +115,5 @@
 		if( w.getReferrers().equals(relations) ) {
 		    // check tags that remain
-		    Set<String> keys = new HashSet<String>(w.keySet());
+		    Set<String> keys = new HashSet<>(w.keySet());
 		    keys.removeAll(tags.keySet());
 		    keys.removeAll(IRRELEVANT_KEYS);
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/RelationHelpAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/RelationHelpAction.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/RelationHelpAction.java	(revision 30737)
@@ -43,5 +43,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<>();
             String type = URLEncoder.encode(rel.get().get("type"), "UTF-8");
 
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SortAndFixAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SortAndFixAction.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SortAndFixAction.java	(revision 30737)
@@ -39,5 +39,5 @@
 
         // construct all available fixers
-        fixers = new ArrayList<RelationFixer>();
+        fixers = new ArrayList<>();
         //should be before multipolygon as takes special case of multipolygon relation - boundary
         fixers.add(new BoundaryFixer()); // boundary, multipolygon, boundary=administrative
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SplittingMultipolygons.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SplittingMultipolygons.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SplittingMultipolygons.java	(revision 30737)
@@ -24,6 +24,6 @@
 
     public static boolean canProcess( Collection<Way> ways ) {
-	List<Way> rings = new ArrayList<Way>();
-	List<Way> arcs = new ArrayList<Way>();
+	List<Way> rings = new ArrayList<>();
+	List<Way> arcs = new ArrayList<>();
 	Area a = Main.main.getCurrentDataSet().getDataSourceArea();
 	for( Way way : ways ) {
@@ -70,7 +70,7 @@
     public static List<Relation> process( Collection<Way> selectedWays ) {
 //	System.out.println("---------------------------------------");
-	List<Relation> result = new ArrayList<Relation>();
-	List<Way> rings = new ArrayList<Way>();
-	List<Way> arcs = new ArrayList<Way>();
+	List<Relation> result = new ArrayList<>();
+	List<Way> rings = new ArrayList<>();
+	List<Way> arcs = new ArrayList<>();
 	for( Way way : selectedWays ) {
 	    if( way.isClosed() )
@@ -81,5 +81,5 @@
 
 	for( Way ring : rings ) {
-	    List<Command> commands = new ArrayList<Command>();
+	    List<Command> commands = new ArrayList<>();
 	    Relation newRelation = SplittingMultipolygons.attachRingToNeighbours(ring, commands);
 	    if( newRelation != null && !commands.isEmpty() ) {
@@ -90,5 +90,5 @@
 
 	for( Way arc : arcs) {
-	    List<Command> commands = new ArrayList<Command>();
+	    List<Command> commands = new ArrayList<>();
 	    Relation newRelation = SplittingMultipolygons.tryToCloseOneWay(arc, commands);
 	    if( newRelation != null && !commands.isEmpty() ) {
@@ -105,5 +105,5 @@
     private static void closePolygon( List<Node> base, List<Node> append ) {
 	if( append.get(0).equals(base.get(0)) && append.get(append.size() - 1).equals(base.get(base.size() - 1)) ) {
-	    List<Node> ap2 = new ArrayList<Node>(append);
+	    List<Node> ap2 = new ArrayList<>(append);
 	    Collections.reverse(ap2);
 	    append = ap2;
@@ -131,5 +131,5 @@
      */
     public static List<Way> splitWay( Way w, Node n1, Node n2, List<Command> commands ) {
-	List<Node> nodes = new ArrayList<Node>(w.getNodes());
+	List<Node> nodes = new ArrayList<>(w.getNodes());
 	if( w.isClosed() )
 	    nodes.remove(nodes.size() - 1);
@@ -150,11 +150,11 @@
 
 	// make a list of segments
-	List<List<Node>> chunks = new ArrayList<List<Node>>(2);
-	List<Node> chunk = new ArrayList<Node>();
+	List<List<Node>> chunks = new ArrayList<>(2);
+	List<Node> chunk = new ArrayList<>();
 	for( int i = 0; i < nodes.size(); i++ ) {
 	    chunk.add(nodes.get(i));
 	    if( (w.isClosed() || chunk.size() > 1) && (i == index1 || i == index2) ) {
 		chunks.add(chunk);
-		chunk = new ArrayList<Node>();
+		chunk = new ArrayList<>();
 		chunk.add(nodes.get(i));
 	    }
@@ -177,6 +177,6 @@
 
 	// build a map of referencing relations
-	Map<Relation, Integer> references = new HashMap<Relation, Integer>();
-	List<Command> relationCommands = new ArrayList<Command>();
+	Map<Relation, Integer> references = new HashMap<>();
+	List<Command> relationCommands = new ArrayList<>();
 	for( OsmPrimitive p : w.getReferrers() ) {
 	    if( p instanceof Relation ) {
@@ -191,5 +191,5 @@
 
 	// build ways
-	List<Way> result = new ArrayList<Way>();
+	List<Way> result = new ArrayList<>();
 	Way updatedWay = commands == null ? w : new Way(w);
 	updatedWay.setNodes(chunks.get(0));
@@ -245,5 +245,5 @@
 
 	// time to create a new multipolygon relation and a command stack
-	List<Command> commands = new ArrayList<Command>();
+	List<Command> commands = new ArrayList<>();
 	Relation newRelation = new Relation();
 	newRelation.put("type", "multipolygon");
@@ -263,5 +263,5 @@
 
 	// now split the way, at last
-	List<Way> newWays = new ArrayList<Way>(splitWay(target, segment.firstNode(), segment.lastNode(), commands));
+	List<Way> newWays = new ArrayList<>(splitWay(target, segment.firstNode(), segment.lastNode(), commands));
 
 	Way addingWay = null;
@@ -269,5 +269,5 @@
 	    Way utarget = newWays.get(1);
 	    Way alternate = newWays.get(0);
-	    List<Node> testRing = new ArrayList<Node>(segment.getNodes());
+	    List<Node> testRing = new ArrayList<>(segment.getNodes());
 	    closePolygon(testRing, utarget.getNodes());
 	    addingWay = segmentInsidePolygon(alternate.getNode(0), alternate.getNode(1), testRing) ? alternate : utarget;
@@ -292,5 +292,5 @@
      */
     private static <T> List<T> intersection( Collection<T> list1, Collection<T> list2 ) {
-	List<T> result = new ArrayList<T>();
+	List<T> result = new ArrayList<>();
 	for( T item : list1 )
 	    if( list2.contains(item) )
@@ -305,5 +305,5 @@
 	if( !ring.isClosed() || ring.isIncomplete() )
 	    return null;
-	Map<Way, Boolean> touchingWays = new HashMap<Way, Boolean>();
+	Map<Way, Boolean> touchingWays = new HashMap<>();
 	for( Node n : ring.getNodes() ) {
 	    for( OsmPrimitive p : n.getReferrers() ) {
@@ -322,5 +322,5 @@
 	}
 	
-	List<TheRing> otherWays = new ArrayList<TheRing>();
+	List<TheRing> otherWays = new ArrayList<>();
 	for( Way w : touchingWays.keySet() )
 	    if( touchingWays.get(w) ) {
@@ -335,5 +335,5 @@
 	
 	// now touchingWays has only ways that touch the ring twice
-	List<Command> commands = new ArrayList<Command>();
+	List<Command> commands = new ArrayList<>();
 	TheRing theRing = new TheRing(ring); // this is actually useful
 	
@@ -345,5 +345,5 @@
 	    otherRing.putSourceWayFirst();
 	
-	Map<Relation, Relation> relationCache = new HashMap<Relation, Relation>();
+	Map<Relation, Relation> relationCache = new HashMap<>();
 	for( TheRing otherRing : otherWays )
 	    commands.addAll(otherRing.getCommands(false, relationCache));
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/TheRing.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/TheRing.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/TheRing.java	(revision 30737)
@@ -37,10 +37,10 @@
     public TheRing( Way source ) {
 	this.source = source;
-	segments = new ArrayList<RingSegment>(1);
+	segments = new ArrayList<>(1);
 	segments.add(new RingSegment(source));
     }
     
     public static boolean areAllOfThoseRings( Collection<Way> ways ) {
-	List<Way> rings = new ArrayList<Way>();
+	List<Way> rings = new ArrayList<>();
 	for( Way way : ways ) {
 	    if( way.isClosed() )
@@ -70,5 +70,5 @@
     public static List<Relation> makeManySimpleMultipolygons( Collection<Way> selection, List<Command> commands ) {
 	log("---------------------------------------");
-	List<TheRing> rings = new ArrayList<TheRing>(selection.size());
+	List<TheRing> rings = new ArrayList<>(selection.size());
 	for( Way w : selection )
 	    rings.add(new TheRing(w));
@@ -77,6 +77,6 @@
 		rings.get(i).collide(rings.get(j));
 	redistributeSegments(rings);
-	List<Relation> relations = new ArrayList<Relation>();
-	Map<Relation, Relation> relationCache = new HashMap<Relation, Relation>();
+	List<Relation> relations = new ArrayList<>();
+	Map<Relation, Relation> relationCache = new HashMap<>();
 	for( TheRing r : rings ) {
 	    commands.addAll(r.getCommands(relationCache));
@@ -247,5 +247,5 @@
     public static void redistributeSegments( List<TheRing> rings ) {
 	// build segments map
-	Map<RingSegment, TheRing> segmentMap = new HashMap<RingSegment, TheRing>();
+	Map<RingSegment, TheRing> segmentMap = new HashMap<>();
 	for( TheRing ring : rings )
 	    for( RingSegment seg : ring.segments )
@@ -317,6 +317,6 @@
 
 	// build a map of referencing relations
-	Map<Relation, Integer> referencingRelations = new HashMap<Relation, Integer>();
-	List<Command> relationCommands = new ArrayList<Command>();
+	Map<Relation, Integer> referencingRelations = new HashMap<>();
+	List<Command> relationCommands = new ArrayList<>();
 	for( OsmPrimitive p : source.getReferrers() ) {
 	    if( p instanceof Relation ) {
@@ -342,5 +342,5 @@
 	// Ð¿Ð¾Ñ�Ñ‚Ð¾Ð¼Ñƒ Ñ�Ð¾Ñ…Ñ€Ð°Ð½Ñ�ÐµÑ‚Ñ�Ñ� Ñ‚Ð¾Ð»ÑŒÐºÐ¾ Ð¿ÐµÑ€Ð²Ð¾Ðµ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ðµ
 
-	List<Command> commands = new ArrayList<Command>();
+	List<Command> commands = new ArrayList<>();
 	boolean foundOwnWay = false;
 	for( RingSegment seg : segments ) {
@@ -464,5 +464,5 @@
 	    if( pos <= 0 || pos >= nodes.size() - 1 )
 		return null;
-	    List<Node> newNodes = new ArrayList<Node>(nodes.subList(pos, nodes.size()));
+	    List<Node> newNodes = new ArrayList<>(nodes.subList(pos, nodes.size()));
 	    nodes.subList(pos + 1, nodes.size()).clear();
 	    return new RingSegment(newNodes);
@@ -489,5 +489,5 @@
 		return null;
 
-	    List<Node> newNodes = new ArrayList<Node>();
+	    List<Node> newNodes = new ArrayList<>();
 	    if( pos2 > pos1 ) {
 		newNodes.addAll(nodes.subList(pos2, nodes.size()));
@@ -499,5 +499,5 @@
 	    } else {
 		newNodes.addAll(nodes.subList(pos2, pos1 + 1));
-		nodes.addAll(new ArrayList<Node>(nodes.subList(0, pos2 + 1)));
+		nodes.addAll(new ArrayList<>(nodes.subList(0, pos2 + 1)));
 		nodes.subList(0, pos1).clear();
 	    }
@@ -513,5 +513,5 @@
 	    if( nodes == null )
 		throw new IllegalArgumentException("Won't give you wayNodes: it is a reference");
-	    List<Node> wayNodes = new ArrayList<Node>(nodes);
+	    List<Node> wayNodes = new ArrayList<>(nodes);
 	    if( isRing )
 		wayNodes.add(wayNodes.get(0));
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/AssociatedStreetFixer.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/AssociatedStreetFixer.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/AssociatedStreetFixer.java	(revision 30737)
@@ -100,5 +100,5 @@
 
 		// fill relation name
-		Map<String, Integer> streetNames = new HashMap<String, Integer>();
+		Map<String, Integer> streetNames = new HashMap<>();
 		for (RelationMember m : rel.getMembers())
 			if ("street".equals(m.getRole()) && m.isWay()) {
@@ -126,5 +126,5 @@
 		}
 
-		List<Command> commandList = new ArrayList<Command>();
+		List<Command> commandList = new ArrayList<>();
 		if (fixed) {
 			commandList.add(new ChangeCommand(source, rel));
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/MultipolygonFixer.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/MultipolygonFixer.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/MultipolygonFixer.java	(revision 30737)
@@ -52,5 +52,5 @@
      */
     protected Relation fixMultipolygonRoles( Relation source ) {
-        Collection<Way> ways = new ArrayList<Way>();
+        Collection<Way> ways = new ArrayList<>();
         for( OsmPrimitive p : source.getMemberPrimitives() )
             if( p instanceof Way )
@@ -63,9 +63,9 @@
         Relation r = new Relation(source);
         boolean fixed = false;
-        Set<Way> outerWays = new HashSet<Way>();
+        Set<Way> outerWays = new HashSet<>();
         for( MultipolygonBuilder.JoinedPolygon poly : mpc.outerWays )
             for( Way w : poly.ways )
                 outerWays.add(w);
-        Set<Way> innerWays = new HashSet<Way>();
+        Set<Way> innerWays = new HashSet<>();
         for( MultipolygonBuilder.JoinedPolygon poly : mpc.innerWays )
             for( Way w : poly.ways )
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/RelationFixer.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/RelationFixer.java	(revision 30736)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/RelationFixer.java	(revision 30737)
@@ -23,5 +23,5 @@
 	 */
 	public RelationFixer(String... types) {
-	    applicableTypes = new ArrayList<String>();
+	    applicableTypes = new ArrayList<>();
 		for(String type: types) {
 			applicableTypes.add(type);
Index: applications/editors/josm/plugins/reverter/src/reverter/ChangesetIdQuery.java
===================================================================
--- applications/editors/josm/plugins/reverter/src/reverter/ChangesetIdQuery.java	(revision 30736)
+++ applications/editors/josm/plugins/reverter/src/reverter/ChangesetIdQuery.java	(revision 30737)
@@ -145,5 +145,5 @@
      */
     protected void restoreChangesetsHistory(HistoryComboBox cbHistory) {
-        List<String> cmtHistory = new LinkedList<String>(Main.pref.getCollection(getClass().getName() + ".changesetsHistory", new LinkedList<String>()));
+        List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(getClass().getName() + ".changesetsHistory", new LinkedList<String>()));
         // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
         Collections.reverse(cmtHistory);
Index: applications/editors/josm/plugins/reverter/src/reverter/ChangesetReverter.java
===================================================================
--- applications/editors/josm/plugins/reverter/src/reverter/ChangesetReverter.java	(revision 30736)
+++ applications/editors/josm/plugins/reverter/src/reverter/ChangesetReverter.java	(revision 30737)
@@ -70,9 +70,9 @@
     private DataSet nds; // Dataset that contains new objects downloaded by reverter
 
-    private final HashSet<PrimitiveId> missing = new HashSet<PrimitiveId>();
-
-    private final HashSet<HistoryOsmPrimitive> created = new HashSet<HistoryOsmPrimitive>();
-    private final HashSet<HistoryOsmPrimitive> updated = new HashSet<HistoryOsmPrimitive>();
-    private final HashSet<HistoryOsmPrimitive> deleted = new HashSet<HistoryOsmPrimitive>();
+    private final HashSet<PrimitiveId> missing = new HashSet<>();
+
+    private final HashSet<HistoryOsmPrimitive> created = new HashSet<>();
+    private final HashSet<HistoryOsmPrimitive> updated = new HashSet<>();
+    private final HashSet<HistoryOsmPrimitive> deleted = new HashSet<>();
 
     //// Handling missing objects
@@ -280,11 +280,11 @@
         switch (p.getType()) {
         case NODE:
-            return new Conflict<Node>((Node)p,new Node((Node)p), isMyDeleted);
+            return new Conflict<>((Node)p,new Node((Node)p), isMyDeleted);
         case CLOSEDWAY:
         case WAY:
-            return new Conflict<Way>((Way)p,new Way((Way)p), isMyDeleted);
+            return new Conflict<>((Way)p,new Way((Way)p), isMyDeleted);
         case MULTIPOLYGON:
         case RELATION:
-            return new Conflict<Relation>((Relation)p,new Relation((Relation)p), isMyDeleted);
+            return new Conflict<>((Relation)p,new Relation((Relation)p), isMyDeleted);
         default: throw new AssertionError();
         }
@@ -348,5 +348,5 @@
         // Create a set of objects to be deleted
 
-        HashSet<OsmPrimitive> toDelete = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> toDelete = new HashSet<>();
         // Mark objects that has visible=false to be deleted
         for (OsmPrimitive p : nds.allPrimitives()) {
@@ -365,5 +365,5 @@
         // Check reversion against current dataset and create necessary conflicts
 
-        HashSet<OsmPrimitive> conflicted = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> conflicted = new HashSet<>();
 
         for (Conflict<? extends OsmPrimitive> conflict : merger.getConflicts()) {
Index: applications/editors/josm/plugins/reverter/src/reverter/DataSetCommandMerger.java
===================================================================
--- applications/editors/josm/plugins/reverter/src/reverter/DataSetCommandMerger.java	(revision 30736)
+++ applications/editors/josm/plugins/reverter/src/reverter/DataSetCommandMerger.java	(revision 30737)
@@ -33,6 +33,6 @@
     private final DataSet targetDataSet;
 
-    private final List<Command> cmds = new LinkedList<Command>();
-    private final List<OsmPrimitive> nominalRevertedPrimitives = new LinkedList<OsmPrimitive>();
+    private final List<Command> cmds = new LinkedList<>();
+    private final List<OsmPrimitive> nominalRevertedPrimitives = new LinkedList<>();
 
     /**
@@ -98,7 +98,7 @@
         Way target = (Way)getMergeTarget(source);
         
-        Collection<Conflict<OsmPrimitive>> localConflicts = new ArrayList<Conflict<OsmPrimitive>>();
+        Collection<Conflict<OsmPrimitive>> localConflicts = new ArrayList<>();
 
-        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);
@@ -142,10 +142,10 @@
         if (!source.isVisible()) return;
         Relation target = (Relation) getMergeTarget(source);
-        LinkedList<RelationMember> newMembers = new LinkedList<RelationMember>();
+        LinkedList<RelationMember> newMembers = new LinkedList<>();
         for (RelationMember sourceMember : source.getMembers()) {
             OsmPrimitive targetMember = getMergeTarget(sourceMember.getMember());
             if (targetMember.isDeleted() && sourceMember.getMember().isIncomplete()
                     && !conflicts.hasConflictForMy(targetMember)) {
-                conflicts.add(new Conflict<OsmPrimitive>(targetMember, sourceMember.getMember(), true));
+                conflicts.add(new Conflict<>(targetMember, sourceMember.getMember(), true));
                 OsmPrimitive undeletedTargetMember;
                 switch(targetMember.getType()) {
Index: applications/editors/josm/plugins/reverter/src/reverter/corehacks/ChangesetDataSet.java
===================================================================
--- applications/editors/josm/plugins/reverter/src/reverter/corehacks/ChangesetDataSet.java	(revision 30736)
+++ applications/editors/josm/plugins/reverter/src/reverter/corehacks/ChangesetDataSet.java	(revision 30737)
@@ -30,7 +30,7 @@
     }
 
-    final private Map<PrimitiveId, Integer> earliestVersions = new HashMap<PrimitiveId, Integer>();
-    final private Map<PrimitiveId, HistoryOsmPrimitive> primitives = new HashMap<PrimitiveId, HistoryOsmPrimitive>();
-    final private Map<PrimitiveId, ChangesetModificationType> modificationTypes = new HashMap<PrimitiveId, ChangesetModificationType>();
+    final private Map<PrimitiveId, Integer> earliestVersions = new HashMap<>();
+    final private Map<PrimitiveId, HistoryOsmPrimitive> primitives = new HashMap<>();
+    final private Map<PrimitiveId, ChangesetModificationType> modificationTypes = new HashMap<>();
 
     /**
@@ -145,5 +145,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: applications/editors/josm/plugins/reverter/src/reverter/corehacks/OsmServerChangesetReader.java
===================================================================
--- applications/editors/josm/plugins/reverter/src/reverter/corehacks/OsmServerChangesetReader.java	(revision 30736)
+++ applications/editors/josm/plugins/reverter/src/reverter/corehacks/OsmServerChangesetReader.java	(revision 30737)
@@ -134,5 +134,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 (Iterator<Integer> it = ids.iterator(); it.hasNext(); ) {
Index: applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/ParametrizedString.java
===================================================================
--- applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/ParametrizedString.java	(revision 30736)
+++ applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/ParametrizedString.java	(revision 30737)
@@ -22,5 +22,5 @@
  */
 public class ParametrizedString {
-    final List<StringOrParameter> token = new ArrayList<StringOrParameter>();
+    final List<StringOrParameter> token = new ArrayList<>();
 
     /**
Index: applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignInputDialog.java
===================================================================
--- applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignInputDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignInputDialog.java	(revision 30737)
@@ -166,5 +166,5 @@
 
     private Command createCommand(Collection<OsmPrimitive> selPrim) {
-        List<Command> cmds = new LinkedList<Command>();
+        List<Command> cmds = new LinkedList<>();
         for (int i=0; i<previewModel.getRowCount(); i++) {
             String key = (String) previewModel.getValueAt(i, 0);
@@ -272,5 +272,5 @@
      */
     public class SignSelection  {
-        private final LinkedList<SignCombination> combos=new LinkedList<SignCombination>();
+        private final LinkedList<SignCombination> combos=new LinkedList<>();
 
         public void remove(SignCombination sc) {
@@ -333,5 +333,5 @@
                 for (SignWrapper sw : sc.signs) {
                     if (swFind == sw) {
-                        return new Pair<Integer, Integer>(selIdx, combIdx);
+                        return new Pair<>(selIdx, combIdx);
                     }
                     combIdx++;
@@ -378,5 +378,5 @@
 
         public SignCombination() {
-            signs = new LinkedList<SignWrapper>();
+            signs = new LinkedList<>();
         }
 
@@ -428,5 +428,5 @@
         String signRef;
         JPanel paramsPanel;
-        Map<String, String> paramValues = new HashMap<String, String>();
+        Map<String, String> paramValues = new HashMap<>();
         public SignWrapper(Sign sign) {
             this.sign = sign;
@@ -575,6 +575,6 @@
 
     public class PreviewTableModel extends AbstractTableModel {
-        private List<String> keys = new ArrayList<String>();
-        private List<String> values = new ArrayList<String>();
+        private List<String> keys = new ArrayList<>();
+        private List<String> values = new ArrayList<>();
 
         int rows=3;
@@ -607,9 +607,9 @@
          */
         public void update() {
-            final TreeMap<String, String> map= new TreeMap<String, String>();
+            final TreeMap<String, String> map= new TreeMap<>();
             String traffic_sign = "";
 
             for (SignCombination sc : sel.combos) {
-                final Map<String, String> env = new HashMap<String, String>();
+                final Map<String, String> env = new HashMap<>();
                 String combo_traffic_sign = "";
 
@@ -621,6 +621,6 @@
                     String key;
                     String default_value;
-                    List<String> values = new ArrayList<String>();
-                    List<String> conditions = new ArrayList<String>();
+                    List<String> values = new ArrayList<>();
+                    List<String> conditions = new ArrayList<>();
                     //String ident;
                     public TagEvaluater(Tag t) {
@@ -653,5 +653,5 @@
                             return Collections.singletonMap(key, value);
                         else {
-                            Map<String, String> result = new HashMap<String, String>();
+                            Map<String, String> result = new HashMap<>();
                             for (String c : conditions) {
                                 result.put(key+":"+c, value);
@@ -662,5 +662,5 @@
                 }
 
-                Map<String, TagEvaluater> tags = new LinkedHashMap<String, TagEvaluater>();
+                Map<String, TagEvaluater> tags = new LinkedHashMap<>();
                 for (SignWrapper sw : sc.signs) {
                     for (Map.Entry<String,String> entry : sw.paramValues.entrySet()) {
Index: applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsPlugin.java
===================================================================
--- applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsPlugin.java	(revision 30737)
@@ -157,12 +157,12 @@
             Collection<String> customIconDirs = null;
             if (customIconDirsStr != null) {
-                customIconDirs = new ArrayList<String>(Arrays.asList(customIconDirsStr.split(",")));
+                customIconDirs = new ArrayList<>(Arrays.asList(customIconDirsStr.split(",")));
             } else {
                 customIconDirs = Main.pref.getCollection("plugin.roadsigns.icon.sources", null);
             }
             if (customIconDirs != null) {
-                customIconDirs = new ArrayList<String>(customIconDirs);
+                customIconDirs = new ArrayList<>(customIconDirs);
             } else {
-                customIconDirs = new ArrayList<String>();
+                customIconDirs = new ArrayList<>();
             }
             // add icon directory relative to preset file
Index: applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsReader.java
===================================================================
--- applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsReader.java	(revision 30736)
+++ applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsReader.java	(revision 30737)
@@ -234,5 +234,5 @@
         }
         public void wireSupplements() throws XmlParsingException {
-            Map<String, Sign> map = new HashMap<String, Sign>();
+            Map<String, Sign> map = new HashMap<>();
             for (Sign sign : allSigns) {
                 if (map.get(sign.id) != null)
@@ -309,6 +309,6 @@
     public List<Sign> parse() throws SAXException, IOException {
         SignParser parser = new SignParser();
-        parser.allSigns = new ArrayList<Sign>();
-        parser.supplementIds = new HashMap<Sign, List<String>>();
+        parser.allSigns = new ArrayList<>();
+        parser.supplementIds = new HashMap<>();
         try {
             SAXParserFactory factory = SAXParserFactory.newInstance();
@@ -318,5 +318,5 @@
             String filterPref = Main.pref.get("plugin.roadsigns.preset.filter");
             if (filterPref.equals("useful")) {
-                List<Sign> filtered = new ArrayList<Sign>();
+                List<Sign> filtered = new ArrayList<>();
                 for (Sign s : parser.allSigns) {
                     if (s.isUseful()) {
Index: applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/Sign.java
===================================================================
--- applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/Sign.java	(revision 30736)
+++ applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/Sign.java	(revision 30737)
@@ -27,7 +27,7 @@
     public String name;
     public String long_name;
-    public List<Tag> tags = new ArrayList<Tag>();
-    public List<Sign> supplements = new ArrayList<Sign>();
-    public List<SignParameter> params = new ArrayList<SignParameter>();
+    public List<Tag> tags = new ArrayList<>();
+    public List<Sign> supplements = new ArrayList<>();
+    public List<SignParameter> params = new ArrayList<>();
     public boolean isSupplementing;
     public String loc_wiki;
Index: applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/javacc/ParamStringScanner.java
===================================================================
--- applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/javacc/ParamStringScanner.java	(revision 30736)
+++ applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/javacc/ParamStringScanner.java	(revision 30737)
@@ -18,5 +18,5 @@
     String val;
     Token t;
-    List<StringOrParameter> lst = new ArrayList<StringOrParameter>();
+    List<StringOrParameter> lst = new ArrayList<>();
     label_1:
     while (true) {
Index: applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/javacc/ParamStringScannerTokenManager.java
===================================================================
--- applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/javacc/ParamStringScannerTokenManager.java	(revision 30736)
+++ applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/javacc/ParamStringScannerTokenManager.java	(revision 30737)
@@ -1,9 +1,4 @@
 /* Generated By:JavaCC: Do not edit this line. ParamStringScannerTokenManager.java */
 package org.openstreetmap.josm.plugins.roadsigns.javacc;
-import java.util.ArrayList;
-import java.util.List;
-import org.openstreetmap.josm.plugins.roadsigns.ParametrizedString.Prm;
-import org.openstreetmap.josm.plugins.roadsigns.ParametrizedString.Str;
-import org.openstreetmap.josm.plugins.roadsigns.ParametrizedString.StringOrParameter;
 
 /** Token Manager. */
Index: applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/ConvertedWay.java
===================================================================
--- applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/ConvertedWay.java	(revision 30736)
+++ applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/ConvertedWay.java	(revision 30737)
@@ -43,5 +43,5 @@
     }
 
-    private List<Node> nodes = new ArrayList<Node>();
+    private List<Node> nodes = new ArrayList<>();
     private BitSet routes;
 
Index: applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/PathBuilder.java
===================================================================
--- applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/PathBuilder.java	(revision 30736)
+++ applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/PathBuilder.java	(revision 30737)
@@ -14,5 +14,5 @@
 public class PathBuilder {
 
-    private Map<Way, BitSet> wayRoutes = new HashMap<Way, BitSet>();
+    private Map<Way, BitSet> wayRoutes = new HashMap<>();
     private Collection<ConvertedWay> convertedWays;
 
@@ -32,5 +32,5 @@
     public Collection<ConvertedWay> getConvertedWays() {
         if (convertedWays == null) {
-            Map<WayEnd, ConvertedWay> ways = new HashMap<WayEnd, ConvertedWay>();
+            Map<WayEnd, ConvertedWay> ways = new HashMap<>();
 
             for (Entry<Way, BitSet> wayEntry:wayRoutes.entrySet()) {
@@ -54,5 +54,5 @@
             }
 
-            Set<ConvertedWay> uniqueWays = new HashSet<ConvertedWay>();
+            Set<ConvertedWay> uniqueWays = new HashSet<>();
             uniqueWays.addAll(ways.values());
             convertedWays = uniqueWays;
Index: applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RouteLayer.java
===================================================================
--- applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RouteLayer.java	(revision 30736)
+++ applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RouteLayer.java	(revision 30737)
@@ -35,5 +35,5 @@
     private final PathPainter pathPainter;
     private final PathBuilder pathBuilder = new PathBuilder();
-    private final List<RouteDefinition> routes = new ArrayList<RouteDefinition>();
+    private final List<RouteDefinition> routes = new ArrayList<>();
     private volatile boolean datasetChanged = true;
 
Index: applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RoutesPlugin.java
===================================================================
--- applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RoutesPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RoutesPlugin.java	(revision 30737)
@@ -27,5 +27,5 @@
 public class RoutesPlugin extends Plugin implements LayerChangeListener {
 
-    private final List<RouteLayer> routeLayers = new ArrayList<RouteLayer>();
+    private final List<RouteLayer> routeLayers = new ArrayList<>();
     private boolean isShown;
 
Index: applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/xml/Routes.java
===================================================================
--- applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/xml/Routes.java	(revision 30736)
+++ applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/xml/Routes.java	(revision 30737)
@@ -69,5 +69,5 @@
     public List<RoutesXMLLayer> getLayer() {
         if (layer == null) {
-            layer = new ArrayList<RoutesXMLLayer>();
+            layer = new ArrayList<>();
         }
         return this.layer;
Index: applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/xml/RoutesXMLLayer.java
===================================================================
--- applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/xml/RoutesXMLLayer.java	(revision 30736)
+++ applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/xml/RoutesXMLLayer.java	(revision 30737)
@@ -74,5 +74,5 @@
     public List<RoutesXMLRoute> getRoute() {
         if (route == null) {
-            route = new ArrayList<RoutesXMLRoute>();
+            route = new ArrayList<>();
         }
         return this.route;
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java	(revision 30736)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java	(revision 30737)
@@ -160,5 +160,5 @@
 
         logger.debug("Creating Graph...");
-        graph = new DirectedWeightedMultigraph<Node, OsmEdge>(OsmEdge.class);
+        graph = new DirectedWeightedMultigraph<>(OsmEdge.class);
         rgDelegator=new RoutingGraphDelegator(graph);
         rgDelegator.setRouteType(this.routeType);
@@ -347,5 +347,5 @@
      */
     public List<OsmEdge> applyAlgorithm(List<Node> nodes, Algorithm algorithm) {
-        List<OsmEdge> path = new ArrayList<OsmEdge>();
+        List<OsmEdge> path = new ArrayList<>();
         Graph<Node,OsmEdge> g;
         double totalWeight = 0;
@@ -370,5 +370,5 @@
             DijkstraShortestPath<Node, OsmEdge> routingk = null;
             for (int index = 1; index < nodes.size(); ++index) {
-                routingk = new DijkstraShortestPath<Node, OsmEdge>(g, nodes
+                routingk = new DijkstraShortestPath<>(g, nodes
                         .get(index - 1), nodes.get(index));
                 if (routingk.getPathEdgeList() == null) {
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingProfile.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingProfile.java	(revision 30736)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingProfile.java	(revision 30737)
@@ -75,5 +75,5 @@
         logger.debug("Init RoutingProfile with name: "+name);
         this.name = name;
-        waySpeeds=new HashMap<String,Double>();
+        waySpeeds=new HashMap<>();
         Map<String,String> prefs=Main.pref.getAllPrefix("routing.profile."+name+".speed");
         for(String key:prefs.keySet()){
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java	(revision 30736)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java	(revision 30737)
@@ -191,5 +191,5 @@
     @Override
     public Action[] getMenuEntries() {
-        Collection<Action> components = new ArrayList<Action>();
+        Collection<Action> components = new ArrayList<>();
         components.add(LayerListDialog.getInstance().createShowHideLayerAction());
 //        components.add(new JMenuItem(new LayerListDialog.ShowHideMarkerText(this)));
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingModel.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingModel.java	(revision 30736)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingModel.java	(revision 30737)
@@ -79,5 +79,5 @@
      */
     public RoutingModel(DataSet data) {
-        nodes = new ArrayList<Node>();
+        nodes = new ArrayList<>();
         System.out.println("gr " + data);
         routingGraph = new RoutingGraph(data);
@@ -128,5 +128,5 @@
      */
     public void reverseNodes() {
-        List<Node> aux = new ArrayList<Node>();
+        List<Node> aux = new ArrayList<>();
         for (Node n : nodes) {
             aux.add(0,n);
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java	(revision 30737)
@@ -148,5 +148,5 @@
         preferenceSettings=new RoutingPreferenceDialog();
         // Initialize layers list
-        layers = new ArrayList<RoutingLayer>();
+        layers = new ArrayList<>();
         // Add menu
         menu = new RoutingMenu();
Index: applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/DetermineSdsModificationsUploadHook.java
===================================================================
--- applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/DetermineSdsModificationsUploadHook.java	(revision 30736)
+++ applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/DetermineSdsModificationsUploadHook.java	(revision 30737)
@@ -40,5 +40,5 @@
     public boolean checkUpload(APIDataSet apiDataSet) {
     	
-    	ArrayList<OsmPrimitive> droplist = new ArrayList<OsmPrimitive>();
+    	ArrayList<OsmPrimitive> droplist = new ArrayList<>();
     	
     	// check deleted primitives for special tags.
@@ -54,5 +54,5 @@
        	for (OsmPrimitive upd : apiDataSet.getPrimitivesToUpdate()) {
        		
-       		HashSet<String> allKeys = new HashSet<String>();
+       		HashSet<String> allKeys = new HashSet<>();
        		boolean specialTags = false;
        		
@@ -87,5 +87,5 @@
        		
        		// assemble new set of special tags. might turn out to be empty.
-       		HashMap<String, String> newSpecialTags = new HashMap<String, String>();
+       		HashMap<String, String> newSpecialTags = new HashMap<>();
        		for (String key : upd.keySet()) {
        			if (isSpecialKey(key)) newSpecialTags.put(key, upd.get(key));
@@ -151,5 +151,5 @@
        	for (OsmPrimitive add : apiDataSet.getPrimitivesToAdd()) {
        		// assemble new set of special tags. might turn out to be empty.
-       		HashMap<String, String> newSpecialTags = new HashMap<String, String>();
+       		HashMap<String, String> newSpecialTags = new HashMap<>();
        		for (String key : add.keySet()) {
        			if (isSpecialKey(key)) newSpecialTags.put(key, add.get(key));
Index: applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/ReadPostprocessor.java
===================================================================
--- applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/ReadPostprocessor.java	(revision 30736)
+++ applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/ReadPostprocessor.java	(revision 30737)
@@ -38,7 +38,7 @@
     public void postprocessDataSet(DataSet ds, ProgressMonitor progress) {
         
-		nodeList = new ArrayList<Long>();
-		wayList = new ArrayList<Long>();
-		relationList = new ArrayList<Long>();
+		nodeList = new ArrayList<>();
+		wayList = new ArrayList<>();
+		relationList = new ArrayList<>();
 
 		Visitor adder = new Visitor() {
Index: applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsApi.java
===================================================================
--- applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsApi.java	(revision 30736)
+++ applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsApi.java	(revision 30737)
@@ -41,5 +41,5 @@
 
     /** the collection of instantiated OSM APIs */
-    private static HashMap<String, SdsApi> instances = new HashMap<String, SdsApi>();
+    private static HashMap<String, SdsApi> instances = new HashMap<>();
     
     /**
Index: applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialAgent.java
===================================================================
--- applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialAgent.java	(revision 30736)
+++ applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialAgent.java	(revision 30737)
@@ -27,5 +27,5 @@
 public class SdsCredentialAgent extends AbstractCredentialsAgent {
 
-    Map<RequestorType, PasswordAuthentication> sdsMemoryCredentialsCache = new HashMap<RequestorType, PasswordAuthentication>();
+    Map<RequestorType, PasswordAuthentication> sdsMemoryCredentialsCache = new HashMap<>();
 
     /**
Index: applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsLoadAction.java
===================================================================
--- applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsLoadAction.java	(revision 30736)
+++ applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsLoadAction.java	(revision 30737)
@@ -54,5 +54,5 @@
         public OpenFileTask(List<File> files, SeparateDataStorePlugin p) {
             super(tr("Loading files"), false /* don't ignore exception */);
-            this.files = new ArrayList<File>(files);
+            this.files = new ArrayList<>(files);
             plugin = p;
         }
Index: applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsOsmWriter.java
===================================================================
--- applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsOsmWriter.java	(revision 30736)
+++ applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsOsmWriter.java	(revision 30737)
@@ -40,5 +40,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: applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SeparateDataStorePlugin.java
===================================================================
--- applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SeparateDataStorePlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SeparateDataStorePlugin.java	(revision 30737)
@@ -29,9 +29,9 @@
 {
 
-	public HashMap<Long, IPrimitive> originalNodes = new HashMap<Long, IPrimitive>();
-	public HashMap<Long, IPrimitive> originalWays = new HashMap<Long, IPrimitive>();
-	public HashMap<Long, IPrimitive> originalRelations = new HashMap<Long, IPrimitive>();
+	public HashMap<Long, IPrimitive> originalNodes = new HashMap<>();
+	public HashMap<Long, IPrimitive> originalWays = new HashMap<>();
+	public HashMap<Long, IPrimitive> originalRelations = new HashMap<>();
 	
-	public ArrayList<QueueItem> uploadQueue = new ArrayList<QueueItem>();
+	public ArrayList<QueueItem> uploadQueue = new ArrayList<>();
 	
 	private PrimitiveVisitor learnVisitor = new PrimitiveVisitor() {
@@ -113,5 +113,5 @@
 	 */
 	protected void clearQueue() {
-		ArrayList<QueueItem> newQueue = new ArrayList<QueueItem>();
+		ArrayList<QueueItem> newQueue = new ArrayList<>();
 		for (QueueItem q : uploadQueue) {
 			if (!q.processed) newQueue.add(q);
Index: applications/editors/josm/plugins/smed/src/panels/PanelChr.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelChr.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelChr.java	(revision 30737)
@@ -36,5 +36,5 @@
 	public JToggleButton morseButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/MorseButton.png")));
 	public JToggleButton alternatingButton = new JToggleButton(new ImageIcon(getClass().getResource("/images/AlternatingButton.png")));
-	private EnumMap<Chr, JToggleButton> buttons = new EnumMap<Chr, JToggleButton>(Chr.class);
+	private EnumMap<Chr, JToggleButton> buttons = new EnumMap<>(Chr.class);
 	private ActionListener alCharButton = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelCol.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelCol.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelCol.java	(revision 30737)
@@ -34,5 +34,5 @@
 	public JRadioButton magentaButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/MagentaButton.png")));
 	public JRadioButton pinkButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PinkButton.png")));
-	public EnumMap<Col, JRadioButton> colours = new EnumMap<Col, JRadioButton>(Col.class);
+	public EnumMap<Col, JRadioButton> colours = new EnumMap<>(Col.class);
 	private ActionListener alColour = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -94,5 +94,5 @@
 	private JPanel stack;
 	private ButtonGroup stackColours = new ButtonGroup();
-	private ArrayList<JRadioButton> stackCol = new ArrayList<JRadioButton>();
+	private ArrayList<JRadioButton> stackCol = new ArrayList<>();
 	private int stackIdx = 0;
 	private ActionListener alStack = new ActionListener() {
Index: applications/editors/josm/plugins/smed/src/panels/PanelFog.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelFog.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelFog.java	(revision 30737)
@@ -24,5 +24,5 @@
 	public JRadioButton gongButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/FogGongButton.png")));
 	public JRadioButton explosButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/FogExplosButton.png")));
-	private EnumMap<Fog, JRadioButton> fogs = new EnumMap<Fog, JRadioButton>(Fog.class);
+	private EnumMap<Fog, JRadioButton> fogs = new EnumMap<>(Fog.class);
 	private ActionListener alFog = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelHaz.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelHaz.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelHaz.java	(revision 30737)
@@ -82,7 +82,7 @@
 	public JRadioButton beaconButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BeaconButton.png")));
 	public JRadioButton towerButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TowerButton.png")));
-	public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(Shp.class);
-	public EnumMap<Shp, Obj> carObjects = new EnumMap<Shp, Obj>(Shp.class);
-	public EnumMap<Shp, Obj> isdObjects = new EnumMap<Shp, Obj>(Shp.class);
+	public EnumMap<Shp, JRadioButton> shapes = new EnumMap<>(Shp.class);
+	public EnumMap<Shp, Obj> carObjects = new EnumMap<>(Shp.class);
+	public EnumMap<Shp, Obj> isdObjects = new EnumMap<>(Shp.class);
 	private ActionListener alShape = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelLights.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelLights.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelLights.java	(revision 30737)
@@ -19,5 +19,5 @@
 
 	public JComboBox<String> landCatBox;
-	public EnumMap<Cat, Integer> landCats = new EnumMap<Cat, Integer>(Cat.class);
+	public EnumMap<Cat, Integer> landCats = new EnumMap<>(Cat.class);
 	private ActionListener alLandCatBox = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -32,5 +32,5 @@
 	};
 	public JComboBox<String> trafficCatBox;
-	public EnumMap<Cat, Integer> trafficCats = new EnumMap<Cat, Integer>(Cat.class);
+	public EnumMap<Cat, Integer> trafficCats = new EnumMap<>(Cat.class);
 	private ActionListener alTrafficCatBox = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -45,5 +45,5 @@
 	};
 	public JComboBox<String> warningCatBox;
-	public EnumMap<Cat, Integer> warningCats = new EnumMap<Cat, Integer>(Cat.class);
+	public EnumMap<Cat, Integer> warningCats = new EnumMap<>(Cat.class);
 	private ActionListener alWarningCatBox = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -58,5 +58,5 @@
 	};
 	public JComboBox<String> platformCatBox;
-	public EnumMap<Cat, Integer> platformCats = new EnumMap<Cat, Integer>(Cat.class);
+	public EnumMap<Cat, Integer> platformCats = new EnumMap<>(Cat.class);
 	private ActionListener alPlatformCatBox = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -71,5 +71,5 @@
 	};
 	public JComboBox<String> pilotCatBox;
-	public EnumMap<Cat, Integer> pilotCats = new EnumMap<Cat, Integer>(Cat.class);
+	public EnumMap<Cat, Integer> pilotCats = new EnumMap<>(Cat.class);
 	private ActionListener alPilotCatBox = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -84,5 +84,5 @@
 	};
 	public JComboBox<String> rescueCatBox;
-	public EnumMap<Cat, Integer> rescueCats = new EnumMap<Cat, Integer>(Cat.class);
+	public EnumMap<Cat, Integer> rescueCats = new EnumMap<>(Cat.class);
 	private ActionListener alRescueCatBox = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -97,5 +97,5 @@
 	};
 	public JComboBox<String> radioCatBox;
-	public EnumMap<Cat, Integer> radioCats = new EnumMap<Cat, Integer>(Cat.class);
+	public EnumMap<Cat, Integer> radioCats = new EnumMap<>(Cat.class);
 	private ActionListener alRadioCatBox = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -110,5 +110,5 @@
 	};
 	public JComboBox<String> radarCatBox;
-	public EnumMap<Cat, Integer> radarCats = new EnumMap<Cat, Integer>(Cat.class);
+	public EnumMap<Cat, Integer> radarCats = new EnumMap<>(Cat.class);
 	private ActionListener alRadarCatBox = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -124,5 +124,5 @@
 	public JLabel functionLabel;
 	public JComboBox<String> functionBox;
-	public EnumMap<Fnc, Integer> functions = new EnumMap<Fnc, Integer>(Fnc.class);
+	public EnumMap<Fnc, Integer> functions = new EnumMap<>(Fnc.class);
 	private ActionListener alfunctionBox = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -151,5 +151,5 @@
 	public JRadioButton radioButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RadioStationButton.png")));
 	public JRadioButton radarButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RadarStationButton.png")));
-	public EnumMap<Obj, JRadioButton> objects = new EnumMap<Obj, JRadioButton>(Obj.class);
+	public EnumMap<Obj, JRadioButton> objects = new EnumMap<>(Obj.class);
 	private ActionListener alObj = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelLit.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelLit.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelLit.java	(revision 30737)
@@ -40,5 +40,5 @@
 	public JLabel visibilityLabel;
 	public JComboBox<String> visibilityBox;
-	public EnumMap<Vis, Integer> visibilities = new EnumMap<Vis, Integer>(Vis.class);
+	public EnumMap<Vis, Integer> visibilities = new EnumMap<>(Vis.class);
 	private ActionListener alVisibility = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -80,5 +80,5 @@
 	public JLabel categoryLabel;
 	public JComboBox<String> categoryBox;
-	public EnumMap<Lit, Integer> categories = new EnumMap<Lit, Integer>(Lit.class);
+	public EnumMap<Lit, Integer> categories = new EnumMap<>(Lit.class);
 	private ActionListener alCategory = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -116,5 +116,5 @@
 	public JLabel exhibitionLabel;
 	public JComboBox<String> exhibitionBox;
-	public EnumMap<Exh, Integer> exhibitions = new EnumMap<Exh, Integer>(Exh.class);
+	public EnumMap<Exh, Integer> exhibitions = new EnumMap<>(Exh.class);
 	private ActionListener alExhibition = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelMore.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelMore.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelMore.java	(revision 30737)
@@ -45,5 +45,5 @@
 	public JLabel statusLabel;
 	public JComboBox<String> statusBox;
-	public EnumMap<Sts, Integer> statuses = new EnumMap<Sts, Integer>(Sts.class);
+	public EnumMap<Sts, Integer> statuses = new EnumMap<>(Sts.class);
 	private ActionListener alStatus = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -57,5 +57,5 @@
 	public JLabel constrLabel;
 	public JComboBox<String> constrBox;
-	public EnumMap<Cns, Integer> constructions = new EnumMap<Cns, Integer>(Cns.class);
+	public EnumMap<Cns, Integer> constructions = new EnumMap<>(Cns.class);
 	private ActionListener alConstr = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -69,5 +69,5 @@
 	public JLabel conLabel;
 	public JComboBox<String> conBox;
-	public EnumMap<Con, Integer> conspicuities = new EnumMap<Con, Integer>(Con.class);
+	public EnumMap<Con, Integer> conspicuities = new EnumMap<>(Con.class);
 	private ActionListener alCon = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -81,5 +81,5 @@
 	public JLabel reflLabel;
 	public JComboBox<String> reflBox;
-	public EnumMap<Con, Integer> reflectivities = new EnumMap<Con, Integer>(Con.class);
+	public EnumMap<Con, Integer> reflectivities = new EnumMap<>(Con.class);
 	private ActionListener alRefl = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelPat.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelPat.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelPat.java	(revision 30737)
@@ -25,5 +25,5 @@
 	public JRadioButton squareButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SquaredButton.png")));
 	public JRadioButton borderButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BorderButton.png")));
-	public EnumMap<Pat, JRadioButton> patterns = new EnumMap<Pat, JRadioButton>(Pat.class);
+	public EnumMap<Pat, JRadioButton> patterns = new EnumMap<>(Pat.class);
 	private ActionListener alPat = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelPort.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelPort.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelPort.java	(revision 30737)
@@ -24,6 +24,6 @@
 	public JRadioButton perchButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PerchPButton.png")));
 	public JRadioButton stakeButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/StakeButton.png")));
-	public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(Shp.class);
-	public EnumMap<Shp, Obj> objects = new EnumMap<Shp, Obj>(Shp.class);
+	public EnumMap<Shp, JRadioButton> shapes = new EnumMap<>(Shp.class);
+	public EnumMap<Shp, Obj> objects = new EnumMap<>(Shp.class);
 	public ActionListener alShape = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelRadar.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelRadar.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelRadar.java	(revision 30737)
@@ -29,5 +29,5 @@
 	};
 	private JComboBox<String> radioCatBox;
-	private EnumMap<Cat, Integer> radioCats = new EnumMap<Cat, Integer>(Cat.class);
+	private EnumMap<Cat, Integer> radioCats = new EnumMap<>(Cat.class);
 	private ActionListener alRadioCatBox = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -46,5 +46,5 @@
 	public JRadioButton raconButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RaconButton.png")));
 	public JRadioButton leadingButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/LeadingRaconButton.png")));
-	private EnumMap<Rtb, JRadioButton> rads = new EnumMap<Rtb, JRadioButton>(Rtb.class);
+	private EnumMap<Rtb, JRadioButton> rads = new EnumMap<>(Rtb.class);
 	private ActionListener alRad = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelSaw.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelSaw.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelSaw.java	(revision 30737)
@@ -20,6 +20,6 @@
 	public JRadioButton floatButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/FloatButton.png")));
 	public JRadioButton beaconButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BeaconButton.png")));
-	public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(Shp.class);
-	public EnumMap<Shp, Obj> objects = new EnumMap<Shp, Obj>(Shp.class);
+	public EnumMap<Shp, JRadioButton> shapes = new EnumMap<>(Shp.class);
+	public EnumMap<Shp, Obj> objects = new EnumMap<>(Shp.class);
 	public ActionListener alShape = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelSectors.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelSectors.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelSectors.java	(revision 30737)
@@ -37,9 +37,9 @@
 	};
 	public JComboBox<ImageIcon> colourBox;
-	public EnumMap<Col, ImageIcon> colours = new EnumMap<Col, ImageIcon>(Col.class);
+	public EnumMap<Col, ImageIcon> colours = new EnumMap<>(Col.class);
 	public JComboBox<String> visibilityBox;
-	public EnumMap<Vis, String> visibilities = new EnumMap<Vis, String>(Vis.class);
+	public EnumMap<Vis, String> visibilities = new EnumMap<>(Vis.class);
 	public JComboBox<String> exhibitionBox;
-	public EnumMap<Exh, String> exhibitions = new EnumMap<Exh, String>(Exh.class);
+	public EnumMap<Exh, String> exhibitions = new EnumMap<>(Exh.class);
 
 	public PanelSectors(SmedAction dia) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelSpec.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelSpec.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelSpec.java	(revision 30737)
@@ -18,5 +18,5 @@
 	public JLabel categoryLabel;
 	public JComboBox<String> categoryBox;
-	public EnumMap<Cat, Integer> categories = new EnumMap<Cat, Integer>(Cat.class);
+	public EnumMap<Cat, Integer> categories = new EnumMap<>(Cat.class);
 	private ActionListener alCategoryBox = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -29,5 +29,5 @@
 	};
 	public JComboBox<String> mooringBox;
-	public EnumMap<Cat, Integer> moorings = new EnumMap<Cat, Integer>(Cat.class);
+	public EnumMap<Cat, Integer> moorings = new EnumMap<>(Cat.class);
 	private ActionListener alMooringBox = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -62,6 +62,6 @@
 	public JRadioButton stakeButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/StakeButton.png")));
 	public JRadioButton cairnButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CairnButton.png")));
-	public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(Shp.class);
-	public EnumMap<Shp, Obj> objects = new EnumMap<Shp, Obj>(Shp.class);
+	public EnumMap<Shp, JRadioButton> shapes = new EnumMap<>(Shp.class);
+	public EnumMap<Shp, Obj> objects = new EnumMap<>(Shp.class);
 	public ActionListener alShape = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelStbd.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelStbd.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelStbd.java	(revision 30737)
@@ -24,6 +24,6 @@
 	public JRadioButton perchButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PerchSButton.png")));
 	public JRadioButton stakeButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/StakeButton.png")));
-	public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(Shp.class);
-	public EnumMap<Shp, Obj> objects = new EnumMap<Shp, Obj>(Shp.class);
+	public EnumMap<Shp, JRadioButton> shapes = new EnumMap<>(Shp.class);
+	public EnumMap<Shp, Obj> objects = new EnumMap<>(Shp.class);
 	public ActionListener alShape = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/panels/PanelTop.java
===================================================================
--- applications/editors/josm/plugins/smed/src/panels/PanelTop.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/panels/PanelTop.java	(revision 30737)
@@ -32,5 +32,5 @@
 	public JRadioButton squareDayButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SquareDayButton.png")));
 	public JRadioButton circleDayButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CircleDayButton.png")));
-	private EnumMap<Top, JRadioButton> tops = new EnumMap<Top, JRadioButton>(Top.class);
+	private EnumMap<Top, JRadioButton> tops = new EnumMap<>(Top.class);
 	private ActionListener alTop = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
Index: applications/editors/josm/plugins/smed/src/seamarks/SeaMark.java
===================================================================
--- applications/editors/josm/plugins/smed/src/seamarks/SeaMark.java	(revision 30736)
+++ applications/editors/josm/plugins/smed/src/seamarks/SeaMark.java	(revision 30737)
@@ -30,5 +30,5 @@
 	}
 
-	public static final EnumMap<Reg, String> RegSTR = new EnumMap<Reg, String>(Reg.class);
+	public static final EnumMap<Reg, String> RegSTR = new EnumMap<>(Reg.class);
 	static {
 		RegSTR.put(Reg.A, "iala-a");
@@ -69,5 +69,5 @@
 	}
 
-	public static final EnumMap<Obj, String> ObjSTR = new EnumMap<Obj, String>(Obj.class);
+	public static final EnumMap<Obj, String> ObjSTR = new EnumMap<>(Obj.class);
 	static {
 		ObjSTR.put(Obj.BCNCAR, "beacon_cardinal");
@@ -130,5 +130,5 @@
 	}
 
-	public static final EnumMap<Obj, Ent> EntMAP = new EnumMap<Obj, Ent>(Obj.class);
+	public static final EnumMap<Obj, Ent> EntMAP = new EnumMap<>(Obj.class);
 	static {
 		EntMAP.put(Obj.BCNCAR, Ent.BEACON);
@@ -170,5 +170,5 @@
 	}
 
-	public static final EnumMap<Obj, Grp> GrpMAP = new EnumMap<Obj, Grp>(Obj.class);
+	public static final EnumMap<Obj, Grp> GrpMAP = new EnumMap<>(Obj.class);
 	static {
 		GrpMAP.put(Obj.UNKOBJ, Grp.NUL);
@@ -229,5 +229,5 @@
 	}
 		 
-	public static final EnumMap<Cat, String> CatSTR = new EnumMap<Cat, String>(Cat.class);
+	public static final EnumMap<Cat, String> CatSTR = new EnumMap<>(Cat.class);
 	static {
 		CatSTR.put(Cat.LAM_PORT, "port");
@@ -435,5 +435,5 @@
 	}
 
-	public static final EnumMap<Shp, String> ShpSTR = new EnumMap<Shp, String>(Shp.class);
+	public static final EnumMap<Shp, String> ShpSTR = new EnumMap<>(Shp.class);
 	static {
 		ShpSTR.put(Shp.PILLAR, "pillar");
@@ -469,5 +469,5 @@
 	}
 
-	public static final EnumMap<Col, Color> ColMAP = new EnumMap<Col, Color>(Col.class);
+	public static final EnumMap<Col, Color> ColMAP = new EnumMap<>(Col.class);
 	static {
 		ColMAP.put(Col.UNKCOL, new Color(0xc0c0c0));
@@ -487,5 +487,5 @@
 	}
 
-	public static final EnumMap<Col, String> ColSTR = new EnumMap<Col, String>(Col.class);
+	public static final EnumMap<Col, String> ColSTR = new EnumMap<>(Col.class);
 	static {
 		ColSTR.put(Col.WHITE, "white");
@@ -539,5 +539,5 @@
 	}
 
-	private ArrayList<Col> bodyColour = new ArrayList<Col>();
+	private ArrayList<Col> bodyColour = new ArrayList<>();
 
 	public Col getObjColour(int i) {
@@ -577,5 +577,5 @@
 	}
 
-	private ArrayList<Col> topmarkColour = new ArrayList<Col>();
+	private ArrayList<Col> topmarkColour = new ArrayList<>();
 
 	public Col getTopColour(int i) {
@@ -619,5 +619,5 @@
 	}
 
-	public static final Map<EnumSet<Chr>, String> ChrMAP = new HashMap<EnumSet<Chr>, String>();
+	public static final Map<EnumSet<Chr>, String> ChrMAP = new HashMap<>();
 	static {
 		ChrMAP.put(EnumSet.of(Chr.FIXED), "F");
@@ -654,5 +654,5 @@
 	}
 
-	public static final EnumMap<Vis, String> VisSTR = new EnumMap<Vis, String>(Vis.class);
+	public static final EnumMap<Vis, String> VisSTR = new EnumMap<>(Vis.class);
 	static {
 		VisSTR.put(Vis.HIGH, "high");
@@ -670,5 +670,5 @@
 	}
 
-	public static final EnumMap<Lit, String> LitSTR = new EnumMap<Lit, String>(Lit.class);
+	public static final EnumMap<Lit, String> LitSTR = new EnumMap<>(Lit.class);
 	static {
 		LitSTR.put(Lit.VERT, "vertical");
@@ -696,5 +696,5 @@
 	}
 
-	public static final EnumMap<Exh, String> ExhSTR = new EnumMap<Exh, String>(Exh.class);
+	public static final EnumMap<Exh, String> ExhSTR = new EnumMap<>(Exh.class);
 	static {
 		ExhSTR.put(Exh.H24, "24h");
@@ -713,5 +713,5 @@
 			"", "", "", Vis.UNKVIS, Exh.UNKEXH, "", "", Col.UNKCOL };
 
-	private ArrayList<Object[]> sectors = new ArrayList<Object[]>();
+	private ArrayList<Object[]> sectors = new ArrayList<>();
 
 	public int getSectorCount() {
@@ -801,5 +801,5 @@
 	}
 
-	public static final EnumMap<Pat, String> PatSTR = new EnumMap<Pat, String>(Pat.class);
+	public static final EnumMap<Pat, String> PatSTR = new EnumMap<>(Pat.class);
 	static {
 		PatSTR.put(Pat.HSTRP, "horizontal");
@@ -850,5 +850,5 @@
 	}
 
-	public static final EnumMap<Top, String> TopSTR = new EnumMap<Top, String>(Top.class);
+	public static final EnumMap<Top, String> TopSTR = new EnumMap<>(Top.class);
 	static {
 		TopSTR.put(Top.CYL, "cylinder");
@@ -895,5 +895,5 @@
 	}
 
-	public static final EnumMap<Rtb, String> RtbSTR = new EnumMap<Rtb, String>(Rtb.class);
+	public static final EnumMap<Rtb, String> RtbSTR = new EnumMap<>(Rtb.class);
 	static {
 		RtbSTR.put(Rtb.RACON, "racon");
@@ -991,5 +991,5 @@
 	}
 
-	public static final EnumMap<Fog, String> FogSTR = new EnumMap<Fog, String>(Fog.class);
+	public static final EnumMap<Fog, String> FogSTR = new EnumMap<>(Fog.class);
 	static {
 		FogSTR.put(Fog.FOGSIG, "yes");
@@ -1068,5 +1068,5 @@
 	}
 
-	public static final EnumMap<Sts, String> StsSTR = new EnumMap<Sts, String>(Sts.class);
+	public static final EnumMap<Sts, String> StsSTR = new EnumMap<>(Sts.class);
 	static {
 		StsSTR.put(Sts.PERM, "permanent");
@@ -1104,5 +1104,5 @@
 	}
 
-	public static final EnumMap<Cns, String> CnsSTR = new EnumMap<Cns, String>(Cns.class);
+	public static final EnumMap<Cns, String> CnsSTR = new EnumMap<>(Cns.class);
 	static {
 		CnsSTR.put(Cns.BRICK, "masonry");
@@ -1131,5 +1131,5 @@
 	}
 
-	public static final EnumMap<Con, String> ConSTR = new EnumMap<Con, String>(Con.class);
+	public static final EnumMap<Con, String> ConSTR = new EnumMap<>(Con.class);
 	static {
 		ConSTR.put(Con.CONSP, "conspicuous");
@@ -1164,5 +1164,5 @@
 	}
 
-	public static final EnumMap<Fnc, String> FncSTR = new EnumMap<Fnc, String>(Fnc.class);
+	public static final EnumMap<Fnc, String> FncSTR = new EnumMap<>(Fnc.class);
 	static {
 		FncSTR.put(Fnc.UNKFNC, "");
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/ButtonDescription.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/ButtonDescription.java	(revision 30736)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/ButtonDescription.java	(revision 30737)
@@ -73,5 +73,5 @@
      */
     private static List<SurveyorActionDescription> createFromOneElement(SurveyorActionDescription actionDescription) {
-        List<SurveyorActionDescription> list = new ArrayList<SurveyorActionDescription>();
+        List<SurveyorActionDescription> list = new ArrayList<>();
         list.add(actionDescription);
         return list;
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionDescription.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionDescription.java	(revision 30736)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionDescription.java	(revision 30737)
@@ -51,5 +51,5 @@
         super();
         this.actionClass = actionClass;
-        this.params = new ArrayList<String>();
+        this.params = new ArrayList<>();
         for (int index = 0; index < params.length; index++) {
             this.params.add(params[index]);
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionFactory.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionFactory.java	(revision 30736)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionFactory.java	(revision 30737)
@@ -18,5 +18,5 @@
  */
 public class SurveyorActionFactory {
-    private static Map<String, SurveyorAction>actionCache = new HashMap<String, SurveyorAction>();
+    private static Map<String, SurveyorAction>actionCache = new HashMap<>();
     public static final String DEFAULT_PACKAGE = SurveyorActionFactory.class.getPackage().getName() + ".action";
 
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorComponent.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorComponent.java	(revision 30736)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorComponent.java	(revision 30737)
@@ -48,5 +48,5 @@
     public SurveyorComponent() {
         super();
-        hotKeys = new HashSet<String>();
+        hotKeys = new HashSet<>();
         setLayout(new BorderLayout());
         streetLabel = new JLabel(tr("Way: "));
@@ -132,5 +132,5 @@
             e.printStackTrace();
         }
-        List<SurveyorActionDescription> actions = new ArrayList<SurveyorActionDescription>();
+        List<SurveyorActionDescription> actions = new ArrayList<>();
         while(parser.hasNext()) {
             Object object = parser.next();
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorShowAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorShowAction.java	(revision 30736)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorShowAction.java	(revision 30737)
@@ -144,5 +144,5 @@
         SurveyorComponent surveyorComponent = null;
         parser.start(new BufferedReader(new InputStreamReader(in)));
-        List<SurveyorActionDescription> actions = new ArrayList<SurveyorActionDescription>();
+        List<SurveyorActionDescription> actions = new ArrayList<>();
         while(parser.hasNext()) {
             Object object = parser.next();
@@ -154,5 +154,5 @@
                 ((ButtonDescription)object).setActions(actions);
                 surveyorComponent.addButton(((ButtonDescription)object));
-                actions = new ArrayList<SurveyorActionDescription>();
+                actions = new ArrayList<>();
             } else if (object instanceof SurveyorActionDescription) {
                 //System.out.println("SurveyorActionDescription " + object);
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetNodeAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetNodeAction.java	(revision 30736)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetNodeAction.java	(revision 30737)
@@ -38,5 +38,5 @@
     @Override
     public void setParameters(List<String> parameters) {
-        keyValues = new ArrayList<Pair<String, String>>();
+        keyValues = new ArrayList<>();
         int pos;
         String key;
@@ -47,5 +47,5 @@
                 key = keyValuePair.substring(0, pos);
                 value = keyValuePair.substring(pos + 1);
-                keyValues.add(new Pair<String, String>(key, value));
+                keyValues.add(new Pair<>(key, value));
             } else {
                 System.err.println("SetNodeAction: ignoring invalid key value pair: " + keyValuePair);
Index: applications/editors/josm/plugins/surveyor/src/org/dinopolis/util/io/Tokenizer.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/org/dinopolis/util/io/Tokenizer.java	(revision 30736)
+++ applications/editors/josm/plugins/surveyor/src/org/dinopolis/util/io/Tokenizer.java	(revision 30737)
@@ -730,5 +730,5 @@
   {
     int token = nextToken();
-    List<String> list = new ArrayList<String>();
+    List<String> list = new ArrayList<>();
     String word = "";
 //    while(token != Tokenizer.EOF)
@@ -790,5 +790,5 @@
       Iterator<String> iterator = list.iterator();
       String value;
-      List<String> new_list = new ArrayList<String>();
+      List<String> new_list = new ArrayList<>();
       while(iterator.hasNext())
       {
Index: applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionListViewer.java
===================================================================
--- applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionListViewer.java	(revision 30736)
+++ applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionListViewer.java	(revision 30737)
@@ -94,5 +94,5 @@
         this.autoCompletionList = list;
         createGUI();
-        listener = new ArrayList<IAutoCompletionListListener>();
+        listener = new ArrayList<>();
     }
     
@@ -103,5 +103,5 @@
         this.autoCompletionList = null;
         createGUI();
-        listener = new ArrayList<IAutoCompletionListListener>();
+        listener = new ArrayList<>();
     }
 
Index: applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TagEditorModel.java
===================================================================
--- applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TagEditorModel.java	(revision 30736)
+++ applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TagEditorModel.java	(revision 30737)
@@ -147,5 +147,5 @@
      */
     public void updateJOSMSelection() {
-        ArrayList<Command> commands = new ArrayList<Command>();
+        ArrayList<Command> commands = new ArrayList<>();
         Collection<OsmPrimitive> selection = Main.main.getCurrentDataSet().getSelected();
         if (selection == null)
Index: applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/ui/PresetsTableModel.java
===================================================================
--- applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/ui/PresetsTableModel.java	(revision 30736)
+++ applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/ui/PresetsTableModel.java	(revision 30737)
@@ -14,7 +14,7 @@
     //private static final Logger logger = Logger.getLogger(PresetsTableModel.class.getName());
 
-    private final ArrayList<TableModelListener> listeners = new ArrayList<TableModelListener>();
-    private final ArrayList<TaggingPreset> items = new ArrayList<TaggingPreset>();
-    private final ArrayList<TaggingPreset> visibleItems = new ArrayList<TaggingPreset>();
+    private final ArrayList<TableModelListener> listeners = new ArrayList<>();
+    private final ArrayList<TaggingPreset> items = new ArrayList<>();
+    private final ArrayList<TaggingPreset> visibleItems = new ArrayList<>();
 
     protected void initModelFromPresets(Collection<TaggingPreset> presets) {
Index: applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector.java
===================================================================
--- applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector.java	(revision 30736)
+++ applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector.java	(revision 30737)
@@ -40,5 +40,5 @@
     private PresetsTable presetsTable = null;
     private JTextField   tfFilter = null;
-    private final ArrayList<IPresetSelectorListener> listeners = new ArrayList<IPresetSelectorListener>();
+    private final ArrayList<IPresetSelectorListener> listeners = new ArrayList<>();
     private JScrollPane scrollPane;
     private JButton btnApply;
Index: applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/tagspec/TagSpecification.java
===================================================================
--- applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/tagspec/TagSpecification.java	(revision 30736)
+++ applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/tagspec/TagSpecification.java	(revision 30737)
@@ -39,5 +39,5 @@
      */
     public TagSpecification() {
-        lables = new ArrayList<LabelSpecification>();
+        lables = new ArrayList<>();
     }
 
Index: applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/tagspec/TagSpecifications.java
===================================================================
--- applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/tagspec/TagSpecifications.java	(revision 30736)
+++ applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/tagspec/TagSpecifications.java	(revision 30737)
@@ -91,5 +91,5 @@
      */
     public TagSpecifications() {
-        tagSpecifications = new ArrayList<TagSpecification>();
+        tagSpecifications = new ArrayList<>();
     }
 
@@ -125,5 +125,5 @@
 
     public List<AutoCompletionListItem> getKeysForAutoCompletion(AutoCompletionContext context) {
-        ArrayList<AutoCompletionListItem> keys = new ArrayList<AutoCompletionListItem>();
+        ArrayList<AutoCompletionListItem> keys = new ArrayList<>();
         for (TagSpecification spec : tagSpecifications) {
             if (!spec.isApplicable(context)) {
@@ -139,5 +139,5 @@
 
     public List<AutoCompletionListItem> getLabelsForAutoCompletion(String forKey, AutoCompletionContext context) {
-        ArrayList<AutoCompletionListItem> items = new ArrayList<AutoCompletionListItem>();
+        ArrayList<AutoCompletionListItem> items = new ArrayList<>();
         for (TagSpecification spec : tagSpecifications) {
             if (spec.getKey().equals(forKey)) {
@@ -164,5 +164,5 @@
      */
     public ArrayList<KeyValuePair> asList() {
-        ArrayList<KeyValuePair> entries = new ArrayList<KeyValuePair>();
+        ArrayList<KeyValuePair> entries = new ArrayList<>();
 
         for (TagSpecification s : tagSpecifications) {
@@ -233,5 +233,5 @@
          */
         protected void startElementOsmTagDefinitions(Attributes atts) throws SAXException {
-            tagSpecifications = new ArrayList<TagSpecification>();
+            tagSpecifications = new ArrayList<>();
         }
 
Index: applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector.java
===================================================================
--- applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector.java	(revision 30736)
+++ applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector.java	(revision 30737)
@@ -38,5 +38,5 @@
     private JButton btnApply;
     private JScrollPane scrollPane;
-    private final ArrayList<ITagSelectorListener> listeners = new ArrayList<ITagSelectorListener>();
+    private final ArrayList<ITagSelectorListener> listeners = new ArrayList<>();
 
     protected JPanel buildFilterPanel() {
Index: applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TagsTableModel.java
===================================================================
--- applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TagsTableModel.java	(revision 30736)
+++ applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TagsTableModel.java	(revision 30737)
@@ -23,6 +23,6 @@
 
     public TagsTableModel() {
-        items = new ArrayList<KeyValuePair>();
-        visibleItems = new ArrayList<KeyValuePair>();
+        items = new ArrayList<>();
+        visibleItems = new ArrayList<>();
     }
 
Index: applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java	(revision 30737)
@@ -366,5 +366,5 @@
      */
     TreeSet<String> createAutoCompletionInfo() {
-        final TreeSet<String> names = new TreeSet<String>();
+        final TreeSet<String> names = new TreeSet<>();
         for (OsmPrimitive osm : Main.main.getCurrentDataSet()
                 .allNonDeletedPrimitives()) {
Index: applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java	(revision 30736)
+++ applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java	(revision 30737)
@@ -55,10 +55,10 @@
         // Set to keep track of all the nodes that have been visited - that is: if
         // we encounter them again we will not follow onto the connected ways.
-        HashSet<Node> visitedNodes = new HashSet<Node>();
+        HashSet<Node> visitedNodes = new HashSet<>();
 
         // Set to keep track of the ways the algorithm has seen, but not yet visited.
         // Since when a way is visited all of its nodes are marked as visited, there
         // is no need to keep a visitedWays set.
-        HashSet<Way> front = new HashSet<Way>();
+        HashSet<Way> front = new HashSet<>();
 
         // Find the first or last way from the teracced houses.
@@ -85,8 +85,8 @@
 
         // This is like a visitedWays set, but in a linear order.
-        LinkedList<Way> orderedWays = new LinkedList<Way>();
+        LinkedList<Way> orderedWays = new LinkedList<>();
 
         // And the tags to reverse on the orderedWays.
-        LinkedList<String> houseNumbers = new LinkedList<String>();
+        LinkedList<String> houseNumbers = new LinkedList<>();
 
         while (front.size() > 0) {
@@ -114,5 +114,5 @@
         }
 
-        Collection<Command> commands = new LinkedList<Command>();
+        Collection<Command> commands = new LinkedList<>();
         for (int i = 0; i < orderedWays.size(); ++i) {
             commands.add(new ChangePropertyCommand(
Index: applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java	(revision 30736)
+++ applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java	(revision 30737)
@@ -82,5 +82,5 @@
 
     protected static final Set<Relation> findAssociatedStreets(Collection<OsmPrimitive> objects) {
-        Set<Relation> result = new HashSet<Relation>();
+        Set<Relation> result = new HashSet<>();
         if (objects != null) {
             for (OsmPrimitive c : objects) {
@@ -113,5 +113,5 @@
         Way street = null;
         String streetname = null;
-        ArrayList<Node> housenumbers = new ArrayList<Node>();
+        ArrayList<Node> housenumbers = new ArrayList<>();
         Node init = null;
 
@@ -361,8 +361,8 @@
         // This list will contain nodes of the outline that are used in new lines.
         // These nodes will not be deleted with the outline (if deleting was prompted).
-        ArrayList<Node> reused_nodes = new ArrayList<Node>();
-
-        this.commands = new LinkedList<Command>();
-        Collection<Way> ways = new LinkedList<Way>();
+        ArrayList<Node> reused_nodes = new ArrayList<>();
+
+        this.commands = new LinkedList<>();
+        Collection<Way> ways = new LinkedList<>();
 
         if (nb > 1) {
@@ -401,5 +401,5 @@
                 // Delete outline nodes having no tags and referrers but the outline itself
                 List<Node> nodes = outline.getNodes();
-                ArrayList<Node> nodesToDelete = new ArrayList<Node>();
+                ArrayList<Node> nodesToDelete = new ArrayList<>();
                 for (Node n : nodes)
                     if (!n.hasKeys() && n.getReferrers().size() == 1 && !reused_nodes.contains(n))
@@ -462,5 +462,5 @@
                                 tagsInConflict, primitives, Collections.singleton(outline));
                         if (!conflictCommands.isEmpty()) {
-                            List<Command> newCommands = new ArrayList<Command>(commands);
+                            List<Command> newCommands = new ArrayList<>(commands);
                             newCommands.addAll(conflictCommands);
                             setSequence(newCommands.toArray(new Command[0]));
@@ -638,5 +638,5 @@
         }
 
-        return new Pair<Way, Way>(front, back);
+        return new Pair<>(front, back);
     }
 
@@ -700,5 +700,5 @@
 
         final int length = a.length;
-        ArrayList<SortWithIndex> sortable = new ArrayList<SortWithIndex>(length);
+        ArrayList<SortWithIndex> sortable = new ArrayList<>(length);
         for (int i = 0; i < length; ++i) {
             sortable.add(new SortWithIndex(a[i], i));
Index: applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/ConnectWays.java
===================================================================
--- applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/ConnectWays.java	(revision 30736)
+++ applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/ConnectWays.java	(revision 30737)
@@ -37,6 +37,6 @@
      */
     public static Command connect(Way way) {
-        Map<Way, Way> modifiedWays = new HashMap<Way, Way>();
-        LinkedList<Command> cmds = new LinkedList<Command>();
+        Map<Way, Way> modifiedWays = new HashMap<>();
+        LinkedList<Command> cmds = new LinkedList<>();
         Way newWay = new Way(way);
         for (int i = 0; i < way.getNodesCount() - 1; i++) {
@@ -92,5 +92,5 @@
      */
     private static List<Command> mergeNodes(Node n1, Node n2, Way way){
-        List<Command> cmds = new LinkedList<Command>();
+        List<Command> cmds = new LinkedList<>();
         cmds.add(new MoveCommand(n2,
                  (n1.getEastNorth().getX() - n2.getEastNorth().getX())/2,
Index: applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/TracerAction.java
===================================================================
--- applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/TracerAction.java	(revision 30736)
+++ applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/TracerAction.java	(revision 30737)
@@ -102,5 +102,5 @@
 
     private void traceSync(LatLon pos, ProgressMonitor progressMonitor) {
-        Collection<Command> commands = new LinkedList<Command>();
+        Collection<Command> commands = new LinkedList<>();
 
         progressMonitor.beginTask(null, 3);
Index: applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/TracerServer.java
===================================================================
--- applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/TracerServer.java	(revision 30736)
+++ applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/TracerServer.java	(revision 30737)
@@ -50,5 +50,5 @@
         try {
             String content = callServer("trace/simple/" + pos.lat() + ";" + pos.lon());
-            ArrayList<LatLon> nodelist = new ArrayList<LatLon>();
+            ArrayList<LatLon> nodelist = new ArrayList<>();
             String[] lines = content.split("\\|");
             for (String line : lines) {
@@ -60,5 +60,5 @@
             return nodelist;
         } catch (Exception e) {
-            return new ArrayList<LatLon>();
+            return new ArrayList<>();
         }
     }
Index: applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/ConnectWays.java
===================================================================
--- applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/ConnectWays.java	(revision 30736)
+++ applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/ConnectWays.java	(revision 30737)
@@ -146,6 +146,6 @@
      */
     public static Command connect(Way newWay, LatLon pos, ServerParam param, boolean ctrl, boolean alt) {
-        LinkedList<Command> cmds = new LinkedList<Command>();
-        LinkedList<Command> cmds2 = new LinkedList<Command>();
+        LinkedList<Command> cmds = new LinkedList<>();
+        LinkedList<Command> cmds2 = new LinkedList<>();
         
         s_oParam = param;
@@ -214,6 +214,6 @@
      */
     public static List<Command> connectTo() {
-        Map<Way, Way> modifiedWays = new HashMap<Way, Way>();
-        LinkedList<Command> cmds = new LinkedList<Command>();
+        Map<Way, Way> modifiedWays = new HashMap<>();
+        LinkedList<Command> cmds = new LinkedList<>();
         Way way = new Way(s_oWay);
         for (int i = 0; i < way.getNodesCount() - 1; i++) {
@@ -271,5 +271,5 @@
      */
     private static List<Command> mergeNodes(Node n1, Node n2){
-        List<Command> cmds = new LinkedList<Command>();
+        List<Command> cmds = new LinkedList<>();
         cmds.add(new MoveCommand(n2,
                  (n1.getEastNorth().getX() - n2.getEastNorth().getX())/2,
Index: applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TagValues.java
===================================================================
--- applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TagValues.java	(revision 30736)
+++ applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TagValues.java	(revision 30737)
@@ -53,5 +53,5 @@
         
     	// get values
-        List<String> tagValues = new ArrayList<String>();
+        List<String> tagValues = new ArrayList<>();
         List<AutoCompletionListItem> values = Main.main.getCurrentDataSet().getAutoCompletionManager().getValues(m_strTag);
         for ( AutoCompletionListItem i : values ) {
@@ -65,5 +65,5 @@
     	} else {
     		String[] prefered = m_strPreferredValues.split(";");
-    		tagValues = new ArrayList<String>();
+    		tagValues = new ArrayList<>();
     		
     		for (String str: prefered) {
Index: applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TracerAction.java
===================================================================
--- applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TracerAction.java	(revision 30736)
+++ applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TracerAction.java	(revision 30737)
@@ -83,5 +83,5 @@
         
     	Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
-    	List<Command> commands = new ArrayList<Command>();
+    	List<Command> commands = new ArrayList<>();
     	
     	if ( checkActiveServerParam() == false ) return;
@@ -281,5 +281,5 @@
     
     private void traceSync(LatLon pos, ProgressMonitor progressMonitor) {
-        Collection<Command> commands = new LinkedList<Command>();
+        Collection<Command> commands = new LinkedList<>();
         
         progressMonitor.beginTask(null, 3);
@@ -305,5 +305,5 @@
 	            coordList = oTraceSimple.m_listLatLon;
         	} catch (Exception e) {
-            	coordList = new ArrayList<LatLon>();
+            	coordList = new ArrayList<>();
             }
            
Index: applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TracerDebug.java
===================================================================
--- applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TracerDebug.java	(revision 30736)
+++ applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TracerDebug.java	(revision 30737)
@@ -66,8 +66,8 @@
         	Collection<? extends OsmPrimitive> cpx = null;
         	
-        	List<OsmPrimitive> lp1 = new LinkedList<OsmPrimitive>();
-        	List<OsmPrimitive> lp2 = new LinkedList<OsmPrimitive>();
-        	List<OsmPrimitive> lp3 = new LinkedList<OsmPrimitive>();
-        	List<OsmPrimitive> lp = new LinkedList<OsmPrimitive>();
+        	List<OsmPrimitive> lp1 = new LinkedList<>();
+        	List<OsmPrimitive> lp2 = new LinkedList<>();
+        	List<OsmPrimitive> lp3 = new LinkedList<>();
+        	List<OsmPrimitive> lp = new LinkedList<>();
         	
         	cp1 = lp1;
Index: applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/preferences/ServerParamList.java
===================================================================
--- applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/preferences/ServerParamList.java	(revision 30736)
+++ applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/preferences/ServerParamList.java	(revision 30737)
@@ -29,5 +29,5 @@
 
 public class ServerParamList {
-    ArrayList<ServerParam> m_listServerParam = new ArrayList<ServerParam>();
+    ArrayList<ServerParam> m_listServerParam = new ArrayList<>();
     ServerParam m_oActivParam = null;
     String m_strFilename;
@@ -107,5 +107,5 @@
     
     public List<ServerParam> getEnableParamList() {
-    	List<ServerParam> listParam = new ArrayList<ServerParam>();
+    	List<ServerParam> listParam = new ArrayList<>();
     	for ( ServerParam param: m_listServerParam) {
         	if (param.isEnabled()) {
Index: applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/server/GetTrace.java
===================================================================
--- applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/server/GetTrace.java	(revision 30736)
+++ applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/server/GetTrace.java	(revision 30737)
@@ -28,5 +28,5 @@
 	private LatLon m_oLatLon;
 	private ServerParam m_oServerParam;
-    public ArrayList<LatLon> m_listLatLon = new ArrayList<LatLon>();
+    public ArrayList<LatLon> m_listLatLon = new ArrayList<>();
     
     /**
@@ -71,5 +71,5 @@
             strResponse = strResponse.substring(1, strResponse.length()-1);
             
-            ArrayList<LatLon> nodelist = new ArrayList<LatLon>();
+            ArrayList<LatLon> nodelist = new ArrayList<>();
             
             String[] astrPoints = strResponse.split("\\)\\(");
@@ -82,5 +82,5 @@
             m_listLatLon = nodelist;
         } catch (Exception e) {
-        	m_listLatLon = new ArrayList<LatLon>();
+        	m_listLatLon = new ArrayList<>();
         }
     }
Index: applications/editors/josm/plugins/trustosm/src/tools/NameGenerator.java
===================================================================
--- applications/editors/josm/plugins/trustosm/src/tools/NameGenerator.java	(revision 30736)
+++ applications/editors/josm/plugins/trustosm/src/tools/NameGenerator.java	(revision 30737)
@@ -49,7 +49,7 @@
  */
 public class NameGenerator {
-    ArrayList<String> pre = new ArrayList<String>();
-    ArrayList<String> mid = new ArrayList<String>();
-    ArrayList<String> sur = new ArrayList<String>();
+    ArrayList<String> pre = new ArrayList<>();
+    ArrayList<String> mid = new ArrayList<>();
+    ArrayList<String> sur = new ArrayList<>();
 
     final private static char[] vocals = {'a', 'e', 'i', 'o', 'u', 'ä', 'ö', 'õ', 'ü', 'y'};
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/CollectionUtils.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/CollectionUtils.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/CollectionUtils.java	(revision 30737)
@@ -37,5 +37,5 @@
     
     public static <E> Set<E> toSet(Iterable<? extends E> iterable) {
-        final Set<E> set = new HashSet<E>();
+        final Set<E> set = new HashSet<>();
         
         for (E e : iterable) {
@@ -47,5 +47,5 @@
     
     public static <E> List<E> toList(Iterable<? extends E> iterable) {
-        final List<E> list = new ArrayList<E>();
+        final List<E> list = new ArrayList<>();
         
         for (E e : iterable) {
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/GuiContainer.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/GuiContainer.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/GuiContainer.java	(revision 30737)
@@ -44,6 +44,6 @@
     private final double laneWidth;
     
-    private final Map<Junction, JunctionGui> junctions = new HashMap<Junction, JunctionGui>();
-    private final Map<Road, RoadGui> roads = new HashMap<Road, RoadGui>();
+    private final Map<Junction, JunctionGui> junctions = new HashMap<>();
+    private final Map<Road, RoadGui> roads = new HashMap<>();
     
     private final Stroke connectionStroke;
@@ -159,9 +159,9 @@
         }
         
-        final List<Junction> primaries = new ArrayList<Junction>(mc.getPrimaryJunctions());
-        final List<Double> top = new ArrayList<Double>();
-        final List<Double> left = new ArrayList<Double>();
-        final List<Double> right = new ArrayList<Double>();
-        final List<Double> bottom = new ArrayList<Double>();
+        final List<Junction> primaries = new ArrayList<>(mc.getPrimaryJunctions());
+        final List<Double> top = new ArrayList<>();
+        final List<Double> left = new ArrayList<>();
+        final List<Double> right = new ArrayList<>();
+        final List<Double> bottom = new ArrayList<>();
         
         for (Junction j : primaries) {
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/GuiUtil.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/GuiUtil.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/GuiUtil.java	(revision 30737)
@@ -133,5 +133,5 @@
     
     public static List<Point2D> locs(Iterable<Junction> junctions) {
-        final List<Point2D> locs = new ArrayList<Point2D>();
+        final List<Point2D> locs = new ArrayList<>();
         
         for (Junction j : junctions) {
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/JunctionGui.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/JunctionGui.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/JunctionGui.java	(revision 30737)
@@ -296,5 +296,5 @@
     final double y;
     
-    private final NavigableMap<Double, Linkage> roads = new TreeMap<Double, Linkage>();
+    private final NavigableMap<Double, Linkage> roads = new TreeMap<>();
     
     private final Path2D area = new Path2D.Double();
@@ -310,5 +310,5 @@
         this.y = loc.getY();
         
-        final Set<Road> done = new HashSet<Road>();
+        final Set<Road> done = new HashSet<>();
         for (Road r : j.getRoads()) {
             if (!done.contains(r)) {
@@ -363,5 +363,5 @@
     
     private Iterable<Corner> corners() {
-        final List<Corner> result = new ArrayList<JunctionGui.Corner>(roads.size());
+        final List<Corner> result = new ArrayList<>(roads.size());
         
         Linkage last = roads.lastEntry().getValue();
@@ -396,5 +396,5 @@
     
     public Set<RoadGui> getRoads() {
-        final Set<RoadGui> result = new HashSet<RoadGui>();
+        final Set<RoadGui> result = new HashSet<>();
         
         for (Linkage l : roads.values()) {
@@ -435,8 +435,8 @@
         g2d.fill(area);
         
-        final List<InteractiveElement> result = new ArrayList<InteractiveElement>();
+        final List<InteractiveElement> result = new ArrayList<>();
         
         if (getModel().isPrimary()) {
-            for (Road.End r : new HashSet<Road.End>(getModel().getRoadEnds())) {
+            for (Road.End r : new HashSet<>(getModel().getRoadEnds())) {
                 for (Turn t : r.getTurns()) {
                     result.add(new TurnConnection(t));
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/JunctionPane.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/JunctionPane.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/JunctionPane.java	(revision 30737)
@@ -162,5 +162,5 @@
     private BufferedImage interactive;
     
-    private final NavigableMap<Integer, List<InteractiveElement>> interactives = new TreeMap<Integer, List<InteractiveElement>>();
+    private final NavigableMap<Integer, List<InteractiveElement>> interactives = new TreeMap<>();
     private State state;
     private InteractiveElement dragging;
@@ -423,5 +423,5 @@
     
     private List<InteractiveElement> interactives() {
-        final List<InteractiveElement> result = new ArrayList<InteractiveElement>();
+        final List<InteractiveElement> result = new ArrayList<>();
         
         for (List<InteractiveElement> ies : interactives.descendingMap().values()) {
@@ -461,5 +461,5 @@
             final List<InteractiveElement> list;
             if (existing == null) {
-                list = new ArrayList<InteractiveElement>();
+                list = new ArrayList<>();
                 interactives.put(ie.getZIndex(), list);
             } else {
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/LaneGui.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/LaneGui.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/LaneGui.java	(revision 30737)
@@ -241,5 +241,5 @@
             }
             
-            final List<Road> via = new ArrayList<Road>();
+            final List<Road> via = new ArrayList<>();
             assert (s.getViaConnectors().size() & 1) == 0;
             for (int i = 0; i < s.getViaConnectors().size(); i += 2) {
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/RoadGui.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/RoadGui.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/RoadGui.java	(revision 30737)
@@ -249,5 +249,5 @@
             this.end = end;
             
-            final List<LaneGui> lanes = new ArrayList<LaneGui>(end.getLanes().size());
+            final List<LaneGui> lanes = new ArrayList<>(end.getLanes().size());
             for (Lane l : end.getOppositeEnd().getLanes()) {
                 lanes.add(new LaneGui(RoadGui.this, l));
@@ -464,5 +464,5 @@
     
     private static final List<Point2D> prepended(List<Point2D> bends, Point2D point) {
-        final List<Point2D> result = new ArrayList<Point2D>(bends.size() + 1);
+        final List<Point2D> result = new ArrayList<>(bends.size() + 1);
         result.add(point);
         result.addAll(bends);
@@ -486,5 +486,5 @@
     
     private final Road road;
-    private final List<Segment> segments = new ArrayList<Segment>();
+    private final List<Segment> segments = new ArrayList<>();
     
     final double connectorRadius;
@@ -501,5 +501,5 @@
         this.incomingB = new IncomingConnector(road.getToEnd());
         
-        final List<Point2D> bends = new ArrayList<Point2D>();
+        final List<Point2D> bends = new ArrayList<>();
         final List<Node> nodes = road.getRoute().getNodes();
         for (int i = nodes.size() - 2; i > 0; --i) {
@@ -582,5 +582,5 @@
     
     List<InteractiveElement> paint(Graphics2D g2d) {
-        final List<InteractiveElement> result = new ArrayList<InteractiveElement>();
+        final List<InteractiveElement> result = new ArrayList<>();
         
         result.addAll(paintLanes(g2d));
@@ -604,5 +604,5 @@
     
     private List<LaneAdder> laneAdders() {
-        final List<LaneAdder> result = new ArrayList<LaneAdder>(4);
+        final List<LaneAdder> result = new ArrayList<>(4);
         
         if (!incomingA.getLanes().isEmpty()) {
@@ -624,5 +624,5 @@
         }
         
-        final List<Extender> result = new ArrayList<Extender>();
+        final List<Extender> result = new ArrayList<>();
         
         final Node n = end.getJunction().getNode();
@@ -678,5 +678,5 @@
         g2d.draw(middleLines);
         
-        final List<InteractiveElement> result = new ArrayList<InteractiveElement>();
+        final List<InteractiveElement> result = new ArrayList<>();
         
         moveIncoming(getModel().getFromEnd());
@@ -707,5 +707,5 @@
         
         Path innerPath = middle.offset(innerMargin, -1, -1, innerMargin);
-        final List<Path> linePaths = new ArrayList<Path>();
+        final List<Path> linePaths = new ArrayList<>();
         linePaths.add(innerPath);
         
@@ -867,5 +867,5 @@
     
     public List<LaneGui> getLanes() {
-        final List<LaneGui> result = new ArrayList<LaneGui>();
+        final List<LaneGui> result = new ArrayList<>();
         
         result.addAll(incomingB.getLanes());
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/State.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/State.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/State.java	(revision 30737)
@@ -47,5 +47,5 @@
             }
             
-            final List<RoadGui.ViaConnector> tmp = new ArrayList<RoadGui.ViaConnector>(vias.size() + 1);
+            final List<RoadGui.ViaConnector> tmp = new ArrayList<>(vias.size() + 1);
             final boolean even = (vias.size() & 1) == 0;
             final RoadGui.ViaConnector last = vias.get(vias.size() - 1);
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/TurnLanesDialog.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/TurnLanesDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/TurnLanesDialog.java	(revision 30737)
@@ -142,5 +142,5 @@
     private final JToggleButton validateButton = new JToggleButton(validateAction);
     
-    private final Set<OsmPrimitive> selected = new HashSet<OsmPrimitive>();
+    private final Set<OsmPrimitive> selected = new HashSet<>();
     
     private boolean editing = true;
@@ -205,5 +205,5 @@
 	@Override
 	public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
-        if (selected.equals(new HashSet<OsmPrimitive>(newSelection))) {
+        if (selected.equals(new HashSet<>(newSelection))) {
             return;
         }
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/ValidationPanel.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/ValidationPanel.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/ValidationPanel.java	(revision 30737)
@@ -74,5 +74,5 @@
     
     private final DefaultTableModel issueModel = new DefaultTableModel(COLUMN_NAMES, 0);
-    private final List<Issue> issues = new ArrayList<Issue>();
+    private final List<Issue> issues = new ArrayList<>();
     private final JTable issueTable = new JTable(issueModel) {
         private static final long serialVersionUID = 6323348290180585298L;
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/GenericCommand.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/GenericCommand.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/GenericCommand.java	(revision 30737)
@@ -34,5 +34,5 @@
     private final DataSet dataSet;
     private final String description;
-    private final Map<OsmPrimitive, BeforeAfter> beforeAfters = new HashMap<OsmPrimitive, BeforeAfter>();
+    private final Map<OsmPrimitive, BeforeAfter> beforeAfters = new HashMap<>();
     
     public GenericCommand(DataSet dataSet, String description) {
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Issue.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Issue.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Issue.java	(revision 30737)
@@ -49,5 +49,5 @@
         QuickFix quickFix) {
         this.relation = relation;
-        this.primitives = Collections.unmodifiableList(new ArrayList<OsmPrimitive>(primitives));
+        this.primitives = Collections.unmodifiableList(new ArrayList<>(primitives));
         this.severity = severity;
         this.description = description;
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Junction.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Junction.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Junction.java	(revision 30737)
@@ -13,5 +13,5 @@
     
     private final Node node;
-    private final Set<Way> roads = new HashSet<Way>();
+    private final Set<Way> roads = new HashSet<>();
     
     Junction(ModelContainer container, Node n) {
@@ -29,5 +29,5 @@
     
     public List<Road> getRoads() {
-        final List<Road> result = new ArrayList<Road>(roads.size());
+        final List<Road> result = new ArrayList<>(roads.size());
         
         for (Way w : roads) {
@@ -39,5 +39,5 @@
     
     public List<Road.End> getRoadEnds() {
-        final List<Road.End> result = new ArrayList<Road.End>(roads.size());
+        final List<Road.End> result = new ArrayList<>(roads.size());
         
         for (Way w : roads) {
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Lane.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Lane.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Lane.java	(revision 30737)
@@ -27,5 +27,5 @@
     
     static List<Lane> load(Road.End roadEnd) {
-        final List<Lane> result = new ArrayList<Lane>();
+        final List<Lane> result = new ArrayList<>();
         int i;
         
@@ -50,5 +50,5 @@
     
     static List<Double> loadLengths(Relation r, String key, double lengthBound) {
-        final List<Double> result = new ArrayList<Double>();
+        final List<Double> result = new ArrayList<>();
         
         if (r != null && r.get(key) != null) {
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/ModelContainer.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/ModelContainer.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/ModelContainer.java	(revision 30737)
@@ -24,10 +24,10 @@
     
     public static ModelContainer create(Iterable<Node> primaryNodes, Iterable<Way> primaryWays) {
-        return new ModelContainer(new HashSet<Node>(CollectionUtils.toList(primaryNodes)), new HashSet<Way>(
+        return new ModelContainer(new HashSet<>(CollectionUtils.toList(primaryNodes)), new HashSet<>(
                 CollectionUtils.toList(primaryWays)), false);
     }
     
     public static ModelContainer createEmpty(Iterable<Node> primaryNodes, Iterable<Way> primaryWays) {
-        return new ModelContainer(new HashSet<Node>(CollectionUtils.toList(primaryNodes)), new HashSet<Way>(
+        return new ModelContainer(new HashSet<>(CollectionUtils.toList(primaryNodes)), new HashSet<>(
                 CollectionUtils.toList(primaryWays)), true);
     }
@@ -43,5 +43,5 @@
             closed = true;
             
-            for (Node n : new ArrayList<Node>(closedNodes)) {
+            for (Node n : new ArrayList<>(closedNodes)) {
                 for (Way w : Utils.filterRoads(n.getReferrers())) {
                     if (w.isFirstLastNode(n)) {
@@ -50,5 +50,5 @@
                 }
                 
-                for (Way w : new ArrayList<Way>(closedWays)) {
+                for (Way w : new ArrayList<>(closedWays)) {
                     closed &= close(closedNodes, closedWays, w);
                 }
@@ -78,5 +78,5 @@
         boolean closed = true;
         
-        final List<Way> via = new ArrayList<Way>();
+        final List<Way> via = new ArrayList<>();
         for (RelationMember m : Utils.getMembers(r, Constants.TURN_ROLE_VIA)) {
             if (m.isWay()) {
@@ -113,6 +113,6 @@
     }
     
-    private final Map<Node, Junction> junctions = new HashMap<Node, Junction>();
-    private final Map<Way, Road> roads = new HashMap<Way, Road>();
+    private final Map<Node, Junction> junctions = new HashMap<>();
+    private final Map<Way, Road> roads = new HashMap<>();
     
     private final Set<Node> primaryNodes;
@@ -123,10 +123,10 @@
     private ModelContainer(Set<Node> primaryNodes, Set<Way> primaryWays, boolean empty) {
         if (empty) {
-            this.primaryNodes = Collections.unmodifiableSet(new HashSet<Node>(primaryNodes));
-            this.primaryWays = Collections.unmodifiableSet(new HashSet<Way>(primaryWays));
+            this.primaryNodes = Collections.unmodifiableSet(new HashSet<>(primaryNodes));
+            this.primaryWays = Collections.unmodifiableSet(new HashSet<>(primaryWays));
             this.empty = true;
         } else {
-            final Set<Node> closedNodes = filterUsables(new HashSet<Node>(primaryNodes));
-            final Set<Way> closedWays = filterUsables(new HashSet<Way>(primaryWays));
+            final Set<Node> closedNodes = filterUsables(new HashSet<>(primaryNodes));
+            final Set<Way> closedWays = filterUsables(new HashSet<>(primaryWays));
             
             close(closedNodes, closedWays);
@@ -154,8 +154,8 @@
     
     private Set<Pair<Way, Junction>> createPrimaryJunctions() {
-        final Set<Pair<Way, Junction>> roads = new HashSet<Pair<Way, Junction>>();
+        final Set<Pair<Way, Junction>> roads = new HashSet<>();
         
         for (Node n : primaryNodes) {
-            final List<Way> ws = new ArrayList<Way>();
+            final List<Way> ws = new ArrayList<>();
             for (Way w : Utils.filterRoads(n.getReferrers())) {
                 if (w.isFirstLastNode(n)) {
@@ -167,5 +167,5 @@
                 final Junction j = register(new Junction(this, n));
                 for (Way w : ws) {
-                    roads.add(new Pair<Way, Junction>(w, j));
+                    roads.add(new Pair<>(w, j));
                 }
             }
@@ -228,5 +228,5 @@
         final String ERR_ILLEGAL_ARGS = "The given roads can not be merged into one.";
         
-        final List<Way> ws = new ArrayList<Way>(CollectionUtils.toList(CollectionUtils.reverse(a.getRoute().getWays())));
+        final List<Way> ws = new ArrayList<>(CollectionUtils.toList(CollectionUtils.reverse(a.getRoute().getWays())));
         final List<Way> bws = b.getRoute().getWays();
         
@@ -262,5 +262,5 @@
         }
         
-        final Set<Junction> pjs = new HashSet<Junction>();
+        final Set<Junction> pjs = new HashSet<>();
         for (Node n : primaryNodes) {
             pjs.add(getJunction(n));
@@ -274,5 +274,5 @@
         }
         
-        final Set<Road> prs = new HashSet<Road>();
+        final Set<Road> prs = new HashSet<>();
         for (Way w : primaryWays) {
             prs.add(roads.get(w));
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Road.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Road.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Road.java	(revision 30737)
@@ -245,5 +245,5 @@
             
             final double extraLength = left ? extraLengthLeft : extraLengthRight;
-            final List<Double> newLengths = new ArrayList<Double>();
+            final List<Double> newLengths = new ArrayList<>();
             int i = Math.abs(lane.getIndex());
             final String key = left ? Constants.LENGTHS_KEY_LENGTHS_LEFT : Constants.LENGTHS_KEY_LENGTHS_RIGHT;
@@ -275,6 +275,6 @@
     
     private static Pair<Relation, Relation> getLengthRelations(Way w, Node n) {
-        final List<Relation> left = new ArrayList<Relation>();
-        final List<Relation> right = new ArrayList<Relation>();
+        final List<Relation> left = new ArrayList<>();
+        final List<Relation> right = new ArrayList<>();
         
         for (OsmPrimitive p : w.getReferrers()) {
@@ -307,5 +307,5 @@
         }
         
-        return new Pair<Relation, Relation>( //
+        return new Pair<>( //
                 left.isEmpty() ? null : left.get(0), //
                 right.isEmpty() ? null : right.get(0) //
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Route.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Route.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Route.java	(revision 30737)
@@ -135,5 +135,5 @@
     
     public static Route create(List<Way> ws, Node end) {
-        final List<Segment> segments = new ArrayList<Segment>(ws.size());
+        final List<Segment> segments = new ArrayList<>(ws.size());
         
         for (Way w : ws) {
@@ -153,5 +153,5 @@
     
     private Route(List<Segment> segments) {
-        this.segments = Collections.unmodifiableList(new ArrayList<Segment>(segments));
+        this.segments = Collections.unmodifiableList(new ArrayList<>(segments));
     }
     
@@ -161,5 +161,5 @@
     
     public List<Node> getNodes() {
-        final List<Node> ns = new ArrayList<Node>();
+        final List<Node> ns = new ArrayList<>();
         
         ns.add(segments.get(0).getStart());
@@ -220,5 +220,5 @@
     
     public List<Way> getWays() {
-        final List<Way> ws = new ArrayList<Way>();
+        final List<Way> ws = new ArrayList<>();
         
         for (Segment s : segments) {
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Turn.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Turn.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Turn.java	(revision 30737)
@@ -21,5 +21,5 @@
 public final class Turn {
     static Set<Turn> load(ModelContainer c, String role, OsmPrimitive primitive) {
-        final Set<Turn> result = new HashSet<Turn>();
+        final Set<Turn> result = new HashSet<>();
         
         for (Relation r : OsmPrimitive.getFilteredList(primitive.getReferrers(), Relation.class)) {
@@ -61,5 +61,5 @@
         
         final List<Way> tmp = Utils.getMemberWays(r, Constants.TURN_ROLE_VIA);
-        final LinkedList<Road> via = new LinkedList<Road>();
+        final LinkedList<Road> via = new LinkedList<>();
         
         final Road.End fromRoadEnd = c.getJunction(Utils.lineUp(from, tmp.get(0))).getRoadEnd(from);
@@ -97,5 +97,5 @@
         n = Utils.getOppositeEnd(to, n);
         
-        final Set<Turn> result = new HashSet<Turn>();
+        final Set<Turn> result = new HashSet<>();
         for (int i : indices(r, Constants.TURN_KEY_LANES)) {
             result.add(new Turn(r, fromRoadEnd.getLane(Lane.Kind.REGULAR, i), via, toRoadEnd));
@@ -111,8 +111,8 @@
         
         if (joined == null) {
-            return new ArrayList<Integer>(1);
-        }
-        
-        final List<Integer> result = new ArrayList<Integer>();
+            return new ArrayList<>(1);
+        }
+        
+        final List<Integer> result = new ArrayList<>();
         for (String lane : Constants.SPLIT_PATTERN.split(joined)) {
             result.add(Integer.parseInt(lane));
@@ -136,5 +136,5 @@
         final Road.End toRoadEnd = j.getRoadEnd(to);
         
-        final Set<Turn> result = new HashSet<Turn>();
+        final Set<Turn> result = new HashSet<>();
         for (int i : indices(r, Constants.TURN_KEY_LANES)) {
             result.add(new Turn(r, fromRoadEnd.getLane(Lane.Kind.REGULAR, i), Collections.<Road> emptyList(), toRoadEnd));
@@ -217,5 +217,5 @@
     
     void fixReferences(GenericCommand cmd, boolean left, int index) {
-        final List<Integer> fixed = new ArrayList<Integer>();
+        final List<Integer> fixed = new ArrayList<>();
         for (int i : indices(relation, Constants.TURN_KEY_EXTRA_LANES)) {
             if (left ? i < index : i > index) {
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Utils.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Utils.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Utils.java	(revision 30737)
@@ -20,5 +20,5 @@
 
 public class Utils {
-    private static final Set<String> ROAD_HIGHWAY_VALUES = Collections.unmodifiableSet(new HashSet<String>(Arrays
+    private static final Set<String> ROAD_HIGHWAY_VALUES = Collections.unmodifiableSet(new HashSet<>(Arrays
             .asList("motorway", "motorway_link", "trunk", "trunk_link", "primary", "primary_link", "secondary",
                     "secondary_link", "tertiary", "tertiary_link", "residential", "unclassified", "road", "living_street", "service",
@@ -30,5 +30,5 @@
     
     public static final List<Way> filterRoads(List<OsmPrimitive> of) {
-        final List<Way> result = new ArrayList<Way>();
+        final List<Way> result = new ArrayList<>();
         
         for (OsmPrimitive p : of) {
@@ -70,5 +70,5 @@
     
     public static List<RelationMember> getMembers(Relation r, String role) {
-        final List<RelationMember> result = new ArrayList<RelationMember>();
+        final List<RelationMember> result = new ArrayList<>();
         for (RelationMember m : r.getMembers()) {
             if (m.getRole().equals(role)) {
@@ -88,5 +88,5 @@
     
     private static <T> List<T> mapMembers(List<RelationMember> ms, Class<T> t) {
-        final List<T> result = new ArrayList<T>(ms.size());
+        final List<T> result = new ArrayList<>(ms.size());
         for (RelationMember m : ms) {
             result.add(t.cast(m.getMember()));
@@ -102,5 +102,5 @@
      */
     public static Node lineUp(Way a, Way b) {
-        final Set<Node> s = new HashSet<Node>(Arrays.asList(a.firstNode(), a.lastNode(), b.firstNode(), b.lastNode()));
+        final Set<Node> s = new HashSet<>(Arrays.asList(a.firstNode(), a.lastNode(), b.firstNode(), b.lastNode()));
         if (a.firstNode() == a.lastNode() || b.firstNode().equals(b.lastNode()) || s.size() == 2) {
             throw new IllegalArgumentException("Cycles are not allowed.");
@@ -152,8 +152,8 @@
      */
     public static List<Route> orderWays(Iterable<Way> ways, Iterable<Node> nodes) {
-        final List<Way> ws = new LinkedList<Way>(CollectionUtils.toList(ways));
-        final Set<Node> ns = new HashSet<Node>(CollectionUtils.toList(nodes));
-        
-        final List<Route> result = new ArrayList<Route>();
+        final List<Way> ws = new LinkedList<>(CollectionUtils.toList(ways));
+        final Set<Node> ns = new HashSet<>(CollectionUtils.toList(nodes));
+        
+        final List<Route> result = new ArrayList<>();
         
         while (!ws.isEmpty()) {
@@ -175,5 +175,5 @@
         }
         
-        final List<Way> result = new ArrayList<Way>();
+        final List<Way> result = new ArrayList<>();
         result.add(w);
         Node n = first ? w.lastNode() : w.firstNode();
@@ -205,5 +205,5 @@
     
     public static Iterable<Way> flattenVia(Node start, List<Road> via, Node end) {
-        final List<Way> result = new ArrayList<Way>();
+        final List<Way> result = new ArrayList<>();
         
         Node n = start;
Index: applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Validator.java
===================================================================
--- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Validator.java	(revision 30736)
+++ applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Validator.java	(revision 30737)
@@ -105,6 +105,6 @@
     
     public List<Issue> validate(DataSet dataSet) {
-        final List<Relation> lenghts = new ArrayList<Relation>();
-        final List<Relation> turns = new ArrayList<Relation>();
+        final List<Relation> lenghts = new ArrayList<>();
+        final List<Relation> turns = new ArrayList<>();
         
         for (Relation r : OsmPrimitive.getFilteredList(dataSet.allPrimitives(), Relation.class)) {
@@ -121,7 +121,7 @@
         }
         
-        final List<Issue> issues = new ArrayList<Issue>();
-        
-        final Map<IncomingLanes.Key, IncomingLanes> incomingLanes = new HashMap<IncomingLanes.Key, IncomingLanes>();
+        final List<Issue> issues = new ArrayList<>();
+        
+        final Map<IncomingLanes.Key, IncomingLanes> incomingLanes = new HashMap<>();
         issues.addAll(validateLengths(lenghts, incomingLanes));
         issues.addAll(validateTurns(turns, incomingLanes));
@@ -138,5 +138,5 @@
     
     private List<Issue> validateLengths(List<Relation> lenghts, Map<IncomingLanes.Key, IncomingLanes> incomingLanes) {
-        final List<Issue> issues = new ArrayList<Issue>();
+        final List<Issue> issues = new ArrayList<>();
         
         for (Relation r : lenghts) {
@@ -148,5 +148,5 @@
     
     private List<Issue> validateLengths(Relation r, Map<IncomingLanes.Key, IncomingLanes> incomingLanes) {
-        final List<Issue> issues = new ArrayList<Issue>();
+        final List<Issue> issues = new ArrayList<>();
         
         try {
@@ -227,7 +227,7 @@
     
     private Route orderWays(final Relation r, List<Way> ways, Node end, List<Issue> issues, String role, String type) {
-        final List<Way> unordered = new ArrayList<Way>(ways);
-        final List<Way> ordered = new ArrayList<Way>(ways.size());
-        final Set<Node> ends = new HashSet<Node>(); // to find cycles
+        final List<Way> unordered = new ArrayList<>(ways);
+        final List<Way> ordered = new ArrayList<>(ways.size());
+        final Set<Node> ends = new HashSet<>(); // to find cycles
         
         Node current = end;
@@ -280,5 +280,5 @@
     
     private List<Issue> validateTurns(List<Relation> turns, Map<IncomingLanes.Key, IncomingLanes> incomingLanes) {
-        final List<Issue> issues = new ArrayList<Issue>();
+        final List<Issue> issues = new ArrayList<>();
         
         for (Relation r : turns) {
@@ -290,5 +290,5 @@
     
     private List<Issue> validateTurns(Relation r, Map<IncomingLanes.Key, IncomingLanes> incomingLanes) {
-        final List<Issue> issues = new ArrayList<Issue>();
+        final List<Issue> issues = new ArrayList<>();
         
         try {
@@ -367,5 +367,5 @@
         }
         
-        final List<Integer> result = new ArrayList<Integer>();
+        final List<Integer> result = new ArrayList<>();
         
         for (String s : Constants.SPLIT_PATTERN.split(ints)) {
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilder.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilder.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilder.java	(revision 30737)
@@ -77,5 +77,5 @@
      */
     static public Node getUniqueCommonNode(Way w1, Way w2) throws IllegalArgumentException{
-        Set<Node> w1Nodes = new HashSet<Node>(w1.getNodes());
+        Set<Node> w1Nodes = new HashSet<>(w1.getNodes());
         w1Nodes.retainAll(w2.getNodes());
         if (w1Nodes.size() != 1) return null;
@@ -295,5 +295,5 @@
     public synchronized Relation buildFromSelection(OsmDataLayer layer) {
         CheckParameterUtil.ensureParameterNotNull(layer, "layer");
-        List<OsmPrimitive> selection = new ArrayList<OsmPrimitive>(layer.data.getSelected());
+        List<OsmPrimitive> selection = new ArrayList<>(layer.data.getSelected());
         return build(selection);
     }
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdTransferable.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdTransferable.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdTransferable.java	(revision 30737)
@@ -35,5 +35,5 @@
 
     
-    private List<PrimitiveId> ids = new ArrayList<PrimitiveId>();
+    private List<PrimitiveId> ids = new ArrayList<>();
     
     /**
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModel.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModel.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModel.java	(revision 30737)
@@ -20,5 +20,5 @@
     static public final Set<String> STANDARD_VEHICLE_EXCEPTION_VALUES;
     static {
-        HashSet<String> s = new HashSet<String>();
+        HashSet<String> s = new HashSet<>();
         s.add("psv");
         s.add("hgv");
@@ -44,5 +44,5 @@
     private String value = "";
     private boolean isStandard = true;
-    private final Set<String> vehicleExceptions = new HashSet<String>();
+    private final Set<String> vehicleExceptions = new HashSet<>();
     
     protected void parseValue(String value) {
@@ -91,5 +91,5 @@
             // is based on getValue()
             //
-            List<String> values = new ArrayList<String>(vehicleExceptions);
+            List<String> values = new ArrayList<>(vehicleExceptions);
             Collections.sort(values);
             for (String v: values){
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModel.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModel.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModel.java	(revision 30737)
@@ -37,5 +37,5 @@
     //static private final Logger logger = Logger.getLogger(JosmSelectionListModel.class.getName());
     
-    private final List<OsmPrimitive> selection = new ArrayList<OsmPrimitive>();
+    private final List<OsmPrimitive> selection = new ArrayList<>();
     private final DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
     private OsmDataLayer layer;
@@ -69,5 +69,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)) {
@@ -219,5 +219,5 @@
     /* ------------------------------------------------------------------------ */
     public List<PrimitiveId> getSelectedPrimitiveIds() {
-        List<PrimitiveId> ret = new ArrayList<PrimitiveId>(getSelected().size());
+        List<PrimitiveId> ret = new ArrayList<>(getSelected().size());
         for(int i=0; i< selection.size(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java	(revision 30737)
@@ -25,5 +25,5 @@
 public class RelationMemberEditorModel extends AbstractTableModel{  
     //static private final Logger logger = Logger.getLogger(RelationMemberEditorModel.class.getName());
-    private final ArrayList<RelationMemberModel> members = new ArrayList<RelationMemberModel>();
+    private final ArrayList<RelationMemberModel> members = new ArrayList<>();
     private OsmDataLayer layer;
     private DefaultListSelectionModel rowSelectionModel;
@@ -89,5 +89,5 @@
      */
     protected Set<OsmPrimitive> getPrimitivesWithRole(String role) {
-        HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        HashSet<OsmPrimitive> ret = new HashSet<>();
         for (RelationMemberModel rm: members){
             if (rm.getRole().equals(role)){
@@ -108,5 +108,5 @@
      */
     protected List<RelationMemberModel> getRelationMembersWithRole(String role) {
-        ArrayList<RelationMemberModel> ret = new ArrayList<RelationMemberModel>();
+        ArrayList<RelationMemberModel> ret = new ArrayList<>();
         for (RelationMemberModel rm: members){
             if (rm.getRole().equals(role)){
@@ -163,5 +163,5 @@
      */
     public List<OsmPrimitive> getVias() {
-        ArrayList<OsmPrimitive> ret = new ArrayList<OsmPrimitive>();
+        ArrayList<OsmPrimitive> ret = new ArrayList<>();
         for (RelationMemberModel rm: getRelationMembersWithRole("via")){
             ret.add(layer.data.getPrimitiveById(rm.getTarget()));
@@ -268,5 +268,5 @@
      */
     public Set<OsmPrimitive> getMemberPrimitives() {
-        Set<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> ret = new HashSet<>();
         for (RelationMemberModel rm: members){
             OsmPrimitive p = layer.data.getPrimitiveById(rm.getTarget());
@@ -302,5 +302,5 @@
     public void applyTo(Relation tr){
         if (tr == null) return;
-        List<RelationMember> newMembers = new ArrayList<RelationMember>();
+        List<RelationMember> newMembers = new ArrayList<>();
         for(RelationMemberModel model: members){
             RelationMember rm = new RelationMember(model.getRole(), layer.data.getPrimitiveById(model.getTarget()));
@@ -351,5 +351,5 @@
     
     protected List<Integer> getSelectedIndices() {
-        ArrayList<Integer> ret = new ArrayList<Integer>();
+        ArrayList<Integer> ret = new ArrayList<>();
         for(int i =0; i < members.size(); i++){
             if (rowSelectionModel.isSelectedIndex(i)) 
@@ -416,5 +416,5 @@
     public void insertMembers(Collection<PrimitiveId> ids) throws IllegalArgumentException {
         if (ids == null) return;    
-        ArrayList<RelationMemberModel> newMembers = new ArrayList<RelationMemberModel>();
+        ArrayList<RelationMemberModel> newMembers = new ArrayList<>();
         for (PrimitiveId id: ids){
             OsmPrimitive p = layer.data.getPrimitiveById(id);
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBoxModel.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBoxModel.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBoxModel.java	(revision 30737)
@@ -23,5 +23,5 @@
     
     private TurnRestrictionEditorModel model;
-    final private List<Object> values = new ArrayList<Object>();
+    final private List<Object> values = new ArrayList<>();
     private String selectedTagValue = null;
     private final transient EventListenerList listeners = new EventListenerList();
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java	(revision 30737)
@@ -441,5 +441,5 @@
          */
         protected List<RelationMember> getDeletedRelationMembers(Relation r) {
-            List<RelationMember> ret = new ArrayList<RelationMember>();
+            List<RelationMember> ret = new ArrayList<>();
             for(RelationMember rm: r.getMembers()) {
                 if (rm.getMember().isDeleted() || !rm.getMember().isVisible()) {
@@ -567,5 +567,5 @@
             Relation toUpdate = new Relation(getTurnRestriction());
             editorModel.apply(toUpdate);
-            Conflict<Relation> conflict = new Conflict<Relation>(getTurnRestriction(), toUpdate);
+            Conflict<Relation> conflict = new Conflict<>(getTurnRestriction(), toUpdate);
             Main.main.undoRedo.add(new ConflictAddCommand(getLayer(),conflict));
         }
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorManager.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorManager.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorManager.java	(revision 30737)
@@ -97,5 +97,5 @@
 
     /** the map of open dialogs */
-    private final HashMap<DialogContext, TurnRestrictionEditor> openDialogs =  new HashMap<DialogContext, TurnRestrictionEditor>();
+    private final HashMap<DialogContext, TurnRestrictionEditor> openDialogs =  new HashMap<>();
 
     /**
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditor.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditor.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditor.java	(revision 30737)
@@ -62,5 +62,5 @@
  
     private JLabel lblOsmObject;
-    private final Set<OsmPrimitive> legs = new HashSet<OsmPrimitive>();
+    private final Set<OsmPrimitive> legs = new HashSet<>();
     private TurnRestrictionEditorModel model;
     private TurnRestrictionLegRole role; 
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionSelectionPopupPanel.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionSelectionPopupPanel.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionSelectionPopupPanel.java	(revision 30737)
@@ -67,5 +67,5 @@
      */
     static public Collection<Relation> getTurnRestrictionsParticipatingIn(Collection<OsmPrimitive> primitives){
-        HashSet<Relation> ret = new HashSet<Relation>();
+        HashSet<Relation> ret = new HashSet<>();
         if (primitives == null) return ret;
         for (OsmPrimitive p: primitives){
@@ -296,5 +296,5 @@
     
     private static class TurnRestrictionTableModel extends AbstractTableModel {
-        private final ArrayList<Relation> turnrestrictions = new ArrayList<Relation>();
+        private final ArrayList<Relation> turnrestrictions = new ArrayList<>();
 
         public TurnRestrictionTableModel(Collection<Relation> turnrestrictions){
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRenderer.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRenderer.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRenderer.java	(revision 30737)
@@ -21,5 +21,5 @@
 public class TurnRestrictionTypeRenderer extends JLabel implements ListCellRenderer<Object> {
  
-    final private Map<TurnRestrictionType, ImageIcon> icons = new HashMap<TurnRestrictionType, ImageIcon>();
+    final private Map<TurnRestrictionType, ImageIcon> icons = new HashMap<>();
     private String iconSet = "set-a";
     
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListModel.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListModel.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListModel.java	(revision 30737)
@@ -26,5 +26,5 @@
     
     private DefaultListSelectionModel selectionModel;
-    private final ArrayList<OsmPrimitive> vias = new ArrayList<OsmPrimitive>();
+    private final ArrayList<OsmPrimitive> vias = new ArrayList<>();
     private TurnRestrictionEditorModel model;
     
@@ -52,5 +52,5 @@
      */
     public List<OsmPrimitive> getSelectedVias() {
-        ArrayList<OsmPrimitive> ret = new ArrayList<OsmPrimitive>();
+        ArrayList<OsmPrimitive> ret = new ArrayList<>();
         for (int i=0; i < getSize(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
@@ -82,5 +82,5 @@
      */
     public List<Integer> getSelectedRows() {
-        ArrayList<Integer> ret = new ArrayList<Integer>();
+        ArrayList<Integer> ret = new ArrayList<>();
         for (int i=0; i < getSize(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
@@ -92,5 +92,5 @@
     
     protected List<Integer> moveUp(List<Integer> rows, int targetRow) {
-        List<Integer> ret = new ArrayList<Integer>(rows.size());
+        List<Integer> ret = new ArrayList<>(rows.size());
         int delta = rows.get(0) - targetRow;
         for(int row: rows) {
@@ -103,5 +103,5 @@
     
     protected List<Integer> moveDown(List<Integer> rows, int targetRow) {
-        List<Integer> ret = new ArrayList<Integer>(rows.size());
+        List<Integer> ret = new ArrayList<>(rows.size());
         int delta = targetRow - rows.get(0);
         for(int i = rows.size()-1; i >=0; i--) {
@@ -170,5 +170,5 @@
     public void insertVias(List<PrimitiveId> idsToInsert) {
         if (idsToInsert == null) return;
-        List<OsmPrimitive> primitives = new ArrayList<OsmPrimitive>(idsToInsert.size());
+        List<OsmPrimitive> primitives = new ArrayList<>(idsToInsert.size());
         DataSet ds = model.getLayer().data;
         for(PrimitiveId id: idsToInsert){
@@ -181,5 +181,5 @@
         }
         int targetRow = Math.max(selectionModel.getMinSelectionIndex(),0);
-        List<OsmPrimitive> newVias = new ArrayList<OsmPrimitive>(vias);
+        List<OsmPrimitive> newVias = new ArrayList<>(vias);
         newVias.addAll(targetRow, primitives);
         model.setVias(newVias);
@@ -195,5 +195,5 @@
      */
     public void removeSelectedVias() {
-        ArrayList<OsmPrimitive> newVias = new ArrayList<OsmPrimitive>(vias);
+        ArrayList<OsmPrimitive> newVias = new ArrayList<>(vias);
         int j = 0;
         for(int i=0; i< getSize();i++){
@@ -230,5 +230,5 @@
     /* ----------------------------------------------------------------------- */
     public List<PrimitiveId> getSelectedPrimitiveIds() {
-        ArrayList<PrimitiveId> ids = new ArrayList<PrimitiveId>();
+        ArrayList<PrimitiveId> ids = new ArrayList<>();
         for (OsmPrimitive p: getSelectedVias()) {
             ids.add(p.getPrimitiveId());
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java	(revision 30737)
@@ -43,5 +43,5 @@
     
     /** the names of restriction types */
-    static private Set<String> RESTRICTION_TYPES = new HashSet<String>(
+    static private Set<String> RESTRICTION_TYPES = new HashSet<>(
             Arrays.asList(new String[] {
                     "no_left_turn",
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetListModel.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetListModel.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetListModel.java	(revision 30737)
@@ -47,5 +47,5 @@
      */
     protected List<Relation> filterTurnRestrictions(Collection<? extends OsmPrimitive> primitives) {
-        List<Relation> ret = new LinkedList<Relation>();
+        List<Relation> ret = new LinkedList<>();
         if (primitives == null) return ret;
         for(OsmPrimitive p: primitives){
@@ -64,5 +64,5 @@
             return;
         }
-        List<Relation> turnRestrictions = new LinkedList<Relation>();
+        List<Relation> turnRestrictions = new LinkedList<>();
         for (Relation r: newLayer.data.getRelations()) {
             if (isValid(r) && isTurnRestriction(r)) {
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionListModel.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionListModel.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionListModel.java	(revision 30737)
@@ -32,5 +32,5 @@
      */
     public void initFromSelection(Collection<? extends OsmPrimitive> selection) {
-        Set<Relation> turnRestrictions = new HashSet<Relation>();
+        Set<Relation> turnRestrictions = new HashSet<>();
         if (selection == null) return;
         for (OsmPrimitive p: selection) {
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java	(revision 30737)
@@ -204,5 +204,5 @@
         }
         protected Collection<RelationMember> getMembersForCurrentSelection(Relation r) {
-            Collection<RelationMember> members = new HashSet<RelationMember>();
+            Collection<RelationMember> members = new HashSet<>();
             Collection<OsmPrimitive> selection = Main.main.getEditLayer().data.getSelected();
             for (RelationMember member: r.getMembers()) {
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListModel.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListModel.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListModel.java	(revision 30737)
@@ -22,5 +22,5 @@
  */
 public class TurnRestrictionsListModel extends AbstractListModel<Relation> {
-    private final ArrayList<Relation> turnrestrictions = new ArrayList<Relation>();
+    private final ArrayList<Relation> turnrestrictions = new ArrayList<>();
     private DefaultListSelectionModel selectionModel;
 
@@ -141,5 +141,5 @@
     public void removeTurnRestrictions(Collection<? extends OsmPrimitive> removedPrimitives) {
         if (removedPrimitives == null) return;
-        Set<Relation> removedTurnRestrictions = new HashSet<Relation>();
+        Set<Relation> removedTurnRestrictions = new HashSet<>();
         for (OsmPrimitive p: removedPrimitives) {
             if (!isTurnRestriction(p)) continue;
@@ -172,5 +172,5 @@
      */
     public List<Relation> getSelectedNonNewRelations() {
-        ArrayList<Relation> ret = new ArrayList<Relation>();
+        ArrayList<Relation> ret = new ArrayList<>();
         for (int i=0; i<getSize();i++) {
             if (!selectionModel.isSelectedIndex(i)) {
@@ -192,5 +192,5 @@
      */
     public List<Relation> getSelectedTurnRestrictions() {
-        ArrayList<Relation> ret = new ArrayList<Relation>();
+        ArrayList<Relation> ret = new ArrayList<>();
         for (int i=0; i<getSize();i++) {
             if (!selectionModel.isSelectedIndex(i)) {
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/Issue.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/Issue.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/Issue.java	(revision 30737)
@@ -21,5 +21,5 @@
     protected IssuesModel parent;
     protected Severity severity;
-    protected final ArrayList<Action> actions = new ArrayList<Action>();
+    protected final ArrayList<Action> actions = new ArrayList<>();
     
     /**
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesModel.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesModel.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesModel.java	(revision 30737)
@@ -33,5 +33,5 @@
  */
 public class IssuesModel extends Observable implements Observer{
-    private final ArrayList<Issue> issues = new ArrayList<Issue>();
+    private final ArrayList<Issue> issues = new ArrayList<>();
     private TurnRestrictionEditorModel editorModel;
     
Index: applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorTest.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorTest.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorTest.java	(revision 30737)
@@ -81,5 +81,5 @@
         PrimitiveIdListProvider provider = new PrimitiveIdListProvider() {          
             public List<PrimitiveId> getSelectedPrimitiveIds() {
-                List<PrimitiveId> ret = new ArrayList<PrimitiveId>();
+                List<PrimitiveId> ret = new ArrayList<>();
                 int [] sel = lstObjects.getSelectedIndices();
                 for (int i: sel){
Index: applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesViewTest.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesViewTest.java	(revision 30736)
+++ applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesViewTest.java	(revision 30737)
@@ -50,5 +50,5 @@
         c.add(pane, gc);
         
-        List<Issue> issues = new ArrayList<Issue>();
+        List<Issue> issues = new ArrayList<>();
         issues.add(new RequiredTagMissingError(model, "type", "restriction"));
         issues.add(new MissingRestrictionTypeError(model));
Index: applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java
===================================================================
--- applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java	(revision 30736)
+++ applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java	(revision 30737)
@@ -80,5 +80,5 @@
             @Override
             public void run() {
-                List<Node> nodes = new ArrayList<Node>();
+                List<Node> nodes = new ArrayList<>();
                 for (PrimitiveId pid : ids) {
                     OsmPrimitive primitive = layer.data.getPrimitiveById(pid);
@@ -127,5 +127,5 @@
                                     // hPrimitive2.getId(), hPrimitive2.getVersion(),
                                     // hWay.getNumNodes()));
-                                    List<PrimitiveId> nodeIds = new ArrayList<PrimitiveId>();
+                                    List<PrimitiveId> nodeIds = new ArrayList<>();
                                     if (hWay != null) {
 	                                    for (Long i : hWay.getNodes()) {
@@ -146,5 +146,5 @@
         
                                     if (hRel != null) {
-	                                    List<RelationMember> members = new ArrayList<RelationMember>(hRel.getNumMembers());
+	                                    List<RelationMember> members = new ArrayList<>(hRel.getNumMembers());
 	                                    for (RelationMemberData m : hRel.getMembers()) {
 	                                        OsmPrimitive p = layer.data.getPrimitiveById(m.getMemberId(), m.getMemberType());
Index: applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/DijkstraSP.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/DijkstraSP.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/DijkstraSP.java	(revision 30737)
@@ -46,5 +46,5 @@
 
         // relax vertices in order of distance from s
-        pq = new IndexMinPQ<Double>(G.V());
+        pq = new IndexMinPQ<>(G.V());
         pq.insert(s, distTo[s]);
         int count = 0;
@@ -86,5 +86,5 @@
     public Iterable<DirectedEdge> pathTo(int v) {
         if (!hasPathTo(v)) return null;
-        Stack<DirectedEdge> path = new Stack<DirectedEdge>();
+        Stack<DirectedEdge> path = new Stack<>();
         for (DirectedEdge e = edgeTo[v]; e != null; e = edgeTo[e.from()]) {
             path.push(e);
Index: applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/EdgeWeightedDigraph.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/EdgeWeightedDigraph.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/EdgeWeightedDigraph.java	(revision 30737)
@@ -36,5 +36,5 @@
         adj = (Bag<DirectedEdge>[]) new Bag[V];
         for (int v = 0; v < V; v++)
-            adj[v] = new Bag<DirectedEdge>();
+            adj[v] = new Bag<>();
     }
 
@@ -76,5 +76,5 @@
         for (int v = 0; v < G.V(); v++) {
             // reverse so that adjacency list is in same order as original
-            Stack<DirectedEdge> reverse = new Stack<DirectedEdge>();
+            Stack<DirectedEdge> reverse = new Stack<>();
             for (DirectedEdge e : G.adj[v]) {
                 reverse.push(e);
@@ -124,5 +124,5 @@
      */
     public Iterable<DirectedEdge> edges() {
-        Bag<DirectedEdge> list = new Bag<DirectedEdge>();
+        Bag<DirectedEdge> list = new Bag<>();
         for (int v = 0; v < V; v++) {
             for (DirectedEdge e : adj(v)) {
Index: applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/IndexMinPQ.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/IndexMinPQ.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/IndexMinPQ.java	(revision 30737)
@@ -174,5 +174,5 @@
         // takes linear time since already in heap order so no keys move
         public HeapIterator() {
-            copy = new IndexMinPQ<Key>(pq.length - 1);
+            copy = new IndexMinPQ<>(pq.length - 1);
             for (int i = 1; i <= N; i++)
                 copy.insert(pq[i], keys[pq[i]]);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AddIntersectionsAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AddIntersectionsAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AddIntersectionsAction.java	(revision 30737)
@@ -47,9 +47,9 @@
         }
 
-        LinkedList<Command> cmds = new LinkedList<Command>();
+        LinkedList<Command> cmds = new LinkedList<>();
         Geometry.addIntersections(ways, false, cmds);
         if (!cmds.isEmpty()) {
             Main.main.undoRedo.add(new SequenceCommand(tr("Add nodes at intersections"),cmds));
-            Set<Node> nodes = new HashSet<Node>(10);
+            Set<Node> nodes = new HashSet<>(10);
             // find and select newly added nodes
             for (Command cmd: cmds) if (cmd instanceof AddCommand){
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AlignWayNodesAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AlignWayNodesAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AlignWayNodesAction.java	(revision 30737)
@@ -45,5 +45,5 @@
         int firstNodePos = findFirstNode(way, selectedNodes);
         int lastNodePos = way.isClosed() ? firstNodePos : way.getNodesCount();
-        List<Node> nodes = new ArrayList<Node>();
+        List<Node> nodes = new ArrayList<>();
         int i = firstNodePos;
         boolean iterated = false;
@@ -75,5 +75,5 @@
         // Now, we have an ordered list of nodes, of which idx 0 and N-1 serve as guides
         // and 1..N-2 should be aligned with them
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
         double ax = nodes.get(0).getEastNorth().east();
         double ay = nodes.get(0).getEastNorth().north();
@@ -134,5 +134,5 @@
             List<Way> referrers = OsmPrimitive.getFilteredList(n.getReferrers(), Way.class);
             if( ways == null )
-                ways = new HashSet<Way>(referrers);
+                ways = new HashSet<>(referrers);
             else {
                 ways.retainAll(referrers);
@@ -143,5 +143,5 @@
 
     private Set<Node> filterNodes( Collection<? extends OsmPrimitive> selection ) {
-        Set<Node> result = new HashSet<Node>();
+        Set<Node> result = new HashSet<>();
         if( selection != null ) {
             for( OsmPrimitive p : selection )
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/ExtractPointAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/ExtractPointAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/ExtractPointAction.java	(revision 30737)
@@ -49,5 +49,5 @@
         Node nd = selectedNodes.get(0);
         Node ndCopy = new Node(nd.getCoor());
-        List<Command> cmds = new LinkedList<Command>();
+        List<Command> cmds = new LinkedList<>();
         
         Point p = Main.map.mapView.getMousePosition();
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/PasteRelationsAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/PasteRelationsAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/PasteRelationsAction.java	(revision 30737)
@@ -30,5 +30,5 @@
             return;
 
-        Map<Relation, String> relations = new HashMap<Relation, String>();
+        Map<Relation, String> relations = new HashMap<>();
         for( PrimitiveData pdata : Main.pasteBuffer.getDirectlyAdded() ) {
             OsmPrimitive p = getCurrentDataSet().getPrimitiveById(pdata.getUniqueId(), pdata.getType());
@@ -50,5 +50,5 @@
         }
 
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
         for( Relation rel : relations.keySet() ) {
             Relation r = new Relation(rel);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitObjectAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitObjectAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitObjectAction.java	(revision 30737)
@@ -92,5 +92,5 @@
         // is exactly one way that all nodes are part of.
         if (selectedWay == null && !selectedNodes.isEmpty()) {
-            Map<Way, Integer> wayOccurenceCounter = new HashMap<Way, Integer>();
+            Map<Way, Integer> wayOccurenceCounter = new HashMap<>();
             for (Node n : selectedNodes) {
                 for (Way w : OsmPrimitive.getFilteredList(n.getReferrers(), Way.class)) {
@@ -148,5 +148,5 @@
                 return;
             }
-            HashSet<Node> nds = new HashSet<Node>(selectedNodes);
+            HashSet<Node> nds = new HashSet<>(selectedNodes);
             nds.removeAll(selectedWay.getNodes());
             if (!nds.isEmpty()) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitOnIntersectionsAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitOnIntersectionsAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitOnIntersectionsAction.java	(revision 30737)
@@ -33,7 +33,7 @@
     @Override
     public void actionPerformed( ActionEvent e ) {
-        List<Command> list = new ArrayList<Command>();
+        List<Command> list = new ArrayList<>();
         List<Way> selectedWays = OsmPrimitive.getFilteredList(getCurrentDataSet().getSelected(), Way.class);
-        Map<Way, List<Node>> splitWays = new HashMap<Way, List<Node>>();
+        Map<Way, List<Node>> splitWays = new HashMap<>();
 
         for( Way way : selectedWays ) {
@@ -61,5 +61,5 @@
                         splitWays.get(refs.get(0)).add(node);
                     else {
-                        List<Node> nodes = new ArrayList<Node>(1);
+                        List<Node> nodes = new ArrayList<>(1);
                         nodes.add(node);
                         splitWays.put(refs.get(0), nodes);
@@ -77,5 +77,5 @@
             List<List<Node>> wayChunks = SplitWayAction.buildSplitChunks(splitWay, splitWays.get(splitWay));
             if( wayChunks != null ) {
-                List<OsmPrimitive> sel = new ArrayList<OsmPrimitive>(selectedWays.size());
+                List<OsmPrimitive> sel = new ArrayList<>(selectedWays.size());
                 sel.addAll(selectedWays);
                 SplitWayAction.SplitWayResult result = SplitWayAction.splitWay(getEditLayer(), splitWay, wayChunks, sel);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SymmetryAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SymmetryAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SymmetryAction.java	(revision 30737)
@@ -45,5 +45,5 @@
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
-        HashSet<Node> nodes = new HashSet<Node>();
+        HashSet<Node> nodes = new HashSet<>();
         EastNorth p1=null,p2=null;
         
@@ -74,5 +74,5 @@
         ne /= l; nn /= l; // normal unit vector
         
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
 
         for (Node n : nodes) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagBufferAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagBufferAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagBufferAction.java	(revision 30737)
@@ -18,7 +18,7 @@
 public class TagBufferAction extends JosmAction {
     private static final String TITLE = tr("Copy tags from previous selection");
-    private Map<String, String> tags = new HashMap<String, String>();
-    private Map<String, String> currentTags = new HashMap<String, String>();
-    private Set<OsmPrimitive> selectionBuf = new HashSet<OsmPrimitive>();
+    private Map<String, String> tags = new HashMap<>();
+    private Map<String, String> currentTags = new HashMap<>();
+    private Set<OsmPrimitive> selectionBuf = new HashSet<>();
 
     public TagBufferAction() {
@@ -34,5 +34,5 @@
             return;
 
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
         for( String key : tags.keySet() ) {
             String value = tags.get(key);
@@ -92,5 +92,5 @@
     private void rememberSelectionTags() {
         // Fix #8350 - only care about tagged objects
-        Collection<OsmPrimitive> selectedTaggedObjects = new ArrayList<OsmPrimitive>(getCurrentDataSet().getSelected());
+        Collection<OsmPrimitive> selectedTaggedObjects = new ArrayList<>(getCurrentDataSet().getSelected());
         for (Iterator<OsmPrimitive> it = selectedTaggedObjects.iterator(); it.hasNext(); ) {
             if (!it.next().isTagged()) {
@@ -100,5 +100,5 @@
         if( !selectedTaggedObjects.isEmpty() ) {
             currentTags.clear();
-            Set<String> bad = new HashSet<String>();
+            Set<String> bad = new HashSet<>();
             for( OsmPrimitive p : selectedTaggedObjects ) {
                 if( currentTags.isEmpty() ) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagSourceAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagSourceAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagSourceAction.java	(revision 30737)
@@ -19,5 +19,5 @@
     private static final String TITLE = tr("Add Source Tag");
     private String source;
-    private Set<OsmPrimitive> selectionBuf = new HashSet<OsmPrimitive>();
+    private Set<OsmPrimitive> selectionBuf = new HashSet<>();
     private boolean clickedTwice = false;
 
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/UnGlueRelationAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/UnGlueRelationAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/UnGlueRelationAction.java	(revision 30737)
@@ -49,6 +49,6 @@
     public void actionPerformed(ActionEvent e) {
 
-        LinkedList<Command> cmds = new LinkedList<Command>();
-        List<OsmPrimitive> newPrimitives = new LinkedList<OsmPrimitive>();
+        LinkedList<Command> cmds = new LinkedList<>();
+        List<OsmPrimitive> newPrimitives = new LinkedList<>();
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
 
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/command/ChangeRelationMemberCommand.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/command/ChangeRelationMemberCommand.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/command/ChangeRelationMemberCommand.java	(revision 30737)
@@ -34,5 +34,5 @@
             return;
         }
-        LinkedList<RelationMember> newrms = new LinkedList<RelationMember>();
+        LinkedList<RelationMember> newrms = new LinkedList<>();
         for (RelationMember rm : relation.getMembers()) {
             if (rm.getMember() == oldP) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CircleArcMaker.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CircleArcMaker.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CircleArcMaker.java	(revision 30737)
@@ -23,5 +23,5 @@
 public class CircleArcMaker {
     public static Collection<Command> doCircleArc(List<Node> selectedNodes, List<Way> selectedWays, int angleSeparation) {
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
 
         //// Decides which nodes to use as anchors based on selection
@@ -61,5 +61,5 @@
         }
 
-        Set<Way> targetWays = new HashSet<Way>();
+        Set<Way> targetWays = new HashSet<>();
 
         boolean nodesHaveBeenChoosen = false;
@@ -127,9 +127,9 @@
 
         // // Calculate the new points in the arc
-        ReturnValue<Integer> p2Index = new ReturnValue<Integer>();
+        ReturnValue<Integer> p2Index = new ReturnValue<>();
         List<EastNorth> points = circleArcPoints(p1, p2, p3, angleSeparation, false, p2Index);
 
         //// Create the new arc nodes. Insert anchor nodes at correct positions.
-        List<Node> arcNodes = new ArrayList<Node>(points.size());
+        List<Node> arcNodes = new ArrayList<>(points.size());
         arcNodes.add(n1);
         {
@@ -269,5 +269,5 @@
         int numberOfNodesInArc = Math.max((int) Math.ceil((radialLength / Math.PI) * 180 / angleSeparation)+1,
                 3);
-        List<EastNorth> points = new ArrayList<EastNorth>(numberOfNodesInArc);
+        List<EastNorth> points = new ArrayList<>(numberOfNodesInArc);
 
         // Calculate the circle points in order
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CurveAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CurveAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CurveAction.java	(revision 30737)
@@ -53,6 +53,6 @@
         updatePreferences();
 
-        List<Node> selectedNodes = new ArrayList<Node>(getCurrentDataSet().getSelectedNodes());
-        List<Way> selectedWays = new ArrayList<Way>(getCurrentDataSet().getSelectedWays());
+        List<Node> selectedNodes = new ArrayList<>(getCurrentDataSet().getSelectedNodes());
+        List<Way> selectedWays = new ArrayList<>(getCurrentDataSet().getSelectedWays());
 
         // Collection<Command> cmds = doSpline(selectedNodes, selectedWays);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/URLList.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/URLList.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/URLList.java	(revision 30737)
@@ -23,5 +23,5 @@
     }    
     public static List<String> resetURLList() {
-        List<String> items=new ArrayList<String>();
+        List<String> items=new ArrayList<>();
         items.add("Wikipedia");
         items.add("https://en.wikipedia.org/w/index.php?search={name}&fulltext=Search");
@@ -60,5 +60,5 @@
     
     public static  List<String> loadURLList() {
-        ArrayList<String> items=new ArrayList<String>();
+        ArrayList<String> items=new ArrayList<>();
         BufferedReader fr=null;
         try {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/UtilsPluginPreferences.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/UtilsPluginPreferences.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/UtilsPluginPreferences.java	(revision 30737)
@@ -134,5 +134,5 @@
         TableModel model = (table.getModel());
         String v;
-        ArrayList<String> lst=new ArrayList<String>();
+        ArrayList<String> lst=new ArrayList<>();
         int n=model.getRowCount();
         for (int i=0;i<n;i++) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonAction.java	(revision 30737)
@@ -59,7 +59,7 @@
 
         // we create a list of commands that will modify the map in the way we want.
-        Collection<Command> cmds = new LinkedList<Command>();
+        Collection<Command> cmds = new LinkedList<>();
         // first we create all the nodes, then we do extra stuff based on what geometry type we need.
-        LinkedList<Node> nodes = new LinkedList<Node>();
+        LinkedList<Node> nodes = new LinkedList<>();
 
         for (LatLon ll : coordinates) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonDialog.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonDialog.java	(revision 30737)
@@ -309,5 +309,5 @@
     private static LatLon[] parseLatLons(final String text) {
         String lines[] = text.split("\\r?\\n");
-        List<LatLon> latLons = new ArrayList<LatLon>();
+        List<LatLon> latLons = new ArrayList<>();
         for (String line : lines) {
             latLons.add(parseLatLon(line));
@@ -320,5 +320,5 @@
 
         final StringBuilder sb = new StringBuilder();
-        final List<Object> list = new ArrayList<Object>();
+        final List<Object> list = new ArrayList<>();
 
         while (m.find()) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTagDialog.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTagDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTagDialog.java	(revision 30737)
@@ -145,5 +145,5 @@
 
     private void loadHistory() {
-        List<String> cmtHistory = new LinkedList<String>(
+        List<String> cmtHistory = new LinkedList<>(
                 Main.pref.getCollection(HISTORY_KEY, Arrays.asList(defaultHistory)));
         Collections.reverse(cmtHistory);
@@ -197,5 +197,5 @@
     
     public List<OsmPrimitive> getSelectedPrimitives() {
-        ArrayList<OsmPrimitive> sel = new ArrayList<OsmPrimitive>(100);
+        ArrayList<OsmPrimitive> sel = new ArrayList<>(100);
         for (int idx: tbl.getSelectedRows()) {
             sel.add(tableModel.getPrimitiveAt(tbl.convertRowIndexToModel(idx)));
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTaggerTableModel.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTaggerTableModel.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTaggerTableModel.java	(revision 30737)
@@ -29,10 +29,10 @@
 public class MultiTaggerTableModel extends AbstractTableModel implements SelectionChangedListener {
 
-    ArrayList<OsmPrimitive> list = new ArrayList<OsmPrimitive>(50);
+    ArrayList<OsmPrimitive> list = new ArrayList<>(50);
     String mainTags[] = new String[]{};
     boolean isSpecialTag[] = new boolean[]{};
-    Set<OsmPrimitiveType> shownTypes = new HashSet<OsmPrimitiveType>();
+    Set<OsmPrimitiveType> shownTypes = new HashSet<>();
     private boolean autoCommit = true;
-    List<Command> cmds = new ArrayList<Command>();
+    List<Command> cmds = new ArrayList<>();
     private boolean watchSelection = true;
     private JTable table;
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryAction.java	(revision 30737)
@@ -35,5 +35,5 @@
 
         // There must be two ways selected: one with id > 0 and one new.
-        List<OsmPrimitive> selection = new ArrayList<OsmPrimitive>(getCurrentDataSet().getSelected());
+        List<OsmPrimitive> selection = new ArrayList<>(getCurrentDataSet().getSelected());
         if (selection.size() != 2) {
             new Notification(
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java	(revision 30737)
@@ -116,5 +116,5 @@
         }
         // FIXME: handle different layers
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
         commands.add(MergeNodesAction.mergeNodes(Main.main.getEditLayer(), Arrays.asList(subjectNode, referenceNode), referenceNode));
 
@@ -143,5 +143,5 @@
         if (!subjectNode.isNew()) {
             // Prepare a list of nodes that are not important
-            Collection<Node> nodePool = new HashSet<Node>();
+            Collection<Node> nodePool = new HashSet<>();
             if (referenceObject instanceof Way) {
                 nodePool.addAll(getUnimportantNodes((Way) referenceObject));
@@ -161,5 +161,5 @@
         }
 
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
         AbstractMap<String, String> nodeTags = (AbstractMap<String, String>) subjectNode.getKeys();
 
@@ -248,5 +248,5 @@
         }
 
-        List<Command> commands = new ArrayList<Command>();
+        List<Command> commands = new ArrayList<>();
                 
         // merge tags
@@ -262,5 +262,5 @@
 
         // And the same for geometry, list nodes that can be freely deleted
-        List<Node> geometryPool = new LinkedList<Node>();
+        List<Node> geometryPool = new LinkedList<>();
         for( Node node : referenceWay.getNodes() ) {
             List<OsmPrimitive> referrers = node.getReferrers();
@@ -275,5 +275,5 @@
         // Find new nodes that are closest to the old ones, remove matching old ones from the pool
         // Assign node moves with least overall distance moved
-        Map<Node, Node> nodeAssoc = new HashMap<Node, Node>();
+        Map<Node, Node> nodeAssoc = new HashMap<>();
         if (geometryPool.size() > 0 && nodePool.size() > 0) {
             if (useRobust) {  // use robust, but slower assignment
@@ -319,5 +319,5 @@
                         tr("Exceeded iteration limit for robust method, using simpler method.")
                     ).setIcon(JOptionPane.WARNING_MESSAGE).show();     
-                    nodeAssoc = new HashMap<Node, Node>();
+                    nodeAssoc = new HashMap<>();
                 }
             }
@@ -375,5 +375,5 @@
      */
     protected static List<Node> getUnimportantNodes(Way way) {
-        List<Node> nodePool = new LinkedList<Node>();
+        List<Node> nodePool = new LinkedList<>();
         for (Node n : way.getNodes()) {
             List<OsmPrimitive> referrers = n.getReferrers();
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/ConnectedMatch.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/ConnectedMatch.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/ConnectedMatch.java	(revision 30737)
@@ -29,6 +29,6 @@
      */
     private void init(boolean all) {
-        Collection<Way> matchedWays = new HashSet<Way>();
-        Set<Node> matchedNodes = new HashSet<Node>();
+        Collection<Way> matchedWays = new HashSet<>();
+        Set<Node> matchedNodes = new HashSet<>();
         // find all ways that match the expression
         Collection<Way> allWays = Main.main.getCurrentDataSet().getWays();
@@ -45,5 +45,5 @@
             }
         }
-        Set<Way> newWays = new HashSet<Way>();
+        Set<Way> newWays = new HashSet<>();
         if (all) {
             NodeWayUtils.addWaysConnectedToNodes(matchedNodes, newWays);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/InsideMatch.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/InsideMatch.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/InsideMatch.java	(revision 30737)
@@ -30,5 +30,5 @@
      */
     private void init() {
-        Collection<OsmPrimitive> matchedAreas = new HashSet<OsmPrimitive>();
+        Collection<OsmPrimitive> matchedAreas = new HashSet<>();
         // find all ways that match the expression
         Collection<Way> ways = Main.main.getCurrentDataSet().getWays();
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/IntersectingMatch.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/IntersectingMatch.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/IntersectingMatch.java	(revision 30737)
@@ -28,5 +28,5 @@
      */
     private void init(boolean all) {
-        Collection<Way> matchedWays = new HashSet<Way>();
+        Collection<Way> matchedWays = new HashSet<>();
         // find all ways that match the expression
         Collection<Way> allWays = Main.main.getCurrentDataSet().getWays();
@@ -36,5 +36,5 @@
             }
         }
-        Set<Way> newWays = new HashSet<Way>();
+        Set<Way> newWays = new HashSet<>();
         if (all) {
             NodeWayUtils.addWaysIntersectingWaysRecursively(allWays, matchedWays, newWays);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentNodesAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentNodesAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentNodesAction.java	(revision 30737)
@@ -29,5 +29,5 @@
     }
 
-    private  Set<Way> activeWays = new HashSet<Way>();
+    private  Set<Way> activeWays = new HashSet<>();
 
     @Override
@@ -58,5 +58,5 @@
         // selecting nodes of selected ways
         if(selectedNodes.isEmpty()) {
-            HashSet<Node> newNodes = new HashSet<Node>();
+            HashSet<Node> newNodes = new HashSet<>();
             NodeWayUtils.addNodesConnectedToWays(selectedWays, newNodes);
             activeWays.clear();
@@ -69,5 +69,5 @@
         }
 
-        Set<Node> newNodes = new HashSet <Node>();
+        Set<Node> newNodes = new HashSet <>();
         for (Node node: selectedNodes) {
             for (Way w: activeWays) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentWaysAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentWaysAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentWaysAction.java	(revision 30737)
@@ -38,5 +38,5 @@
 
         // select ways attached to already selected ways
-        Set<Way> newWays = new HashSet<Way>();
+        Set<Way> newWays = new HashSet<>();
         NodeWayUtils.addWaysConnectedToWays(selectedWays, newWays);
         newWays.addAll(selectedWays);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/ConnectedWaysAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/ConnectedWaysAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/ConnectedWaysAction.java	(revision 30737)
@@ -33,5 +33,5 @@
         Set<Way> selectedWays = OsmPrimitive.getFilteredSet(getCurrentDataSet().getSelected(), Way.class);
 
-        Set<Way> newWays = new HashSet<Way>();
+        Set<Way> newWays = new HashSet<>();
 
         // selecting ways attached to selected nodes
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysAction.java	(revision 30737)
@@ -37,5 +37,5 @@
         // select ways attached to already selected ways
         if (!selectedWays.isEmpty()) {
-            Set<Way> newWays = new HashSet<Way>();
+            Set<Way> newWays = new HashSet<>();
             NodeWayUtils.addWaysIntersectingWays(
                     getCurrentDataSet().getWays(),
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysRecursiveAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysRecursiveAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysRecursiveAction.java	(revision 30737)
@@ -38,5 +38,5 @@
 
         if (!selectedWays.isEmpty()) {
-            Set<Way> newWays = new HashSet<Way>();
+            Set<Way> newWays = new HashSet<>();
             NodeWayUtils.addWaysIntersectingWaysRecursively(
                     getCurrentDataSet().getWays(),
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/MiddleNodesAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/MiddleNodesAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/MiddleNodesAction.java	(revision 30737)
@@ -46,5 +46,5 @@
         }
 
-        Set<Node> newNodes = new HashSet <Node>();
+        Set<Node> newNodes = new HashSet <>();
         NodeWayUtils.addMiddle(selectedNodes, newNodes);
         
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java	(revision 30737)
@@ -187,5 +187,5 @@
     public static void addWaysIntersectingWaysRecursively
         (Collection<Way> allWays, Collection<Way> initWays, Set<Way> newWays) {
-        Set<Way> foundWays = new HashSet<Way>();
+        Set<Way> foundWays = new HashSet<>();
         foundWays.addAll(initWays);
         newWays.addAll(initWays);
@@ -195,5 +195,5 @@
         do {
              c=0;
-             newFoundWays = new HashSet<Way>();
+             newFoundWays = new HashSet<>();
              for (Way w : foundWays){
                   c+=addWaysIntersectingWay(allWays, w, newFoundWays,newWays);
@@ -220,5 +220,5 @@
         do {
              c=0;
-             Set<Way> foundWays = new HashSet<Way>();
+             Set<Way> foundWays = new HashSet<>();
              foundWays.addAll(newWays);
              for (Way w : foundWays){
@@ -241,5 +241,5 @@
         Node n1 = it.next();
         Node n2 = it.next();
-        Set<Way> ways=new HashSet<Way>();
+        Set<Way> ways=new HashSet<>();
         ways.addAll(OsmPrimitive.getFilteredList(n1.getReferrers(), Way.class));
         for (Way w: ways) {
@@ -280,5 +280,5 @@
         Node curNode = w.lastNode();
         Node prevNode = w.getNode(w.getNodes().size()-2);
-        Set<Way> newestWays = new HashSet<Way>();
+        Set<Way> newestWays = new HashSet<>();
         while(true) {
 
@@ -361,6 +361,6 @@
        
         List<Node> searchNodes = data.searchNodes(box);
-        Set<Node> newestNodes = new HashSet<Node>();
-        Set<Way> newestWays = new HashSet<Way>();
+        Set<Node> newestNodes = new HashSet<>();
+        Set<Way> newestWays = new HashSet<>();
         for (Node n : searchNodes) {
             //if (Geometry.nodeInsidePolygon(n, polyNodes)) {
@@ -391,6 +391,6 @@
         
         List<Node> searchNodes = data.searchNodes(box);
-        Set<Node> newestNodes = new HashSet<Node>();
-        Set<Way> newestWays = new HashSet<Way>();
+        Set<Node> newestNodes = new HashSet<>();
+        Set<Way> newestWays = new HashSet<>();
         for (Node n : searchNodes) {
             //if (Geometry.nodeInsidePolygon(n, polyNodes)) {
@@ -483,6 +483,6 @@
         }
 
-        Set<Way> newWays = new HashSet<Way>();
-        Set<Node> newNodes = new HashSet<Node>();
+        Set<Way> newWays = new HashSet<>();
+        Set<Node> newNodes = new HashSet<>();
         // select nodes and ways inside slexcted ways and multipolygons
         if (!selectedWays.isEmpty()) {
@@ -503,5 +503,5 @@
         }
         
-        Set<OsmPrimitive> insideSelection = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> insideSelection = new HashSet<>();
         if (!newWays.isEmpty() || !newNodes.isEmpty()) {
             insideSelection.addAll(newWays);
@@ -512,5 +512,5 @@
 
     private static List<EastNorth> buildPointList(Iterable<Way> ways) {
-        ArrayList<EastNorth> points = new ArrayList<EastNorth>(1000);
+        ArrayList<EastNorth> points = new ArrayList<>(1000);
         for (Way way: ways) {
             for (EastNorth en: getWayPoints(way)) {
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectHighwayAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectHighwayAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectHighwayAction.java	(revision 30737)
@@ -54,9 +54,9 @@
 
     private Set<Way> selectNamedRoad( Way firstWay ) {
-        Set<Way> newWays = new HashSet<Way>();
+        Set<Way> newWays = new HashSet<>();
         String key = firstWay.hasKey("name") ? "name" : "ref";
         if( firstWay.hasKey(key) ) {
             String value = firstWay.get(key);
-            Queue<Node> nodeQueue = new LinkedList<Node>();
+            Queue<Node> nodeQueue = new LinkedList<>();
             nodeQueue.add(firstWay.firstNode());
             while( !nodeQueue.isEmpty() ) {
@@ -83,5 +83,5 @@
 	    intersection = firstTree.getIntersection(secondTree);
 	}
-	Set<Way> newWays = new HashSet<Way>();
+	Set<Way> newWays = new HashSet<>();
 	newWays.addAll(firstTree.getPath(intersection));
 	newWays.addAll(secondTree.getPath(intersection));
@@ -142,11 +142,11 @@
 
 	public HighwayTree( Way from, int minHighwayRank ) {
-	    tree = new ArrayList<Way>(1);
-	    refs = new ArrayList<Integer>(1);
+	    tree = new ArrayList<>(1);
+	    refs = new ArrayList<>(1);
 	    tree.add(from);
 	    refs.add(Integer.valueOf(-1));
 	    this.minHighwayRank = minHighwayRank;
-	    nodesToCheck = new ArrayList<Node>(2);
-	    nodeRefs = new ArrayList<Integer>(2);
+	    nodesToCheck = new ArrayList<>(2);
+	    nodeRefs = new ArrayList<>(2);
 	    nodesToCheck.add(from.firstNode());
 	    nodesToCheck.add(from.lastNode());
@@ -156,6 +156,6 @@
 	
 	public void processNextLevel() {
-	    List<Node> newNodes = new ArrayList<Node>();
-	    List<Integer> newIdx = new ArrayList<Integer>();
+	    List<Node> newNodes = new ArrayList<>();
+	    List<Integer> newIdx = new ArrayList<>();
 	    for( int i = 0; i < nodesToCheck.size(); i++ ) {
 		Node node = nodesToCheck.get(i);
@@ -197,5 +197,5 @@
 	    if( pos < 0 )
 		throw new ArrayIndexOutOfBoundsException("Way " + to + " is not in the tree.");
-	    List<Way> result = new ArrayList<Way>(1);
+	    List<Way> result = new ArrayList<>(1);
 	    while( pos >= 0 ) {
 		result.add(tree.get(pos));
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModNodesAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModNodesAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModNodesAction.java	(revision 30737)
@@ -52,5 +52,5 @@
         }
 
-        Set<Node> nodes = new HashSet<Node>(10);
+        Set<Node> nodes = new HashSet<>(10);
         do {  //  select next history element
             if (idx>0) idx--; else idx=num-1;
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModWaysAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModWaysAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModWaysAction.java	(revision 30737)
@@ -52,5 +52,5 @@
         }
 
-        Set<Way> ways = new HashSet<Way>(10);
+        Set<Way> ways = new HashSet<>(10);
         do {  //  select next history element
             if (idx>0) idx--; else idx=num-1;
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectWayNodesAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectWayNodesAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectWayNodesAction.java	(revision 30737)
@@ -54,5 +54,5 @@
                 Node n = (Node) p;
                 if (selectedNodes == null) {
-                    selectedNodes = new ArrayList<Node>();
+                    selectedNodes = new ArrayList<>();
                 }
                 selectedNodes.add(n);
@@ -68,5 +68,5 @@
         for (Node n : w.getNodes()) {
             if (selectedNodes == null) {
-                selectedNodes = new ArrayList<Node>();
+                selectedNodes = new ArrayList<>();
             }
             selectedNodes.add(n);
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/UndoSelectionAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/UndoSelectionAction.java	(revision 30736)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/UndoSelectionAction.java	(revision 30737)
@@ -48,5 +48,5 @@
         }
         int k=0;
-        Set<OsmPrimitive> newsel = new HashSet<OsmPrimitive>();
+        Set<OsmPrimitive> newsel = new HashSet<>();
         do {
             if (index+1<history.size()) index++; else index=0;
Index: applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPositionLayer.java
===================================================================
--- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPositionLayer.java	(revision 30736)
+++ applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPositionLayer.java	(revision 30737)
@@ -59,5 +59,5 @@
     //make a flat copy
     private List<WayPoint> importGPSLayer(GpxData gps) {
-        LinkedList<WayPoint> ls = new LinkedList<WayPoint>();
+        LinkedList<WayPoint> ls = new LinkedList<>();
         for (GpxTrack trk : gps.tracks) {
             for (GpxTrackSegment segment : trk.getSegments()) {
Index: applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java
===================================================================
--- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java	(revision 30736)
+++ applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java	(revision 30737)
@@ -24,5 +24,5 @@
 	public GPSVideoPlayer(DateFormat videoTimeFormat,VideoPositionLayer videoPositionLayer) throws HeadlessException {
 		super(videoTimeFormat);
-		videos = new LinkedList<GPSVideo>();
+		videos = new LinkedList<>();
 		this.videoPositionLayer=videoPositionLayer;
 		videoPositionLayer.setGPSVideoPlayer(this);
Index: applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayer.java
===================================================================
--- applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayer.java	(revision 30736)
+++ applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayer.java	(revision 30737)
@@ -56,5 +56,5 @@
         videoengine=new VideoEngine(this);
         videoengine.addObserver(this);
-        observers=new LinkedList<VideoPlayerObserver>();        
+        observers=new LinkedList<>();        
         addObserver(this);
         //setup GUI
@@ -159,5 +159,5 @@
         speed.setPaintTicks(true);          
         speed.setOrientation(Adjustable.VERTICAL);
-        Hashtable<Integer, JLabel> labelTable = new Hashtable<Integer, JLabel>();
+        Hashtable<Integer, JLabel> labelTable = new Hashtable<>();
         labelTable.put( new Integer( 100 ), new JLabel("1x") );
         labelTable.put( new Integer( 50 ), new JLabel("-2x") );
Index: applications/editors/josm/plugins/walkingpapers/src/org/openstreetmap/josm/plugins/walkingpapers/WalkingPapersLayer.java
===================================================================
--- applications/editors/josm/plugins/walkingpapers/src/org/openstreetmap/josm/plugins/walkingpapers/WalkingPapersLayer.java	(revision 30736)
+++ applications/editors/josm/plugins/walkingpapers/src/org/openstreetmap/josm/plugins/walkingpapers/WalkingPapersLayer.java	(revision 30737)
@@ -112,5 +112,5 @@
 
     public void clearTileStorage() {
-        tileStorage = new HashMap<WalkingPapersKey, WalkingPapersTile>();
+        tileStorage = new HashMap<>();
         checkTileStorage();
     }
@@ -141,5 +141,5 @@
         if (now - lastCheck < 1000) return;
         lastCheck = now;
-        TreeSet<WalkingPapersTile> tiles = new TreeSet<WalkingPapersTile>(new TileTimeComp());
+        TreeSet<WalkingPapersTile> tiles = new TreeSet<>(new TileTimeComp());
         tiles.addAll(tileStorage.values());
         int max_nr_tiles = 100;
Index: applications/editors/josm/plugins/waydownloader/src/org/openstreetmap/josm/plugins/waydownloader/WayDownloaderPlugin.java
===================================================================
--- applications/editors/josm/plugins/waydownloader/src/org/openstreetmap/josm/plugins/waydownloader/WayDownloaderPlugin.java	(revision 30736)
+++ applications/editors/josm/plugins/waydownloader/src/org/openstreetmap/josm/plugins/waydownloader/WayDownloaderPlugin.java	(revision 30737)
@@ -263,5 +263,5 @@
     private List<Way> findConnectedWays(Node referenceNode) {
         List<Way> referers = OsmPrimitive.getFilteredList(referenceNode.getReferrers(), Way.class);
-        ArrayList<Way> connectedWays = new ArrayList<Way>(referers.size());
+        ArrayList<Way> connectedWays = new ArrayList<>(referers.size());
 
         //loop through referers
Index: applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/Engine.java
===================================================================
--- applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/Engine.java	(revision 30736)
+++ applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/Engine.java	(revision 30737)
@@ -11,5 +11,5 @@
     
     public List<Marker> searchGpxWaypoints(String waypointSearchPattern) {
-        List<Marker> returnList = new ArrayList<Marker>();
+        List<Marker> returnList = new ArrayList<>();
         if (gpxLayersExist()) {
             //Loop over marker (waypoint) layers.. it could be more than one
Index: applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/SelectWaypointDialog.java
===================================================================
--- applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/SelectWaypointDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/SelectWaypointDialog.java	(revision 30737)
@@ -22,5 +22,5 @@
     private DefaultListModel<String> listModel = new DefaultListModel<>();
     private JList<String> searchResult = new JList<>(listModel);
-    private List<Marker> SearchResultObjectCache = new ArrayList<Marker>();
+    private List<Marker> SearchResultObjectCache = new ArrayList<>();
     private boolean first_time_search = true;
     private Engine engine = new Engine();
Index: applications/editors/josm/plugins/wayselector/src/org/openstreetmap/josm/plugins/wayselector/WaySelection.java
===================================================================
--- applications/editors/josm/plugins/wayselector/src/org/openstreetmap/josm/plugins/wayselector/WaySelection.java	(revision 30736)
+++ applications/editors/josm/plugins/wayselector/src/org/openstreetmap/josm/plugins/wayselector/WaySelection.java	(revision 30737)
@@ -31,6 +31,6 @@
         }
         else {
-            nodes = new TreeSet<Node>();
-            outerNodes = new TreeSet<Node>();
+            nodes = new TreeSet<>();
+            outerNodes = new TreeSet<>();
 
             for (Way way : ways)
@@ -126,5 +126,5 @@
             return;
 
-        selection = new LinkedList<OsmPrimitive>();
+        selection = new LinkedList<>();
         for (OsmPrimitive primitive : currentSelection)
             selection.add(primitive);
Index: applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaAddNamesAction.java
===================================================================
--- applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaAddNamesAction.java	(revision 30736)
+++ applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaAddNamesAction.java	(revision 30737)
@@ -31,5 +31,5 @@
     public void actionPerformed(ActionEvent e) {
         final WikipediaApp.WikipediaLangArticle wp = WikipediaApp.WikipediaLangArticle.parseTag("wikipedia", getWikipediaValue());
-        List<String[]> tags = new ArrayList<String[]>();
+        List<String[]> tags = new ArrayList<>();
         for (WikipediaApp.WikipediaLangArticle i : WikipediaApp.getInterwikiArticles(wp.lang, wp.article)) {
             if (useWikipediaLangArticle(i)) {
Index: applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java
===================================================================
--- applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java	(revision 30736)
+++ applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java	(revision 30737)
@@ -54,5 +54,5 @@
             NodeList nodes = (NodeList) xpathPlacemark.evaluate(doc, XPathConstants.NODESET);
             // construct WikipediaEntry for each XML element
-            List<WikipediaEntry> entries = new ArrayList<WikipediaEntry>(nodes.getLength());
+            List<WikipediaEntry> entries = new ArrayList<>(nodes.getLength());
             for (int i = 0; i < nodes.getLength(); i++) {
                 final String[] coord = xpathCoord.evaluate(nodes.item(i)).split(",");
@@ -79,5 +79,5 @@
             System.out.println("Wikipedia: GET " + url);
             final Scanner scanner = new Scanner(new URL(url).openStream(), "UTF-8").useDelimiter("\n");
-            final List<WikipediaEntry> entries = new ArrayList<WikipediaEntry>();
+            final List<WikipediaEntry> entries = new ArrayList<>();
             while (scanner.hasNext()) {
                 final String article = scanner.next().trim().replace("_", " ");
@@ -92,5 +92,5 @@
     static List<WikipediaEntry> getEntriesFromClipboard(final String wikipediaLang) {
         final List<String> clipboardLines = Arrays.asList(Utils.getClipboardContent().split("[\\n\\r]+"));
-        return new ArrayList<WikipediaEntry>(Utils.transform(clipboardLines, new Function<String, WikipediaEntry>() {
+        return new ArrayList<>(Utils.transform(clipboardLines, new Function<String, WikipediaEntry>() {
 
             @Override
@@ -102,9 +102,9 @@
 
     static void updateWIWOSMStatus(String wikipediaLang, Collection<WikipediaEntry> entries) {
-        Collection<String> articleNames = new ArrayList<String>();
+        Collection<String> articleNames = new ArrayList<>();
         for (WikipediaEntry i : entries) {
             articleNames.add(i.wikipediaArticle);
         }
-        Map<String, Boolean> status = new HashMap<String, Boolean>();
+        Map<String, Boolean> status = new HashMap<>();
         if (!articleNames.isEmpty()) {
             final String url = "https://tools.wmflabs.org/wiwosm/osmjson/getGeoJSON.php?action=check"
@@ -162,5 +162,5 @@
     static Collection<WikipediaLangArticle> getInterwikiArticles(String wikipediaLang, String article) {
         try {
-            Collection<WikipediaLangArticle> r = new ArrayList<WikipediaLangArticle>();
+            Collection<WikipediaLangArticle> r = new ArrayList<>();
             final String url = "https://" + wikipediaLang + ".wikipedia.org/w/api.php" +
                     "?action=query" +
Index: applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaToggleDialog.java
===================================================================
--- applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaToggleDialog.java	(revision 30736)
+++ applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaToggleDialog.java	(revision 30737)
@@ -59,5 +59,5 @@
     String titleContext = null;
     final StringProperty wikipediaLang = new StringProperty("wikipedia.lang", LanguageInfo.getJOSMLocaleCode().substring(0, 2));
-    final Set<String> articles = new HashSet<String>();
+    final Set<String> articles = new HashSet<>();
     final DefaultListModel<WikipediaEntry> model = new DefaultListModel<>();
     final JList<WikipediaEntry> list = new JList<WikipediaEntry>(model) {
Index: applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java
===================================================================
--- applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java	(revision 30736)
+++ applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java	(revision 30737)
@@ -94,5 +94,5 @@
             addActionListener(this);
 
-            trackSegs = new ArrayList<Collection<WayPoint>>();
+            trackSegs = new ArrayList<>();
         }
 
@@ -113,5 +113,5 @@
 
             /* Start recording */
-            segment = new ArrayList<WayPoint>();
+            segment = new ArrayList<>();
             trackSegs.add(segment);
             actionPerformed(null);
@@ -233,6 +233,6 @@
     protected int current_car = 0;
     protected boolean cacti_on = true;
-    protected List<EastNorth> cacti = new ArrayList<EastNorth>();
-    protected List<EastNorth> todelete = new ArrayList<EastNorth>();
+    protected List<EastNorth> cacti = new ArrayList<>();
+    protected List<EastNorth> todelete = new ArrayList<>();
     protected int splashframe = -1;
     protected EastNorth splashcactus;
@@ -337,5 +337,5 @@
             }
             cacti.removeAll(todelete);
-            todelete = new ArrayList<EastNorth>();
+            todelete = new ArrayList<>();
         }
     }
@@ -673,5 +673,5 @@
                 cacti_on = !cacti_on;
                 if (!cacti_on)
-                    cacti = new ArrayList<EastNorth>();
+                    cacti = new ArrayList<>();
             }
 
