Index: /trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/Main.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/Main.java	(revision 10601)
@@ -596,10 +596,5 @@
     public Main() {
         main = this;
-        mainPanel.addMapFrameListener(new MapFrameListener() {
-            @Override
-            public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
-                redoUndoListener.commandChanged(0, 0);
-            }
-        });
+        mainPanel.addMapFrameListener((o, n) -> redoUndoListener.commandChanged(0, 0));
     }
 
@@ -697,14 +692,7 @@
 
         // hooks for the jmapviewer component
-        FeatureAdapter.registerBrowserAdapter(new FeatureAdapter.BrowserAdapter() {
-            @Override
-            public void openLink(String url) {
-                OpenBrowser.displayUrl(url);
-            }
-        });
+        FeatureAdapter.registerBrowserAdapter(OpenBrowser::displayUrl);
         FeatureAdapter.registerTranslationAdapter(I18n.getTranslationAdapter());
-        FeatureAdapter.registerLoggingAdapter(new FeatureAdapter.LoggingAdapter() {
-            @Override
-            public Logger getLogger(String name) {
+        FeatureAdapter.registerLoggingAdapter(name -> {
                 Logger logger = Logger.getAnonymousLogger();
                 logger.setUseParentHandlers(false);
@@ -740,6 +728,5 @@
                 }
                 return logger;
-            }
-        });
+            });
 
         new InitializationTask(tr("Updating user interface")) {
@@ -991,11 +978,8 @@
     public static final JPanel panel = mainPanel;
 
-    private final CommandQueueListener redoUndoListener = new CommandQueueListener() {
-        @Override
-        public void commandChanged(final int queueSize, final int redoSize) {
+    private final CommandQueueListener redoUndoListener = (queueSize, redoSize) -> {
             menu.undo.setEnabled(queueSize > 0);
             menu.redo.setEnabled(redoSize > 0);
-        }
-    };
+        };
 
     /**
Index: /trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 10601)
@@ -32,5 +32,4 @@
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
-import org.openstreetmap.josm.tools.ImageProvider.ImageResourceCallback;
 import org.openstreetmap.josm.tools.ImageResource;
 
@@ -57,17 +56,9 @@
         String icon = info.getIcon();
         if (icon != null) {
-            new ImageProvider(icon).setOptional(true).getInBackground(new ImageResourceCallback() {
-                        @Override
-                        public void finished(final ImageResource result) {
-                            if (result != null) {
-                                GuiHelper.runInEDT(new Runnable() {
-                                    @Override
-                                    public void run() {
-                                        result.attachImageIcon(AddImageryLayerAction.this);
-                                    }
-                                });
-                            }
-                        }
-                    });
+            new ImageProvider(icon).setOptional(true).getInBackground((ImageResource result) -> {
+                if (result != null) {
+                    GuiHelper.runInEDT(() -> result.attachImageIcon(AddImageryLayerAction.this));
+                }
+            });
         }
     }
Index: /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 10601)
@@ -17,7 +17,5 @@
 
 import javax.swing.JOptionPane;
-import javax.swing.event.ListSelectionEvent;
 import javax.swing.event.ListSelectionListener;
-import javax.swing.event.TreeSelectionEvent;
 import javax.swing.event.TreeSelectionListener;
 
@@ -410,17 +408,7 @@
         MapFrameAdapter() {
             if ("conflict".equals(mode)) {
-                conflictSelectionListener = new ListSelectionListener() {
-                    @Override
-                    public void valueChanged(ListSelectionEvent e) {
-                        updateEnabledState();
-                    }
-                };
+                conflictSelectionListener = e -> updateEnabledState();
             } else if ("problem".equals(mode)) {
-                validatorSelectionListener = new TreeSelectionListener() {
-                    @Override
-                    public void valueChanged(TreeSelectionEvent e) {
-                        updateEnabledState();
-                    }
-                };
+                validatorSelectionListener = e -> updateEnabledState();
             }
         }
Index: /trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java	(revision 10601)
@@ -97,8 +97,5 @@
         @Override
         protected void finish() {
-            SwingUtilities.invokeLater(
-                    new Runnable() {
-                        @Override
-                        public void run() {
+            SwingUtilities.invokeLater(() -> {
                             if (lastException != null) {
                                 ExceptionDialogUtil.explainException(lastException);
@@ -108,7 +105,5 @@
                                 onPostDownloadOpenChangesets();
                             }
-                        }
-                    }
-            );
+                        });
         }
 
Index: /trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 10601)
@@ -233,11 +233,5 @@
         Main.main.undoRedo.add(combineResult.b);
         if (selectedWay != null) {
-            Runnable guiTask = new Runnable() {
-                @Override
-                public void run() {
-                    ds.setSelected(selectedWay);
-                }
-            };
-            GuiHelper.runInEDT(guiTask);
+            GuiHelper.runInEDT(() -> ds.setSelected(selectedWay));
         }
     }
Index: /trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java	(revision 10601)
@@ -104,7 +104,5 @@
 
             // to avoid EDT violations
-            SwingUtilities.invokeLater(new Runnable() {
-                @Override
-                public void run() {
+            SwingUtilities.invokeLater(() -> {
                     Main.main.undoRedo.add(command);
 
@@ -113,12 +111,9 @@
                     // (Yes, we are already in event dispatch thread. But DatasetEventManager
                     // uses 'SwingUtilities.invokeLater' to fire events so we have to do the same.)
-                    SwingUtilities.invokeLater(new Runnable() {
-                        @Override
-                        public void run() {
+                    SwingUtilities.invokeLater(() -> {
                             Main.map.relationListDialog.selectRelation(relation);
                             if (Main.pref.getBoolean("multipoly.show-relation-editor", false)) {
                                 //Open relation edit window, if set up in preferences
                                 RelationEditor editor = RelationEditor.getEditor(Main.getLayerManager().getEditLayer(), relation, null);
-
                                 editor.setModal(true);
                                 editor.setVisible(true);
@@ -126,7 +121,5 @@
                                 Main.getLayerManager().getEditLayer().setRecentRelation(relation);
                             }
-                        }
                     });
-                }
             });
         }
@@ -296,12 +289,8 @@
         if (error != null) {
             if (showNotif) {
-                GuiHelper.runInEDT(new Runnable() {
-                    @Override
-                    public void run() {
+                GuiHelper.runInEDT(
                         new Notification(error)
                         .setIcon(JOptionPane.INFORMATION_MESSAGE)
-                        .show();
-                    }
-                });
+                        ::show);
             }
             return null;
Index: /trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java	(revision 10601)
@@ -53,17 +53,9 @@
                 new DownloadPrimitivesWithReferrersTask(newLayer, ids, downloadReferrers, full, null, null);
         Main.worker.submit(task);
-        Main.worker.submit(new Runnable() {
-            @Override
-            public void run() {
+        Main.worker.submit(() -> {
                 final List<PrimitiveId> downloaded = task.getDownloadedId();
                 if (downloaded != null) {
-                    GuiHelper.runInEDT(new Runnable() {
-                        @Override
-                        public void run() {
-                            Main.getLayerManager().getEditDataSet().setSelected(downloaded);
-                        }
-                    });
+                    GuiHelper.runInEDT(() -> Main.getLayerManager().getEditDataSet().setSelected(downloaded));
                 }
-            }
         });
     }
Index: /trunk/src/org/openstreetmap/josm/actions/JosmAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 10601)
@@ -293,8 +293,5 @@
 
     protected static void waitFuture(final Future<?> future, final PleaseWaitProgressMonitor monitor) {
-        Main.worker.submit(
-                new Runnable() {
-                    @Override
-                    public void run() {
+        Main.worker.submit(() -> {
                         try {
                             future.get();
@@ -304,7 +301,5 @@
                         }
                         monitor.close();
-                    }
-                }
-        );
+                    });
     }
 
Index: /trunk/src/org/openstreetmap/josm/actions/JumpToAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/JumpToAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/JumpToAction.java	(revision 10601)
@@ -19,6 +19,4 @@
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.LatLon;
-import org.openstreetmap.josm.gui.MapFrame;
-import org.openstreetmap.josm.gui.MapFrameListener;
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.gui.dialogs.LatLonDialog;
@@ -223,10 +221,5 @@
         super.installAdapters();
         // make this action listen to mapframe change events
-        Main.addMapFrameListener(new MapFrameListener() {
-            @Override
-            public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
-                updateEnabledState();
-            }
-        });
+        Main.addMapFrameListener((o, n) -> updateEnabledState());
     }
 }
Index: /trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java	(revision 10601)
@@ -41,7 +41,5 @@
         if (targetLayer == null)
             return;
-        Main.worker.submit(new Runnable() {
-            @Override
-            public void run() {
+        Main.worker.submit(() -> {
                 boolean layerMerged = false;
                 for (final Layer sourceLayer: sourceLayers) {
@@ -54,10 +52,5 @@
                         }
                         targetLayer.mergeFrom(sourceLayer);
-                        GuiHelper.runInEDTAndWait(new Runnable() {
-                            @Override
-                            public void run() {
-                                Main.getLayerManager().removeLayer(sourceLayer);
-                            }
-                        });
+                        GuiHelper.runInEDTAndWait(() -> Main.getLayerManager().removeLayer(sourceLayer));
                         layerMerged = true;
                     }
@@ -66,5 +59,4 @@
                     Main.getLayerManager().setActiveLayer(targetLayer);
                 }
-            }
         });
     }
@@ -100,7 +92,5 @@
     @Override
     protected void updateEnabledState() {
-        GuiHelper.runInEDT(new Runnable() {
-            @Override
-            public void run() {
+        GuiHelper.runInEDT(() -> {
                 final Layer sourceLayer = getSourceLayer();
                 if (sourceLayer == null) {
@@ -110,5 +100,4 @@
                     setEnabled(!possibleMergeTargets.isEmpty());
                 }
-            }
         });
     }
Index: /trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 10601)
@@ -10,5 +10,4 @@
 import java.io.BufferedReader;
 import java.io.File;
-import java.io.FilenameFilter;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
@@ -127,11 +126,6 @@
                 } else if (file.getParentFile() != null) {
                     // try to guess an extension using the specified fileFilter
-                    final File[] matchingFiles = file.getParentFile().listFiles(new FilenameFilter() {
-                        @Override
-                        public boolean accept(File dir, String name) {
-                            return name.startsWith(file.getName())
-                                    && fileFilter != null && fileFilter.accept(new File(dir, name));
-                        }
-                    });
+                    final File[] matchingFiles = file.getParentFile().listFiles((dir, name) ->
+                            name.startsWith(file.getName()) && fileFilter != null && fileFilter.accept(new File(dir, name)));
                     if (matchingFiles != null && matchingFiles.length == 1) {
                         // use the unique match as filename
@@ -260,12 +254,7 @@
                     if (!chosenImporter.acceptFile(f)) {
                         if (f.isDirectory()) {
-                            SwingUtilities.invokeLater(new Runnable() {
-                                @Override
-                                public void run() {
-                                    JOptionPane.showMessageDialog(Main.parent, tr(
-                                            "<html>Cannot open directory ''{0}''.<br>Please select a file.</html>",
-                                            f.getAbsolutePath()), tr("Open file"), JOptionPane.ERROR_MESSAGE);
-                                }
-                            });
+                            SwingUtilities.invokeLater(() -> JOptionPane.showMessageDialog(Main.parent, tr(
+                                    "<html>Cannot open directory ''{0}''.<br>Please select a file.</html>",
+                                    f.getAbsolutePath()), tr("Open file"), JOptionPane.ERROR_MESSAGE));
                             // TODO when changing to Java 6: Don't cancel the task here but use different modality. (Currently 2 dialogs
                             // would block each other.)
Index: /trunk/src/org/openstreetmap/josm/actions/PurgeAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/PurgeAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/PurgeAction.java	(revision 10601)
@@ -14,5 +14,4 @@
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashSet;
 import java.util.List;
@@ -245,12 +244,9 @@
                             ImageProvider.get("warning-small"), JLabel.LEFT), GBC.eol().fill(GBC.HORIZONTAL));
 
-            Collections.sort(toPurgeAdditionally, new Comparator<OsmPrimitive>() {
-                @Override
-                public int compare(OsmPrimitive o1, OsmPrimitive o2) {
-                    int type = o2.getType().compareTo(o1.getType());
-                    if (type != 0)
-                        return type;
-                    return Long.compare(o1.getUniqueId(), o2.getUniqueId());
-                }
+            Collections.sort(toPurgeAdditionally, (o1, o2) -> {
+                int type = o2.getType().compareTo(o1.getType());
+                if (type != 0)
+                    return type;
+                return Long.compare(o1.getUniqueId(), o2.getUniqueId());
             });
             JList<OsmPrimitive> list = new JList<>(toPurgeAdditionally.toArray(new OsmPrimitive[toPurgeAdditionally.size()]));
Index: /trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java	(revision 10601)
@@ -112,12 +112,9 @@
         @Override
         protected void finish() {
-            SwingUtilities.invokeLater(new Runnable() {
-                @Override
-                public void run() {
-                    if (canceled)
-                        return;
-                    addLayers();
-                    runPostLoadTasks();
-                }
+            SwingUtilities.invokeLater(() -> {
+                if (canceled)
+                    return;
+                addLayers();
+                runPostLoadTasks();
             });
         }
Index: /trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 10601)
@@ -27,6 +27,4 @@
 import javax.swing.JPanel;
 import javax.swing.ListSelectionModel;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
 
 import org.openstreetmap.josm.Main;
@@ -252,19 +250,16 @@
         private void configureList() {
             list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-            list.addListSelectionListener(new ListSelectionListener() {
-                @Override
-                public void valueChanged(ListSelectionEvent e) {
-                    final Way selected = list.getSelectedValue();
-                    if (Main.isDisplayingMapView() && selected != null && selected.getNodesCount() > 1) {
-                        final Collection<WaySegment> segments = new ArrayList<>(selected.getNodesCount() - 1);
-                        final Iterator<Node> it = selected.getNodes().iterator();
-                        Node previousNode = it.next();
-                        while (it.hasNext()) {
-                            final Node node = it.next();
-                            segments.add(WaySegment.forNodePair(selectedWay, previousNode, node));
-                            previousNode = node;
-                        }
-                        setHighlightedWaySegments(segments);
+            list.addListSelectionListener(e -> {
+                final Way selected = list.getSelectedValue();
+                if (Main.isDisplayingMapView() && selected != null && selected.getNodesCount() > 1) {
+                    final Collection<WaySegment> segments = new ArrayList<>(selected.getNodesCount() - 1);
+                    final Iterator<Node> it = selected.getNodes().iterator();
+                    Node previousNode = it.next();
+                    while (it.hasNext()) {
+                        final Node node = it.next();
+                        segments.add(WaySegment.forNodePair(selectedWay, previousNode, node));
+                        previousNode = node;
                     }
+                    setHighlightedWaySegments(segments);
                 }
             });
Index: /trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 10601)
@@ -43,5 +43,4 @@
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
-import org.openstreetmap.josm.tools.Predicate;
 import org.openstreetmap.josm.tools.Shortcut;
 import org.openstreetmap.josm.tools.UserCancelException;
@@ -251,19 +250,9 @@
 
         private static boolean isTagged(final Iterable<Node> existingNodes) {
-            return Utils.exists(existingNodes, new Predicate<Node>() {
-                @Override
-                public boolean evaluate(final Node selectedNode) {
-                    return selectedNode.hasKeys();
-                }
-            });
+            return Utils.exists(existingNodes, selectedNode -> selectedNode.hasKeys());
         }
 
         private static boolean isUsedInRelations(final Iterable<Node> existingNodes) {
-            return Utils.exists(existingNodes, new Predicate<Node>() {
-                @Override
-                public boolean evaluate(final Node selectedNode) {
-                    return Utils.exists(selectedNode.getReferrers(), OsmPrimitive.relationPredicate);
-                }
-            });
+            return Utils.exists(existingNodes, selectedNode -> Utils.exists(selectedNode.getReferrers(), OsmPrimitive.relationPredicate));
         }
 
Index: /trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 10601)
@@ -289,11 +289,5 @@
                 return;
             }
-            Runnable r = new Runnable() {
-                @Override
-                public void run() {
-                    processPostParentChecker(layer, toUpload);
-                }
-            };
-            SwingUtilities.invokeLater(r);
+            SwingUtilities.invokeLater(() -> processPostParentChecker(layer, toUpload));
         }
 
Index: /trunk/src/org/openstreetmap/josm/actions/ValidateAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ValidateAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/ValidateAction.java	(revision 10601)
@@ -142,11 +142,8 @@
             // update GUI on Swing EDT
             //
-            GuiHelper.runInEDT(new Runnable() {
-                @Override
-                public void run() {
-                    Main.map.validatorDialog.tree.setErrors(errors);
-                    Main.map.validatorDialog.unfurlDialog();
-                    Main.getLayerManager().getEditDataSet().fireSelectionChanged();
-                }
+            GuiHelper.runInEDT(() -> {
+                Main.map.validatorDialog.tree.setErrors(errors);
+                Main.map.validatorDialog.unfurlDialog();
+                Main.getLayerManager().getEditDataSet().fireSelectionChanged();
             });
         }
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractChangesetDownloadTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractChangesetDownloadTask.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractChangesetDownloadTask.java	(revision 10601)
@@ -61,9 +61,5 @@
             // Run on the EDT because UI updates are triggered.
             //
-            Runnable r = new Runnable() {
-                @Override public void run() {
-                    ChangesetCache.getInstance().update(downloadedChangesets);
-                }
-            };
+            Runnable r = () -> ChangesetCache.getInstance().update(downloadedChangesets);
             if (SwingUtilities.isEventDispatchThread()) {
                 r.run();
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java	(revision 10601)
@@ -117,12 +117,5 @@
         DataSetMerger visitor = new DataSetMerger(targetLayer.data, parents);
         visitor.merge();
-        SwingUtilities.invokeLater(
-                new Runnable() {
-                    @Override
-                    public void run() {
-                        targetLayer.onPostDownloadFromServer();
-                    }
-                }
-        );
+        SwingUtilities.invokeLater(targetLayer::onPostDownloadFromServer);
         if (visitor.getConflicts().isEmpty())
             return;
@@ -131,7 +124,7 @@
                 Main.parent,
                 trn("There was {0} conflict during import.",
-                        "There were {0} conflicts during import.",
-                        visitor.getConflicts().size(),
-                        visitor.getConflicts().size()
+                    "There were {0} conflicts during import.",
+                    visitor.getConflicts().size(),
+                    visitor.getConflicts().size()
                 ),
                 trn("Conflict during download", "Conflicts during download", visitor.getConflicts().size()),
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java	(revision 10601)
@@ -33,5 +33,4 @@
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
-import org.openstreetmap.josm.gui.progress.ProgressMonitor.CancelListener;
 import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.tools.ExceptionUtil;
@@ -88,10 +87,7 @@
             }
         }
-        progressMonitor.addCancelListener(new CancelListener() {
-            @Override
-            public void operationCanceled() {
-                for (DownloadTask dt : tasks) {
-                    dt.cancel();
-                }
+        progressMonitor.addCancelListener(() -> {
+            for (DownloadTask dt : tasks) {
+                dt.cancel();
             }
         });
@@ -151,9 +147,5 @@
             }
         }
-        EventQueue.invokeLater(new Runnable() {
-            @Override public void run() {
-                UpdateSelectionAction.updatePrimitives(toSelect);
-            }
-        });
+        EventQueue.invokeLater(() -> UpdateSelectionAction.updatePrimitives(toSelect));
     }
 
@@ -270,15 +262,12 @@
                 }
 
-                GuiHelper.runInEDT(new Runnable() {
-                    @Override
-                    public void run() {
-                        if (items.size() == 1 && tr("No data found in this area.").equals(items.iterator().next())) {
-                            new Notification(items.iterator().next()).setIcon(JOptionPane.WARNING_MESSAGE).show();
-                        } else {
-                            JOptionPane.showMessageDialog(Main.parent, "<html>"
-                                    + tr("The following errors occurred during mass download: {0}",
-                                            Utils.joinAsHtmlUnorderedList(items)) + "</html>",
-                                    tr("Errors during download"), JOptionPane.ERROR_MESSAGE);
-                        }
+                GuiHelper.runInEDT(() -> {
+                    if (items.size() == 1 && tr("No data found in this area.").equals(items.iterator().next())) {
+                        new Notification(items.iterator().next()).setIcon(JOptionPane.WARNING_MESSAGE).show();
+                    } else {
+                        JOptionPane.showMessageDialog(Main.parent, "<html>"
+                                + tr("The following errors occurred during mass download: {0}",
+                                        Utils.joinAsHtmlUnorderedList(items)) + "</html>",
+                                tr("Errors during download"), JOptionPane.ERROR_MESSAGE);
                     }
                 });
@@ -312,9 +301,5 @@
                 }
                 if (!myPrimitives.isEmpty()) {
-                    GuiHelper.runInEDT(new Runnable() {
-                        @Override public void run() {
-                            handlePotentiallyDeletedPrimitives(myPrimitives);
-                        }
-                    });
+                    GuiHelper.runInEDT(() -> handlePotentiallyDeletedPrimitives(myPrimitives));
                 }
             }
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 10601)
@@ -58,18 +58,15 @@
             final Object error = errors.iterator().next();
             if (!GraphicsEnvironment.isHeadless()) {
-                SwingUtilities.invokeLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        if (error instanceof Exception) {
-                            ExceptionDialogUtil.explainException((Exception) error);
-                        } else if (tr("No data found in this area.").equals(error)) {
-                            new Notification(error.toString()).setIcon(JOptionPane.WARNING_MESSAGE).show();
-                        } else {
-                            JOptionPane.showMessageDialog(
-                                    Main.parent,
-                                    error.toString(),
-                                    tr("Error during download"),
-                                    JOptionPane.ERROR_MESSAGE);
-                        }
+                SwingUtilities.invokeLater(() -> {
+                    if (error instanceof Exception) {
+                        ExceptionDialogUtil.explainException((Exception) error);
+                    } else if (tr("No data found in this area.").equals(error)) {
+                        new Notification(error.toString()).setIcon(JOptionPane.WARNING_MESSAGE).show();
+                    } else {
+                        JOptionPane.showMessageDialog(
+                                Main.parent,
+                                error.toString(),
+                                tr("Error during download"),
+                                JOptionPane.ERROR_MESSAGE);
                     }
                 });
@@ -91,14 +88,9 @@
 
             if (!GraphicsEnvironment.isHeadless()) {
-                SwingUtilities.invokeLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        JOptionPane.showMessageDialog(
-                                Main.parent,
-                                "<html>"+Utils.joinAsHtmlUnorderedList(items)+"</html>",
-                                tr("Errors during download"),
-                                JOptionPane.ERROR_MESSAGE);
-                    }
-                });
+                SwingUtilities.invokeLater(() -> JOptionPane.showMessageDialog(
+                        Main.parent,
+                        "<html>"+Utils.joinAsHtmlUnorderedList(items)+"</html>",
+                        tr("Errors during download"),
+                        JOptionPane.ERROR_MESSAGE));
             }
             return;
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 10601)
@@ -9,6 +9,4 @@
 import java.awt.Point;
 import java.awt.Rectangle;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseEvent;
@@ -447,10 +445,5 @@
             useLastMoveCommandIfPossible();
             // Schedule a timer to update status line "initialMoveDelay+1" ms in the future
-            GuiHelper.scheduleTimer(initialMoveDelay+1, new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent evt) {
-                    updateStatusLine();
-                }
-            }, false);
+            GuiHelper.scheduleTimer(initialMoveDelay+1, evt -> updateStatusLine(), false);
             break;
         case SELECT:
@@ -616,10 +609,5 @@
                         // We need to do it like this as otherwise drawAction will see a double
                         // click and switch back to SelectMode
-                        Main.worker.execute(new Runnable() {
-                            @Override
-                            public void run() {
-                                Main.map.selectDrawTool(true);
-                            }
-                        });
+                        Main.worker.execute(() -> Main.map.selectDrawTool(true));
                         return;
                     }
Index: /trunk/src/org/openstreetmap/josm/actions/relation/AddSelectionToRelations.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/relation/AddSelectionToRelations.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/relation/AddSelectionToRelations.java	(revision 10601)
@@ -63,10 +63,5 @@
     @Override
     public void selectionChanged(final Collection<? extends OsmPrimitive> newSelection) {
-        GuiHelper.runInEDT(new Runnable() {
-            @Override
-            public void run() {
-                setEnabled(newSelection != null && !newSelection.isEmpty());
-            }
-        });
+        GuiHelper.runInEDT(() -> setEnabled(newSelection != null && !newSelection.isEmpty()));
     }
 }
Index: /trunk/src/org/openstreetmap/josm/actions/relation/DownloadMembersAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/relation/DownloadMembersAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/relation/DownloadMembersAction.java	(revision 10601)
@@ -10,9 +10,7 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
-import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.gui.dialogs.relation.DownloadRelationTask;
 import org.openstreetmap.josm.io.OnlineResource;
 import org.openstreetmap.josm.tools.ImageProvider;
-import org.openstreetmap.josm.tools.Predicate;
 import org.openstreetmap.josm.tools.Utils;
 
@@ -42,10 +40,5 @@
     public void setPrimitives(Collection<? extends OsmPrimitive> primitives) {
         // selected non-new relations
-        this.relations = Utils.filter(getRelations(primitives), new Predicate<Relation>() {
-            @Override
-            public boolean evaluate(Relation r) {
-                return !r.isNew();
-            }
-        });
+        this.relations = Utils.filter(getRelations(primitives), r -> !r.isNew());
         updateEnabledState();
     }
Index: /trunk/src/org/openstreetmap/josm/actions/relation/DownloadSelectedIncompleteMembersAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/relation/DownloadSelectedIncompleteMembersAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/relation/DownloadSelectedIncompleteMembersAction.java	(revision 10601)
@@ -15,5 +15,4 @@
 import org.openstreetmap.josm.io.OnlineResource;
 import org.openstreetmap.josm.tools.ImageProvider;
-import org.openstreetmap.josm.tools.Predicate;
 import org.openstreetmap.josm.tools.Utils;
 
@@ -43,10 +42,5 @@
         Set<OsmPrimitive> ret = new HashSet<>();
         for (Relation r : rels) {
-            ret.addAll(Utils.filter(r.getIncompleteMembers(), new Predicate<OsmPrimitive>() {
-                @Override
-                public boolean evaluate(OsmPrimitive osm) {
-                    return !osm.isNew();
-                }
-            }));
+            ret.addAll(Utils.filter(r.getIncompleteMembers(), osm -> !osm.isNew()));
         }
         return ret;
@@ -65,10 +59,5 @@
     public void setPrimitives(Collection<? extends OsmPrimitive> primitives) {
         // selected relations with incomplete members
-        this.relations = Utils.filter(getRelations(primitives), new Predicate<Relation>() {
-            @Override
-            public boolean evaluate(Relation r) {
-                return r.hasIncompleteMembers();
-            }
-        });
+        this.relations = Utils.filter(getRelations(primitives), r -> r.hasIncompleteMembers());
         this.incompleteMembers = buildSetOfIncompleteMembers(relations);
         updateEnabledState();
Index: /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 10601)
@@ -651,10 +651,5 @@
         private static SearchTask newSearchTask(SearchSetting setting, final DataSet ds, SearchReceiver resultReceiver) {
             final Collection<OsmPrimitive> selection = new HashSet<>(ds.getAllSelected());
-            return new SearchTask(ds, setting, selection, new Predicate<OsmPrimitive>() {
-                @Override
-                public boolean evaluate(OsmPrimitive o) {
-                    return ds.isSelected(o);
-                }
-            }, resultReceiver);
+            return new SearchTask(ds, setting, selection, ds::isSelected, resultReceiver);
         }
 
Index: /trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java	(revision 10600)
+++ /trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java	(revision 10601)
@@ -46,13 +46,10 @@
         deprecated.add(new FixDataTag("highway", "stile", "barrier", "stile"));
         // CHECKSTYLE.ON: SingleSpaceSeparator
-        deprecated.add(new FixData() {
-            @Override
-            public boolean fixKeys(Map<String, String> keys, OsmPrimitive osm) {
-                if (osm instanceof Relation && "multipolygon".equals(keys.get("type")) && "administrative".equals(keys.get("boundary"))) {
-                    keys.put("type", "boundary");
-                    return true;
-                }
-                return false;
-            }
+        deprecated.add((keys, osm) -> {
+            if (osm instanceof Relation && "multipolygon".equals(keys.get("type")) && "administrative".equals(keys.get("boundary"))) {
+                keys.put("type", "boundary");
+                return true;
+            }
+            return false;
         });
     }
