Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/ChangesetContentDownloadTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/ChangesetContentDownloadTask.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/ChangesetContentDownloadTask.java	(revision 13849)
@@ -78,9 +78,8 @@
                 setCanceled(true);
                 Logging.trace(e);
-                return;
             } catch (OsmTransferException e) {
-                if (isCanceled())
-                    return;
-                rememberLastException(e);
+                if (!isCanceled()) {
+                    rememberLastException(e);
+                }
             }
         }
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 13849)
@@ -120,5 +120,4 @@
                         JOptionPane.ERROR_MESSAGE));
             }
-            return;
         }
     }
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 13849)
@@ -275,5 +275,5 @@
         }
 
-        mv.setNewCursor(getCursor(c), this);
+        mv.setNewCursor(getCursor(c.orElse(null)), this);
 
         // return early if there can't be any highlights
@@ -296,8 +296,8 @@
      * features. The only exception is the "move" cursor when actually dragging
      * primitives.
-     * @param nearbyStuff  primitives near the cursor
+     * @param nearbyStuff primitives near the cursor
      * @return the cursor that should be displayed
      */
-    private Cursor getCursor(Optional<OsmPrimitive> nearbyStuff) {
+    private Cursor getCursor(OsmPrimitive nearbyStuff) {
         String c = "rect";
         switch(mode) {
@@ -307,5 +307,5 @@
                 break;
             }
-            final OsmPrimitive osm = nearbyStuff.orElse(null);
+            final OsmPrimitive osm = nearbyStuff;
 
             if (dragInProgress()) {
@@ -516,5 +516,5 @@
                 needsRepaint = true;
             }
-            mv.setNewCursor(getCursor(Optional.ofNullable(p)), this);
+            mv.setNewCursor(getCursor(p), this);
             // also update the stored mouse event, so we can display the correct cursor
             // when dragging a node onto another one and then press CTRL to merge
Index: /trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 13849)
@@ -406,5 +406,5 @@
                 continue;
             Utils.instanceOfAndCast(e.getValue(), ListSetting.class)
-                    .map(d -> d.getValue())
+                    .map(ListSetting::getValue)
                     .map(lst -> ColorInfo.fromPref(lst, false))
                     .ifPresent(info -> all.put(e.getKey(), info));
@@ -414,5 +414,5 @@
                 continue;
             Utils.instanceOfAndCast(e.getValue(), ListSetting.class)
-                    .map(d -> d.getValue())
+                    .map(ListSetting::getValue)
                     .map(lst -> ColorInfo.fromPref(lst, true))
                     .ifPresent(infoDef -> {
Index: /trunk/src/org/openstreetmap/josm/data/coor/conversion/package-info.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/coor/conversion/package-info.java	(revision 13849)
+++ /trunk/src/org/openstreetmap/josm/data/coor/conversion/package-info.java	(revision 13849)
@@ -0,0 +1,7 @@
+// License: GPL. For details, see LICENSE file.
+
+/**
+ * Provides the classes for geographic {@link org.openstreetmap.josm.data.coor.Coordinate coordinates}
+ * conversion.
+ */
+package org.openstreetmap.josm.data.coor.conversion;
Index: /trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java	(revision 13849)
@@ -33,7 +33,7 @@
     public static final ProjectionCLI INSTANCE = new ProjectionCLI();
 
-    private boolean argInverse = false;         // NOPMD
-    private boolean argSwitchInput = false;     // NOPMD
-    private boolean argSwitchOutput = false;    // NOPMD
+    private boolean argInverse;
+    private boolean argSwitchInput;
+    private boolean argSwitchOutput;
 
     @Override
@@ -77,5 +77,5 @@
             if (arg.isEmpty()) throw new IllegalArgumentException("non-empty argument expected");
             if (arg.startsWith("+")) {
-                if (arg.equals("+to")) {
+                if ("+to".equals(arg)) {
                     toTokenSeen = true;
                 } else {
@@ -142,5 +142,5 @@
         }
 
-        if (files.isEmpty() || files.get(0).equals("-")) {
+        if (files.isEmpty() || "-".equals(files.get(0))) {
             processInput(fromProj, toProj, new BufferedReader(new InputStreamReader(System.in, Charset.defaultCharset())));
         } else {
@@ -174,5 +174,5 @@
     }
 
-    private CustomProjection createProjection(String params) throws ProjectionConfigurationException {
+    private static CustomProjection createProjection(String params) throws ProjectionConfigurationException {
         CustomProjection proj = new CustomProjection();
         proj.update(params);
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java	(revision 13849)
@@ -37,13 +37,11 @@
 
         String natural = w.get("natural");
-        if (natural == null)
+        if (natural == null) {
             return;
-        else if ("coastline".equals(natural) && Geometry.isClockwise(w)) {
+        } else if ("coastline".equals(natural) && Geometry.isClockwise(w)) {
             reportError(w, tr("Reversed coastline: land not on left side"), WRONGLY_ORDERED_COAST);
         } else if ("land".equals(natural) && Geometry.isClockwise(w)) {
             reportError(w, tr("Reversed land: land not on left side"), WRONGLY_ORDERED_LAND);
-        } else
-            return;
-
+        }
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java	(revision 13849)
@@ -194,7 +194,5 @@
         if (ex != null) {
             // Users should be able to submit a bug report for an invocation target exception
-            //
             BugReportExceptionHandler.handleException(ex);
-            return;
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterRule.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterRule.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterRule.java	(revision 13849)
@@ -5,4 +5,5 @@
 import java.util.Objects;
 import java.util.function.Function;
+import java.util.function.UnaryOperator;
 
 /**
@@ -19,5 +20,5 @@
     private final int minZoomLevel;
 
-    private Function<String, String> valueFormatter = s -> s;
+    private UnaryOperator<String> valueFormatter = s -> s;
 
     private Comparator<String> valueComparator = Comparator.comparingInt(s -> Integer.parseInt(valueFormatter.apply(s)));
@@ -63,5 +64,5 @@
      * @throws NullPointerException if {@code valueFormatter} is null
      */
-    public AutoFilterRule setValueFormatter(Function<String, String> valueFormatter) {
+    public AutoFilterRule setValueFormatter(UnaryOperator<String> valueFormatter) {
         this.valueFormatter = Objects.requireNonNull(valueFormatter);
         return this;
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 13849)
@@ -604,9 +604,9 @@
                 AbstractProperty<Color> prop = layer.getColorProperty();
                 Color c = prop == null ? null : prop.get();
-                if (c == null || !model.getLayers().stream()
+                if (c == null || model.getLayers().stream()
                         .map(Layer::getColorProperty)
                         .filter(Objects::nonNull)
                         .map(AbstractProperty::get)
-                        .anyMatch(oc -> oc != null && !oc.equals(c))) {
+                        .noneMatch(oc -> oc != null && !oc.equals(c))) {
                     /* not more than one color, don't use coloring */
                     label.setForeground(UIManager.getColor(isSelected ? "Table.selectionForeground" : "Table.foreground"));
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/DateValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/DateValidator.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/DateValidator.java	(revision 13849)
@@ -78,5 +78,4 @@
             String msg = "<html>The current value isn't a valid date.<br>" + getStandardTooltipText()+ "</html>";
             feedbackInvalid(msg);
-            return;
         } else {
             String msg = "<html>" + getStandardTooltipText() + "</html>";
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/TimeValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/TimeValidator.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/TimeValidator.java	(revision 13849)
@@ -80,5 +80,4 @@
             String msg = "<html>The current value isn't a valid time.<br>" + getStandardTooltipText() + "</html>";
             feedbackInvalid(msg);
-            return;
         } else {
             String msg = "<html>" + getStandardTooltipText() + "</html>";
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityAction.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityAction.java	(revision 13849)
@@ -300,5 +300,5 @@
             Collection<? extends Layer> usedLayers = filterLayers(layers);
             setVisible(!usedLayers.isEmpty());
-            if (!usedLayers.stream().anyMatch(Layer::isVisible)) {
+            if (usedLayers.stream().noneMatch(Layer::isVisible)) {
                 slider.setEnabled(false);
             } else {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/AbstractCopyAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/AbstractCopyAction.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/AbstractCopyAction.java	(revision 13849)
@@ -7,5 +7,5 @@
 import java.util.Set;
 import java.util.TreeSet;
-import java.util.function.Function;
+import java.util.function.IntFunction;
 import java.util.function.Supplier;
 
@@ -24,5 +24,5 @@
 
     private final JTable tagTable;
-    private final Function<Integer, String> keySupplier;
+    private final IntFunction<String> keySupplier;
     private final Supplier<Collection<? extends Tagged>> objectSupplier;
 
@@ -33,5 +33,5 @@
      * @param objectSupplier a supplier which returns the selected tagged object(s)
      */
-    public AbstractCopyAction(JTable tagTable, Function<Integer, String> keySupplier, Supplier<Collection<? extends Tagged>> objectSupplier) {
+    public AbstractCopyAction(JTable tagTable, IntFunction<String> keySupplier, Supplier<Collection<? extends Tagged>> objectSupplier) {
         this.tagTable = Objects.requireNonNull(tagTable);
         this.keySupplier = Objects.requireNonNull(keySupplier);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/CopyAllKeyValueAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/CopyAllKeyValueAction.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/CopyAllKeyValueAction.java	(revision 13849)
@@ -9,5 +9,5 @@
 import java.util.List;
 import java.util.Map.Entry;
-import java.util.function.Function;
+import java.util.function.IntFunction;
 import java.util.function.Supplier;
 
@@ -31,5 +31,5 @@
      * @param objectSp a supplier which returns the selected tagged object(s)
      */
-    public CopyAllKeyValueAction(JTable tagTable, Function<Integer, String> keyFn, Supplier<Collection<? extends Tagged>> objectSp) {
+    public CopyAllKeyValueAction(JTable tagTable, IntFunction<String> keyFn, Supplier<Collection<? extends Tagged>> objectSp) {
         super(tagTable, keyFn, objectSp);
         putValue(NAME, tr("Copy all Keys/Values"));
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/CopyKeyValueAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/CopyKeyValueAction.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/CopyKeyValueAction.java	(revision 13849)
@@ -6,5 +6,5 @@
 import java.util.Collection;
 import java.util.Collections;
-import java.util.function.Function;
+import java.util.function.IntFunction;
 import java.util.function.Supplier;
 
@@ -26,5 +26,5 @@
      * @param objectSp a supplier which returns the selected tagged object(s)
      */
-    public CopyKeyValueAction(JTable tagTable, Function<Integer, String> keyFn, Supplier<Collection<? extends Tagged>> objectSp) {
+    public CopyKeyValueAction(JTable tagTable, IntFunction<String> keyFn, Supplier<Collection<? extends Tagged>> objectSp) {
         super(tagTable, keyFn, objectSp);
         putValue(NAME, tr("Copy selected Key(s)/Value(s)"));
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/CopyValueAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/CopyValueAction.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/CopyValueAction.java	(revision 13849)
@@ -6,5 +6,5 @@
 import java.util.Collection;
 import java.util.Collections;
-import java.util.function.Function;
+import java.util.function.IntFunction;
 import java.util.function.Supplier;
 
@@ -25,5 +25,5 @@
      * @param objectSp a supplier which returns the selected tagged object(s)
      */
-    public CopyValueAction(JTable tagTable, Function<Integer, String> keyFn, Supplier<Collection<? extends Tagged>> objectSp) {
+    public CopyValueAction(JTable tagTable, IntFunction<String> keyFn, Supplier<Collection<? extends Tagged>> objectSp) {
         super(tagTable, keyFn, objectSp);
         putValue(NAME, tr("Copy Value"));
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/HelpAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/HelpAction.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/HelpAction.java	(revision 13849)
@@ -14,5 +14,5 @@
 import java.util.Map;
 import java.util.Objects;
-import java.util.function.Function;
+import java.util.function.IntFunction;
 
 import javax.swing.AbstractAction;
@@ -36,9 +36,9 @@
 public class HelpAction extends AbstractAction {
     private final JTable tagTable;
-    private final Function<Integer, String> tagKeySupplier;
-    private final Function<Integer, Map<String, Integer>> tagValuesSupplier;
+    private final IntFunction<String> tagKeySupplier;
+    private final IntFunction<Map<String, Integer>> tagValuesSupplier;
 
     private final JTable membershipTable;
-    private final Function<Integer, Relation> memberValueSupplier;
+    private final IntFunction<Relation> memberValueSupplier;
 
     /**
@@ -50,6 +50,6 @@
      * @param memberValueSupplier Finds the parent relation from given row of membership table. Can be null
      */
-    public HelpAction(JTable tagTable, Function<Integer, String> tagKeySupplier, Function<Integer, Map<String, Integer>> tagValuesSupplier,
-            JTable membershipTable, Function<Integer, Relation> memberValueSupplier) {
+    public HelpAction(JTable tagTable, IntFunction<String> tagKeySupplier, IntFunction<Map<String, Integer>> tagValuesSupplier,
+            JTable membershipTable, IntFunction<Relation> memberValueSupplier) {
         this.tagTable = Objects.requireNonNull(tagTable);
         this.tagKeySupplier = Objects.requireNonNull(tagKeySupplier);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TaginfoAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TaginfoAction.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TaginfoAction.java	(revision 13849)
@@ -7,5 +7,5 @@
 import java.util.Map;
 import java.util.Objects;
-import java.util.function.Function;
+import java.util.function.IntFunction;
 
 import javax.swing.JTable;
@@ -26,9 +26,9 @@
 
     private final JTable tagTable;
-    private final Function<Integer, String> tagKeySupplier;
-    private final Function<Integer, Map<String, Integer>> tagValuesSupplier;
+    private final IntFunction<String> tagKeySupplier;
+    private final IntFunction<Map<String, Integer>> tagValuesSupplier;
 
     private final JTable membershipTable;
-    private final Function<Integer, Relation> memberValueSupplier;
+    private final IntFunction<Relation> memberValueSupplier;
 
     /**
@@ -40,6 +40,6 @@
      * @param memberValueSupplier Finds the parent relation from given row of membership table. Can be null
      */
-    public TaginfoAction(JTable tagTable, Function<Integer, String> tagKeySupplier, Function<Integer, Map<String, Integer>> tagValuesSupplier,
-            JTable membershipTable, Function<Integer, Relation> memberValueSupplier) {
+    public TaginfoAction(JTable tagTable, IntFunction<String> tagKeySupplier, IntFunction<Map<String, Integer>> tagValuesSupplier,
+            JTable membershipTable, IntFunction<Relation> memberValueSupplier) {
         super(tr("Go to Taginfo"), "dialogs/taginfo", tr("Launch browser with Taginfo statistics for selected object"), null, false);
         this.tagTable = Objects.requireNonNull(tagTable);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddFromSelectionAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddFromSelectionAction.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddFromSelectionAction.java	(revision 13849)
@@ -52,5 +52,4 @@
                     ret.add(primitive);
                 }
-                continue;
             } else {
                 ret.add(primitive);
Index: /trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java	(revision 13849)
@@ -174,5 +174,4 @@
         } catch (OsmTransferException e) {
             lastException = e;
-            return;
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/history/TagInfoViewer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/history/TagInfoViewer.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/history/TagInfoViewer.java	(revision 13849)
@@ -8,5 +8,5 @@
 import java.util.HashMap;
 import java.util.Map;
-import java.util.function.Function;
+import java.util.function.IntFunction;
 import java.util.function.Supplier;
 
@@ -80,6 +80,6 @@
         JPopupMenu tagMenu = new JPopupMenu();
 
-        Function<Integer, String> tagKeyFn = x -> (String) table.getValueAt(x, 0);
-        Function<Integer, Map<String, Integer>> tagValuesFn = x -> {
+        IntFunction<String> tagKeyFn = x -> (String) table.getValueAt(x, 0);
+        IntFunction<Map<String, Integer>> tagValuesFn = x -> {
             Map<String, Integer> map = new HashMap<>();
             String key = tagTableModel.getValue((String) table.getValueAt(x, 0));
Index: /trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 13849)
@@ -402,9 +402,7 @@
                 if (currentTF.getText().trim().isEmpty()) {
                     currentTF.selectAll();
-                    return;
                 } else if (nextTF.getText().trim().isEmpty()) {
                     nextTF.requestFocusInWindow();
                     nextTF.selectAll();
-                    return;
                 } else {
                     owner.new OKAction().actionPerformed(null);
Index: /trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 13849)
@@ -148,7 +148,5 @@
     public Object getInfoComponent() {
         StringBuilder info = new StringBuilder(128)
-                .append("<html><head><style>")
-                .append("td { padding: 4px 16px; }")
-                .append("</style></head><body>");
+                .append("<html><head><style>td { padding: 4px 16px; }</style></head><body>");
 
         if (data.attr.containsKey("name")) {
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/RenderingCLI.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/RenderingCLI.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/RenderingCLI.java	(revision 13849)
@@ -15,5 +15,5 @@
 import java.util.Locale;
 import java.util.Optional;
-import java.util.function.Supplier;
+import java.util.function.DoubleSupplier;
 import java.util.logging.Level;
 
@@ -238,5 +238,5 @@
                 break;
             case 'b':
-                if (!getopt.getOptarg().equals("auto")) {
+                if (!"auto".equals(getopt.getOptarg())) {
                     try {
                         argBounds = new Bounds(getopt.getOptarg(), ",", Bounds.ParseMethod.LEFT_BOTTOM_RIGHT_TOP, false);
@@ -459,6 +459,6 @@
                 EastNorth projAnchor = proj.latlon2eastNorth(argAnchor);
 
-                Double enPerMeter = null;
-                Supplier<Double> getEnPerMeter = () -> {
+                double enPerMeter = Double.NaN;
+                DoubleSupplier getEnPerMeter = () -> {
                     double shiftMeter = 10;
                     EastNorth projAnchorShifted = projAnchor.add(
@@ -470,11 +470,11 @@
                 if (scale == null) {
                     if (argScale != null) {
-                        enPerMeter = getEnPerMeter.get();
+                        enPerMeter = getEnPerMeter.getAsDouble();
                         scale = argScale * enPerMeter / PIXEL_PER_METER;
                     } else if (argWidthM != null && argWidthPx != null) {
-                        enPerMeter = getEnPerMeter.get();
+                        enPerMeter = getEnPerMeter.getAsDouble();
                         scale = argWidthM / argWidthPx * enPerMeter;
                     } else if (argHeightM != null && argHeightPx != null) {
-                        enPerMeter = getEnPerMeter.get();
+                        enPerMeter = getEnPerMeter.getAsDouble();
                         scale = argHeightM / argHeightPx * enPerMeter;
                     } else {
@@ -486,5 +486,7 @@
                 double widthEn;
                 if (argWidthM != null) {
-                    enPerMeter = Optional.ofNullable(enPerMeter).orElseGet(getEnPerMeter);
+                    if (enPerMeter == Double.NaN) {
+                        enPerMeter = getEnPerMeter.getAsDouble();
+                    }
                     widthEn = argWidthM * enPerMeter;
                 } else if (argWidthPx != null) {
@@ -497,5 +499,7 @@
                 double heightEn;
                 if (argHeightM != null) {
-                    enPerMeter = Optional.ofNullable(enPerMeter).orElseGet(getEnPerMeter);
+                    if (enPerMeter == Double.NaN) {
+                        enPerMeter = getEnPerMeter.getAsDouble();
+                    }
                     heightEn = argHeightM * enPerMeter;
                 } else if (argHeightPx != null) {
Index: /trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java	(revision 13849)
@@ -88,5 +88,4 @@
         } catch (OsmTransferCanceledException e) {
             Logging.trace(e);
-            return;
         } catch (final OsmOAuthAuthorizationException e) {
             Logging.error(e);
Index: /trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java	(revision 13849)
@@ -82,5 +82,4 @@
         } catch (OsmTransferCanceledException e) {
             Logging.trace(e);
-            return;
         } catch (final OsmOAuthAuthorizationException e) {
             Logging.error(e);
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 13849)
@@ -211,9 +211,4 @@
 
         @Override
-        public boolean isCellEditable(int rowIndex, int columnIndex) {
-            return false;
-        }
-
-        @Override
         public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
             if (columnIndex == 1 && aValue instanceof Color) {
@@ -386,6 +381,6 @@
     }
 
-    private boolean isRemoveColor(ColorEntry ce) {
-        return ce.info.getCategory().equals(NamedColorProperty.COLOR_CATEGORY_LAYER);
+    private static boolean isRemoveColor(ColorEntry ce) {
+        return NamedColorProperty.COLOR_CATEGORY_LAYER.equals(ce.info.getCategory());
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java	(revision 13849)
@@ -202,5 +202,4 @@
             Logging.error(e);
             alertConnectionFailed();
-            return;
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetNameTemplateList.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetNameTemplateList.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetNameTemplateList.java	(revision 13849)
@@ -60,7 +60,4 @@
                         if (t.nameTemplateFilter.match(primitive))
                             return t;
-                        else {
-                            continue;
-                        }
                     } else if (t.matches(type, primitive.getKeys(), false)) {
                         return t;
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java	(revision 13849)
@@ -104,7 +104,5 @@
                 // convert tokens to int skipping v-words (version v2 etc)
                 c = s.charAt(0);
-                if (c == 'v') {
-                    continue;
-                } else {
+                if (c != 'v') {
                     try {
                         ids.addAll(SimplePrimitiveId.multipleFromString(s));
Index: /trunk/src/org/openstreetmap/josm/io/OsmConnection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmConnection.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/io/OsmConnection.java	(revision 13849)
@@ -120,5 +120,4 @@
             if (response.isCanceled()) {
                 cancel = true;
-                return;
             } else {
                 String username = response.getUsername() == null ? "" : response.getUsername();
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginClassLoader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginClassLoader.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginClassLoader.java	(revision 13849)
@@ -47,5 +47,5 @@
         // Add dependency only if not already present (directly or transitively through another one)
         boolean result = !dependencies.contains(Objects.requireNonNull(dependency, "dependency"))
-                && !dependencies.stream().anyMatch(pcl -> pcl.dependencies.contains(dependency))
+                && dependencies.stream().noneMatch(pcl -> pcl.dependencies.contains(dependency))
                 && dependencies.add(dependency);
         if (result) {
Index: /trunk/src/org/openstreetmap/josm/tools/HiDPISupport.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/HiDPISupport.java	(revision 13848)
+++ /trunk/src/org/openstreetmap/josm/tools/HiDPISupport.java	(revision 13849)
@@ -192,5 +192,5 @@
         }
         List<List<Image>> allVars = imgs.stream().map(HiDPISupport::getResolutionVariants).collect(Collectors.toList());
-        int maxVariants = allVars.stream().mapToInt(lst -> lst.size()).max().getAsInt();
+        int maxVariants = allVars.stream().mapToInt(List<Image>::size).max().getAsInt();
         if (maxVariants == 1)
             return processor.apply(imgs);
