Index: trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 10616)
@@ -576,5 +576,5 @@
     private void requestFocusToDefaultButton() {
         if (defaultButton != null) {
-            GuiHelper.runInEDT(() -> defaultButton.requestFocusInWindow());
+            GuiHelper.runInEDT(defaultButton::requestFocusInWindow);
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 10616)
@@ -500,5 +500,5 @@
             final Popup staticPopup = popup;
             popup = null;
-            EventQueue.invokeLater(() -> staticPopup.hide());
+            EventQueue.invokeLater(staticPopup::hide);
         }
 
@@ -520,5 +520,5 @@
             } else {
                 // There is no old popup
-                EventQueue.invokeLater(() -> staticPopup.show());
+                EventQueue.invokeLater(staticPopup::show);
             }
             this.popupLabels = lbls;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 10616)
@@ -420,5 +420,5 @@
                     refreshView(r);
                 }
-                SwingUtilities.invokeLater(() -> Main.map.repaint());
+                SwingUtilities.invokeLater(Main.map::repaint);
             } catch (OsmTransferException e) {
                 if (canceled) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 10616)
@@ -122,5 +122,5 @@
         // just trigger a repaint - the display name of the relation members may have changed
         Collection<RelationMember> sel = getSelectedMembers();
-        GuiHelper.runInEDT(() -> fireTableDataChanged());
+        GuiHelper.runInEDT(this::fireTableDataChanged);
         setSelectedMembers(sel);
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java	(revision 10616)
@@ -167,5 +167,5 @@
                 // FIXME: this is necessary because there are dialogs listening
                 // for DataChangeEvents which manipulate Swing components on this thread.
-                SwingUtilities.invokeLater(() -> getLayer().onPostDownloadFromServer());
+                SwingUtilities.invokeLater(getLayer()::onPostDownloadFromServer);
 
                 if (visitor.getConflicts().isEmpty())
Index: trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java	(revision 10616)
@@ -138,5 +138,5 @@
         final Set<PrimitiveId> errs = mainTask.getMissingPrimitives();
         if (errs != null && !errs.isEmpty())
-            GuiHelper.runInEDTAndWait(() -> reportProblemDialog(errs,
+            GuiHelper.runInEDTAndWait(reportProblemDialog(errs,
                     trn("Object could not be downloaded", "Some objects could not be downloaded", errs.size()),
                     trn("One object could not be downloaded.<br>",
@@ -148,5 +148,5 @@
                     tr("missing objects:"),
                     JOptionPane.ERROR_MESSAGE
-                    ).showDialog());
+                    )::showDialog);
 
         // Warm about deleted primitives
@@ -160,5 +160,5 @@
         }
         if (!del.isEmpty())
-            GuiHelper.runInEDTAndWait(() -> reportProblemDialog(del,
+            GuiHelper.runInEDTAndWait(reportProblemDialog(del,
                     trn("Object deleted", "Objects deleted", del.size()),
                     trn(
@@ -169,5 +169,5 @@
                     null,
                     JOptionPane.WARNING_MESSAGE
-            ).showDialog());
+            )::showDialog);
     }
 
Index: trunk/src/org/openstreetmap/josm/io/NMEAImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NMEAImporter.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/io/NMEAImporter.java	(revision 10616)
@@ -75,8 +75,8 @@
            .append("</html>");
         if (success) {
-            SwingUtilities.invokeLater(() -> new Notification(
+            SwingUtilities.invokeLater(new Notification(
                     "<h3>" + tr("NMEA import success:") + "</h3>" + msg.toString())
                     .setIcon(JOptionPane.INFORMATION_MESSAGE)
-                    .show());
+                    ::show);
         } else {
             HelpAwareOptionPane.showMessageDialogInEDT(
Index: trunk/src/org/openstreetmap/josm/plugins/Plugin.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/Plugin.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/plugins/Plugin.java	(revision 10616)
@@ -146,10 +146,6 @@
         File pluginJar = new File(pluginDir, info.name + ".jar");
         final URL pluginJarUrl = Utils.fileToURL(pluginJar);
-        return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
-              @Override
-              public ClassLoader run() {
-                  return new URLClassLoader(new URL[] {pluginJarUrl}, Main.class.getClassLoader());
-              }
-        });
+        return AccessController.doPrivileged((PrivilegedAction<ClassLoader>)
+                () -> new URLClassLoader(new URL[] {pluginJarUrl}, Main.class.getClassLoader()));
     }
 }
Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 10616)
@@ -24,5 +24,4 @@
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -35,5 +34,4 @@
 import java.util.Set;
 import java.util.TreeSet;
-import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.FutureTask;
@@ -534,41 +532,35 @@
 
         // Continuation
-        Main.worker.submit(new Runnable() {
-            @Override
-            public void run() {
-                // Build list of plugins to download
-                Set<PluginInformation> toDownload = new HashSet<>(pluginInfoDownloadTask.getAvailablePlugins());
-                for (Iterator<PluginInformation> it = toDownload.iterator(); it.hasNext();) {
-                    PluginInformation info = it.next();
-                    if (!missingRequiredPlugin.contains(info.getName())) {
-                        it.remove();
+        Main.worker.submit(() -> {
+            // Build list of plugins to download
+            Set<PluginInformation> toDownload = new HashSet<>(pluginInfoDownloadTask.getAvailablePlugins());
+            for (Iterator<PluginInformation> it = toDownload.iterator(); it.hasNext();) {
+                PluginInformation info = it.next();
+                if (!missingRequiredPlugin.contains(info.getName())) {
+                    it.remove();
+                }
+            }
+            // Check if something has still to be downloaded
+            if (!toDownload.isEmpty()) {
+                // download plugins
+                final PluginDownloadTask task = new PluginDownloadTask(parent, toDownload, tr("Download plugins"));
+                Main.worker.submit(task);
+                Main.worker.submit(() -> {
+                    // restart if some plugins have been downloaded
+                    if (!task.getDownloadedPlugins().isEmpty()) {
+                        // update plugin list in preferences
+                        Set<String> plugins = new HashSet<>(Main.pref.getCollection("plugins"));
+                        for (PluginInformation plugin : task.getDownloadedPlugins()) {
+                            plugins.add(plugin.name);
+                        }
+                        Main.pref.putCollection("plugins", plugins);
+                        // restart
+                        new RestartAction().actionPerformed(null);
+                    } else {
+                        Main.warn("No plugin downloaded, restart canceled");
                     }
-                }
-                // Check if something has still to be downloaded
-                if (!toDownload.isEmpty()) {
-                    // download plugins
-                    final PluginDownloadTask task = new PluginDownloadTask(parent, toDownload, tr("Download plugins"));
-                    Main.worker.submit(task);
-                    Main.worker.submit(new Runnable() {
-                        @Override
-                        public void run() {
-                            // restart if some plugins have been downloaded
-                            if (!task.getDownloadedPlugins().isEmpty()) {
-                                // update plugin list in preferences
-                                Set<String> plugins = new HashSet<>(Main.pref.getCollection("plugins"));
-                                for (PluginInformation plugin : task.getDownloadedPlugins()) {
-                                    plugins.add(plugin.name);
-                                }
-                                Main.pref.putCollection("plugins", plugins);
-                                // restart
-                                new RestartAction().actionPerformed(null);
-                            } else {
-                                Main.warn("No plugin downloaded, restart canceled");
-                            }
-                        }
-                    });
-                } else {
-                    Main.warn("No plugin to download, operation canceled");
-                }
+                });
+            } else {
+                Main.warn("No plugin to download, operation canceled");
             }
         });
@@ -665,10 +657,6 @@
     public static synchronized DynamicURLClassLoader getPluginClassLoader() {
         if (pluginClassLoader == null) {
-            pluginClassLoader = AccessController.doPrivileged(new PrivilegedAction<DynamicURLClassLoader>() {
-                @Override
-                public DynamicURLClassLoader run() {
-                    return new DynamicURLClassLoader(new URL[0], Main.class.getClassLoader());
-                }
-            });
+            pluginClassLoader = AccessController.doPrivileged((PrivilegedAction<DynamicURLClassLoader>)
+                    () -> new DynamicURLClassLoader(new URL[0], Main.class.getClassLoader()));
             sources.add(0, pluginClassLoader);
         }
@@ -760,11 +748,8 @@
             Collections.sort(
                     toLoad,
-                    new Comparator<PluginInformation>() {
-                        @Override
-                        public int compare(PluginInformation o1, PluginInformation o2) {
-                            if (o1.stage < o2.stage) return -1;
-                            if (o1.stage == o2.stage) return 0;
-                            return 1;
-                        }
+                    (o1, o2) -> {
+                        if (o1.stage < o2.stage) return -1;
+                        if (o1.stage == o2.stage) return 0;
+                        return 1;
                     }
             );
@@ -1173,10 +1158,5 @@
             return;
 
-        final File[] files = pluginDir.listFiles(new FilenameFilter() {
-            @Override
-            public boolean accept(File dir, String name) {
-                return name.endsWith(".jar.new");
-            }
-        });
+        final File[] files = pluginDir.listFiles((FilenameFilter) (dir, name) -> name.endsWith(".jar.new"));
         if (files == null)
             return;
@@ -1198,5 +1178,5 @@
             } catch (IOException e) {
                 if (dowarn) {
-                    Main.warn(tr("Failed to install plugin ''{0}'' from temporary download file ''{1}''. {2}",
+                    Main.warn(e, tr("Failed to install plugin ''{0}'' from temporary download file ''{1}''. {2}",
                             plugin.toString(), updatedPlugin.toString(), e.getLocalizedMessage()));
                 }
@@ -1309,19 +1289,14 @@
 
         try {
-            FutureTask<Integer> task = new FutureTask<>(new Callable<Integer>() {
-                @Override
-                public Integer call() {
-                    return HelpAwareOptionPane.showOptionDialog(
-                            Main.parent,
-                            msg.toString(),
-                            tr("Update plugins"),
-                            JOptionPane.QUESTION_MESSAGE,
-                            null,
-                            options,
-                            options[0],
-                            ht("/ErrorMessages#ErrorInPlugin")
-                    );
-                }
-            });
+            FutureTask<Integer> task = new FutureTask<>(() -> HelpAwareOptionPane.showOptionDialog(
+                    Main.parent,
+                    msg.toString(),
+                    tr("Update plugins"),
+                    JOptionPane.QUESTION_MESSAGE,
+                    null,
+                    options,
+                    options[0],
+                    ht("/ErrorMessages#ErrorInPlugin")
+            ));
             GuiHelper.runInEDT(task);
             return task.get();
@@ -1394,15 +1369,10 @@
             plugins.remove(plugin.getPluginInformation().name);
             Main.pref.putCollection("plugins", plugins);
-            GuiHelper.runInEDTAndWait(new Runnable() {
-                @Override
-                public void run() {
-                    JOptionPane.showMessageDialog(
-                            Main.parent,
-                            tr("The plugin has been removed from the configuration. Please restart JOSM to unload the plugin."),
-                            tr("Information"),
-                            JOptionPane.INFORMATION_MESSAGE
-                    );
-                }
-            });
+            GuiHelper.runInEDTAndWait(() -> JOptionPane.showMessageDialog(
+                    Main.parent,
+                    tr("The plugin has been removed from the configuration. Please restart JOSM to unload the plugin."),
+                    tr("Information"),
+                    JOptionPane.INFORMATION_MESSAGE
+            ));
             return null;
         default:
Index: trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java	(revision 10616)
@@ -47,4 +47,8 @@
     }
 
+    /**
+     * Constructs a new {@code ReadLocalPluginInformationTask}.
+     * @param monitor progress monitor
+     */
     public ReadLocalPluginInformationTask(ProgressMonitor monitor) {
         super(tr("Reading local plugin information.."), monitor, false);
@@ -77,12 +81,5 @@
 
     private static File[] listFiles(File pluginsDirectory, final String regex) {
-        return pluginsDirectory.listFiles(
-                new FilenameFilter() {
-                    @Override
-                    public boolean accept(File dir, String name) {
-                        return name.matches(regex);
-                    }
-                }
-        );
+        return pluginsDirectory.listFiles((FilenameFilter) (dir, name) -> name.matches(regex));
     }
 
@@ -108,10 +105,5 @@
     protected void scanPluginFiles(ProgressMonitor monitor, File pluginsDirectory) {
         File[] pluginFiles = pluginsDirectory.listFiles(
-                new FilenameFilter() {
-                    @Override
-                    public boolean accept(File dir, String name) {
-                        return name.endsWith(".jar") || name.endsWith(".jar.new");
-                    }
-                }
+                (FilenameFilter) (dir, name) -> name.endsWith(".jar") || name.endsWith(".jar.new")
         );
         if (pluginFiles == null || pluginFiles.length == 0)
@@ -131,5 +123,5 @@
                 }
             } catch (PluginException e) {
-                Main.warn("PluginException: "+e.getMessage());
+                Main.warn(e, "PluginException: ");
                 Main.warn(tr("Failed to scan file ''{0}'' for plugin information. Skipping.", fname));
             }
Index: trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 10616)
@@ -200,25 +200,23 @@
     private static void displayErrorMessage(final ProgressMonitor monitor, final String msg, final String details, final String title,
             final String firstMessage) {
-        GuiHelper.runInEDTAndWait(new Runnable() {
-            @Override public void run() {
-                JPanel panel = new JPanel(new GridBagLayout());
-                panel.add(new JLabel(firstMessage), GBC.eol().insets(0, 0, 0, 10));
-                StringBuilder b = new StringBuilder();
-                for (String part : msg.split("(?<=\\G.{200})")) {
-                    b.append(part).append('\n');
-                }
-                panel.add(new JLabel("<html><body width=\"500\"><b>"+b.toString().trim()+"</b></body></html>"), GBC.eol().insets(0, 0, 0, 10));
-                if (details != null && !details.isEmpty()) {
-                    panel.add(new JLabel(tr("Details:")), GBC.eol().insets(0, 0, 0, 10));
-                    JosmTextArea area = new JosmTextArea(details);
-                    area.setEditable(false);
-                    area.setLineWrap(true);
-                    area.setWrapStyleWord(true);
-                    JScrollPane scrollPane = new JScrollPane(area);
-                    scrollPane.setPreferredSize(new Dimension(500, 300));
-                    panel.add(scrollPane, GBC.eol().fill());
-                }
-                JOptionPane.showMessageDialog(monitor.getWindowParent(), panel, title, JOptionPane.ERROR_MESSAGE);
-            }
+        GuiHelper.runInEDTAndWait(() -> {
+            JPanel panel = new JPanel(new GridBagLayout());
+            panel.add(new JLabel(firstMessage), GBC.eol().insets(0, 0, 0, 10));
+            StringBuilder b = new StringBuilder();
+            for (String part : msg.split("(?<=\\G.{200})")) {
+                b.append(part).append('\n');
+            }
+            panel.add(new JLabel("<html><body width=\"500\"><b>"+b.toString().trim()+"</b></body></html>"), GBC.eol().insets(0, 0, 0, 10));
+            if (details != null && !details.isEmpty()) {
+                panel.add(new JLabel(tr("Details:")), GBC.eol().insets(0, 0, 0, 10));
+                JosmTextArea area = new JosmTextArea(details);
+                area.setEditable(false);
+                area.setLineWrap(true);
+                area.setWrapStyleWord(true);
+                JScrollPane scrollPane = new JScrollPane(area);
+                scrollPane.setPreferredSize(new Dimension(500, 300));
+                panel.add(scrollPane, GBC.eol().fill());
+            }
+            JOptionPane.showMessageDialog(monitor.getWindowParent(), panel, title, JOptionPane.ERROR_MESSAGE);
         });
     }
@@ -296,11 +294,6 @@
         for (String location : PluginInformation.getPluginLocations()) {
             File[] f = new File(location).listFiles(
-                    new FilenameFilter() {
-                        @Override
-                        public boolean accept(File dir, String name) {
-                            return name.matches("^([0-9]+-)?site.*\\.txt$") ||
-                            name.matches("^([0-9]+-)?site.*-icons\\.zip$");
-                        }
-                    }
+                    (FilenameFilter) (dir, name) -> name.matches("^([0-9]+-)?site.*\\.txt$") ||
+                                                    name.matches("^([0-9]+-)?site.*-icons\\.zip$")
             );
             if (f != null && f.length > 0) {
Index: trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 10616)
@@ -34,4 +34,5 @@
 import org.openstreetmap.josm.io.OsmTransferException;
 import org.openstreetmap.josm.io.auth.CredentialsManager;
+import org.openstreetmap.josm.tools.Utils.Function;
 import org.openstreetmap.josm.tools.date.DateUtils;
 
@@ -141,11 +142,5 @@
             OsmPrimitive firstRefs = conflict.b.iterator().next();
             String objId = Long.toString(conflict.a.getId());
-            Collection<Long> refIds = Utils.transform(conflict.b, new Utils.Function<OsmPrimitive, Long>() {
-
-                @Override
-                public Long apply(OsmPrimitive x) {
-                    return x.getId();
-                }
-            });
+            Collection<Long> refIds = Utils.transform(conflict.b, (Function<OsmPrimitive, Long>) x -> x.getId());
             String refIdsString = refIds.size() == 1 ? refIds.iterator().next().toString() : refIds.toString();
             if (conflict.a instanceof Node) {
Index: trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 10616)
@@ -16,5 +16,4 @@
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.Comparator;
 import java.util.HashMap;
 import java.util.Locale;
@@ -382,10 +381,5 @@
         Locale[] l = new Locale[v.size()];
         l = v.toArray(l);
-        Arrays.sort(l, new Comparator<Locale>() {
-            @Override
-            public int compare(Locale o1, Locale o2) {
-                return o1.toString().compareTo(o2.toString());
-            }
-        });
+        Arrays.sort(l, (o1, o2) -> o1.toString().compareTo(o2.toString()));
         return l;
     }
@@ -743,10 +737,5 @@
 
     public static TranslationAdapter getTranslationAdapter() {
-        return new TranslationAdapter() {
-            @Override
-            public String tr(String text, Object... objects) {
-                return I18n.tr(text, objects);
-            }
-        };
+        return (text, objects) -> I18n.tr(text, objects);
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 10616)
@@ -33,5 +33,4 @@
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.Comparator;
 import java.util.HashMap;
 import java.util.Hashtable;
@@ -76,5 +75,4 @@
 import org.w3c.dom.NodeList;
 import org.xml.sax.Attributes;
-import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -687,6 +685,5 @@
      * Load the image in a background thread.
      *
-     * This method returns immediately and runs the image request
-     * asynchronously.
+     * This method returns immediately and runs the image request asynchronously.
      *
      * @param callback a callback. It is called, when the image is ready.
@@ -697,15 +694,7 @@
     public void getInBackground(final ImageCallback callback) {
         if (name.startsWith(HTTP_PROTOCOL) || name.startsWith(WIKI_PROTOCOL)) {
-            Runnable fetch = new Runnable() {
-                @Override
-                public void run() {
-                    ImageIcon result = get();
-                    callback.finished(result);
-                }
-            };
-            IMAGE_FETCHER.submit(fetch);
+            IMAGE_FETCHER.submit(() -> callback.finished(get()));
         } else {
-            ImageIcon result = get();
-            callback.finished(result);
+            callback.finished(get());
         }
     }
@@ -714,6 +703,5 @@
      * Load the image in a background thread.
      *
-     * This method returns immediately and runs the image request
-     * asynchronously.
+     * This method returns immediately and runs the image request asynchronously.
      *
      * @param callback a callback. It is called, when the image is ready.
@@ -725,11 +713,5 @@
     public void getInBackground(final ImageResourceCallback callback) {
         if (name.startsWith(HTTP_PROTOCOL) || name.startsWith(WIKI_PROTOCOL)) {
-            Runnable fetch = new Runnable() {
-                @Override
-                public void run() {
-                    callback.finished(getResource());
-                }
-            };
-            IMAGE_FETCHER.submit(fetch);
+            IMAGE_FETCHER.submit(() -> callback.finished(getResource()));
         } else {
             callback.finished(getResource());
@@ -1280,10 +1262,5 @@
             });
 
-            parser.setEntityResolver(new EntityResolver() {
-                @Override
-                public InputSource resolveEntity(String publicId, String systemId) {
-                    return new InputSource(new ByteArrayInputStream(new byte[0]));
-                }
-            });
+            parser.setEntityResolver((publicId, systemId) -> new InputSource(new ByteArrayInputStream(new byte[0])));
 
             CachedFile cf = new CachedFile(base + fn).setDestDir(
@@ -1508,11 +1485,8 @@
         // Check if the presets have icons for nodes/relations.
         if (!OsmPrimitiveType.WAY.equals(primitive.getType())) {
-            final Collection<TaggingPreset> presets = new TreeSet<>(new Comparator<TaggingPreset>() {
-                @Override
-                public int compare(TaggingPreset o1, TaggingPreset o2) {
-                    final int o1TypesSize = o1.types == null || o1.types.isEmpty() ? Integer.MAX_VALUE : o1.types.size();
-                    final int o2TypesSize = o2.types == null || o2.types.isEmpty() ? Integer.MAX_VALUE : o2.types.size();
-                    return Integer.compare(o1TypesSize, o2TypesSize);
-                }
+            final Collection<TaggingPreset> presets = new TreeSet<>((o1, o2) -> {
+                final int o1TypesSize = o1.types == null || o1.types.isEmpty() ? Integer.MAX_VALUE : o1.types.size();
+                final int o2TypesSize = o2.types == null || o2.types.isEmpty() ? Integer.MAX_VALUE : o2.types.size();
+                return Integer.compare(o1TypesSize, o2TypesSize);
             });
             presets.addAll(TaggingPresets.getMatchingPresets(primitive));
Index: trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 10616)
@@ -7,5 +7,4 @@
 import java.awt.KeyboardFocusManager;
 import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
 import java.util.HashMap;
@@ -63,10 +62,5 @@
                         String.valueOf(info.getShortcut()), info.getDescription()));
                 item.setMnemonic(info.getShortcut());
-                item.addActionListener(new ActionListener() {
-                    @Override
-                    public void actionPerformed(ActionEvent e) {
-                        action.action.executeMultikeyAction(info.getIndex(), false);
-                    }
-                });
+                item.addActionListener(e -> action.action.executeMultikeyAction(info.getIndex(), false));
                 layers.add(item);
             }
@@ -79,10 +73,5 @@
                             "Repeat " + lastLayer.getDescription()));
                     repeateItem.setMnemonic(action.shortcut.getKeyStroke().getKeyCode());
-                    repeateItem.addActionListener(new ActionListener() {
-                        @Override
-                        public void actionPerformed(ActionEvent e) {
-                            action.action.executeMultikeyAction(-1, true);
-                        }
-                    });
+                    repeateItem.addActionListener(e -> action.action.executeMultikeyAction(-1, true));
                     layers.add(repeateItem);
                 }
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 10616)
@@ -421,34 +421,31 @@
     // Method unused, but kept for translation already done. To reuse during Java 9 migration
     protected void askUpdateJava(final String version, final String url) {
-        GuiHelper.runInEDTAndWait(new Runnable() {
-            @Override
-            public void run() {
-                ExtendedDialog ed = new ExtendedDialog(
-                        Main.parent,
-                        tr("Outdated Java version"),
-                        new String[]{tr("OK"), tr("Update Java"), tr("Cancel")});
-                // Check if the dialog has not already been permanently hidden by user
-                if (!ed.toggleEnable("askUpdateJava9").toggleCheckState()) {
-                    ed.setButtonIcons(new String[]{"ok", "java", "cancel"}).setCancelButton(3);
-                    ed.setMinimumSize(new Dimension(480, 300));
-                    ed.setIcon(JOptionPane.WARNING_MESSAGE);
-                    StringBuilder content = new StringBuilder(tr("You are running version {0} of Java.", "<b>"+version+"</b>"))
-                            .append("<br><br>");
-                    if ("Sun Microsystems Inc.".equals(System.getProperty("java.vendor")) && !isOpenJDK()) {
-                        content.append("<b>").append(tr("This version is no longer supported by {0} since {1} and is not recommended for use.",
-                                "Oracle", tr("April 2015"))).append("</b><br><br>"); // TODO: change date once Java 8 EOL is announced
-                    }
-                    content.append("<b>")
-                           .append(tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "8"))
-                           .append("</b><br><br>")
-                           .append(tr("Would you like to update now ?"));
-                    ed.setContent(content.toString());
-
-                    if (ed.showDialog().getValue() == 2) {
-                        try {
-                            openUrl(url);
-                        } catch (IOException e) {
-                            Main.warn(e);
-                        }
+        GuiHelper.runInEDTAndWait(() -> {
+            ExtendedDialog ed = new ExtendedDialog(
+                    Main.parent,
+                    tr("Outdated Java version"),
+                    new String[]{tr("OK"), tr("Update Java"), tr("Cancel")});
+            // Check if the dialog has not already been permanently hidden by user
+            if (!ed.toggleEnable("askUpdateJava9").toggleCheckState()) {
+                ed.setButtonIcons(new String[]{"ok", "java", "cancel"}).setCancelButton(3);
+                ed.setMinimumSize(new Dimension(480, 300));
+                ed.setIcon(JOptionPane.WARNING_MESSAGE);
+                StringBuilder content = new StringBuilder(tr("You are running version {0} of Java.", "<b>"+version+"</b>"))
+                        .append("<br><br>");
+                if ("Sun Microsystems Inc.".equals(System.getProperty("java.vendor")) && !isOpenJDK()) {
+                    content.append("<b>").append(tr("This version is no longer supported by {0} since {1} and is not recommended for use.",
+                            "Oracle", tr("April 2015"))).append("</b><br><br>"); // TODO: change date once Java 8 EOL is announced
+                }
+                content.append("<b>")
+                       .append(tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "8"))
+                       .append("</b><br><br>")
+                       .append(tr("Would you like to update now ?"));
+                ed.setContent(content.toString());
+
+                if (ed.showDialog().getValue() == 2) {
+                    try {
+                        openUrl(url);
+                    } catch (IOException e) {
+                        Main.warn(e);
                     }
                 }
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 10616)
@@ -1374,10 +1374,5 @@
      */
     public static Executor newDirectExecutor() {
-        return new Executor() {
-            @Override
-            public void execute(Runnable command) {
-                command.run();
-            }
-        };
+        return command -> command.run();
     }
 
@@ -1620,12 +1615,9 @@
     public static void setObjectsAccessible(final AccessibleObject ... objects) {
         if (objects != null && objects.length > 0) {
-            AccessController.doPrivileged(new PrivilegedAction<Object>() {
-                @Override
-                public Object run() {
-                    for (AccessibleObject o : objects) {
-                        o.setAccessible(true);
-                    }
-                    return null;
+            AccessController.doPrivileged((PrivilegedAction<Object>) () -> {
+                for (AccessibleObject o : objects) {
+                    o.setAccessible(true);
                 }
+                return null;
             });
         }
Index: trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportSender.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportSender.java	(revision 10615)
+++ trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportSender.java	(revision 10616)
@@ -132,17 +132,14 @@
     private void failed(String string) {
         errorMessage = string;
-        SwingUtilities.invokeLater(new Runnable() {
-            @Override
-            public void run() {
-                JPanel errorPanel = new JPanel(new GridBagLayout());
-                errorPanel.add(new JMultilineLabel(
-                        tr("Opening the bug report failed. Please report manually using this website:")),
-                        GBC.eol().fill(GridBagConstraints.HORIZONTAL));
-                errorPanel.add(new UrlLabel(Main.getJOSMWebsite() + "/newticket", 2), GBC.eop().insets(8, 0, 0, 0));
-                errorPanel.add(new DebugTextDisplay(statusText));
+        SwingUtilities.invokeLater(() -> {
+            JPanel errorPanel = new JPanel(new GridBagLayout());
+            errorPanel.add(new JMultilineLabel(
+                    tr("Opening the bug report failed. Please report manually using this website:")),
+                    GBC.eol().fill(GridBagConstraints.HORIZONTAL));
+            errorPanel.add(new UrlLabel(Main.getJOSMWebsite() + "/newticket", 2), GBC.eop().insets(8, 0, 0, 0));
+            errorPanel.add(new DebugTextDisplay(statusText));
 
-                JOptionPane.showMessageDialog(Main.parent, errorPanel, tr("You have encountered a bug in JOSM"),
-                        JOptionPane.ERROR_MESSAGE);
-            }
+            JOptionPane.showMessageDialog(Main.parent, errorPanel, tr("You have encountered a bug in JOSM"),
+                    JOptionPane.ERROR_MESSAGE);
         });
     }
