Index: trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java	(revision 11385)
@@ -49,9 +49,8 @@
                     if (sourceLayer != null && !sourceLayer.equals(targetLayer)) {
                         if (sourceLayer instanceof OsmDataLayer && targetLayer instanceof OsmDataLayer
-                                && ((OsmDataLayer) sourceLayer).isUploadDiscouraged() != ((OsmDataLayer) targetLayer).isUploadDiscouraged()) {
-                            if (Boolean.TRUE.equals(GuiHelper.runInEDTAndWaitAndReturn(() ->
+                                && ((OsmDataLayer) sourceLayer).isUploadDiscouraged() != ((OsmDataLayer) targetLayer).isUploadDiscouraged()
+                                && Boolean.TRUE.equals(GuiHelper.runInEDTAndWaitAndReturn(() ->
                                     warnMergingUploadDiscouragedLayers(sourceLayer, targetLayer)))) {
-                                break;
-                            }
+                            break;
                         }
                         targetLayer.mergeFrom(sourceLayer);
Index: trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 11385)
@@ -194,14 +194,12 @@
         }
 
-        if ((newNodes.size() > 3) && (newNodes.get(0) == newNodes.get(newNodes.size() - 1))) {
-            // Closed way, check if the first node could also be simplified ...
-            if (!isRequiredNode(w, newNodes.get(0))) {
-                final List<Node> l1 = Arrays.asList(newNodes.get(newNodes.size() - 2), newNodes.get(0), newNodes.get(1));
-                final List<Node> l2 = new ArrayList<>(3);
-                buildSimplifiedNodeList(l1, 0, 2, threshold, l2);
-                if (!l2.contains(newNodes.get(0))) {
-                    newNodes.remove(0);
-                    newNodes.set(newNodes.size() - 1, newNodes.get(0)); // close the way
-                }
+        // Closed way, check if the first node could also be simplified ...
+        if (newNodes.size() > 3 && newNodes.get(0) == newNodes.get(newNodes.size() - 1) && !isRequiredNode(w, newNodes.get(0))) {
+            final List<Node> l1 = Arrays.asList(newNodes.get(newNodes.size() - 2), newNodes.get(0), newNodes.get(1));
+            final List<Node> l2 = new ArrayList<>(3);
+            buildSimplifiedNodeList(l1, 0, 2, threshold, l2);
+            if (!l2.contains(newNodes.get(0))) {
+                newNodes.remove(0);
+                newNodes.set(newNodes.size() - 1, newNodes.get(0)); // close the way
             }
         }
Index: trunk/src/org/openstreetmap/josm/actions/UploadAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UploadAction.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/actions/UploadAction.java	(revision 11385)
@@ -187,8 +187,6 @@
      */
     public static boolean checkPreUploadConditions(AbstractModifiableLayer layer, APIDataSet apiData) {
-        if (layer.isUploadDiscouraged()) {
-            if (warnUploadDiscouraged(layer)) {
-                return false;
-            }
+        if (layer.isUploadDiscouraged() && warnUploadDiscouraged(layer)) {
+            return false;
         }
         if (layer instanceof OsmDataLayer) {
Index: trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 11385)
@@ -91,8 +91,6 @@
         if (!isEnabled())
             return;
-        if (editLayer.isUploadDiscouraged()) {
-            if (UploadAction.warnUploadDiscouraged(editLayer)) {
-                return;
-            }
+        if (editLayer.isUploadDiscouraged() && UploadAction.warnUploadDiscouraged(editLayer)) {
+            return;
         }
         Collection<OsmPrimitive> modifiedCandidates = getModifiedPrimitives(editLayer.data.getAllSelected());
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java	(revision 11385)
@@ -75,12 +75,10 @@
         for (int i = 0; i < sortedNodesPath.size(); i++) {
             Node n = sortedNodesPath.get(i);
-            if (i < sortedNodesPath.size()-1) {
-                if (sortedNodesPath.get(i+1).getCoor().equals(n.getCoor())) {
-                    removedNodes.add(n);
-                    for (Way w : ways) {
-                        w.removeNode(n);
-                    }
-                    continue;
+            if (i < sortedNodesPath.size()-1 && sortedNodesPath.get(i+1).getCoor().equals(n.getCoor())) {
+                removedNodes.add(n);
+                for (Way w : ways) {
+                    w.removeNode(n);
                 }
+                continue;
             }
             if (!removedNodes.contains(n)) {
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 11385)
@@ -253,14 +253,12 @@
 
         virtualManager.clear();
-        if (mode == Mode.MOVE) {
-            if (!dragInProgress() && virtualManager.activateVirtualNodeNearPoint(e.getPoint())) {
-                DataSet ds = getLayerManager().getEditDataSet();
-                if (ds != null && drawTargetHighlight) {
-                    ds.setHighlightedVirtualNodes(virtualManager.virtualWays);
-                }
-                mv.setNewCursor(SelectActionCursor.virtual_node.cursor(), this);
-                // don't highlight anything else if a virtual node will be
-                return repaintIfRequired(newHighlights);
-            }
+        if (mode == Mode.MOVE && !dragInProgress() && virtualManager.activateVirtualNodeNearPoint(e.getPoint())) {
+            DataSet ds = getLayerManager().getEditDataSet();
+            if (ds != null && drawTargetHighlight) {
+                ds.setHighlightedVirtualNodes(virtualManager.virtualWays);
+            }
+            mv.setNewCursor(SelectActionCursor.virtual_node.cursor(), this);
+            // don't highlight anything else if a virtual node will be
+            return repaintIfRequired(newHighlights);
         }
 
Index: trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 11385)
@@ -849,10 +849,8 @@
             case ANY_VALUE_REGEXP:
             case EXACT_REGEXP:
-                for (String key: osm.keySet()) {
-                    if (keyPattern.matcher(key).matches()) {
-                        if (mode == Mode.ANY_VALUE_REGEXP
-                                || valuePattern.matcher(osm.get(key)).matches())
-                            return true;
-                    }
+                for (String k : osm.keySet()) {
+                    if (keyPattern.matcher(k).matches()
+                            && (mode == Mode.ANY_VALUE_REGEXP || valuePattern.matcher(osm.get(k)).matches()))
+                        return true;
                 }
                 return false;
Index: trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 11385)
@@ -239,15 +239,13 @@
         for (ImageryInfo info : layers) {
             for (ImageryInfo def : defaultLayers) {
-                if (isSimilar(def, info)) {
-                    if (def.getId() != null && !addedIds.contains(def.getId())) {
-                        if (!defaultLayerIds.containsKey(def.getId())) {
-                            // ignore ids used more than once (have been purged from the map)
-                            continue;
-                        }
-                        newAddedIds.add(def.getId());
-                        if (info.getId() == null) {
-                            info.setId(def.getId());
-                            changed = true;
-                        }
+                if (isSimilar(def, info) && def.getId() != null && !addedIds.contains(def.getId())) {
+                    if (!defaultLayerIds.containsKey(def.getId())) {
+                        // ignore ids used more than once (have been purged from the map)
+                        continue;
+                    }
+                    newAddedIds.add(def.getId());
+                    if (info.getId() == null) {
+                        info.setId(def.getId());
+                        changed = true;
                     }
                 }
Index: trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java	(revision 11385)
@@ -134,9 +134,7 @@
             }
         } else {
-            if (filter.mode == SearchMode.replace) {
-                if (filter.hiding) {
-                    hiddenFilters.clear();
-                    disabledFilters.clear();
-                }
+            if (filter.mode == SearchMode.replace && filter.hiding) {
+                hiddenFilters.clear();
+                disabledFilters.clear();
             }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 11385)
@@ -1050,8 +1050,6 @@
             int counter = 0;
             for (OsmPrimitive o : (OsmPrimitive[]) referrers) {
-                if (dataSet == o.dataSet && o instanceof Way) {
-                    if (++counter >= n)
-                        return true;
-                }
+                if (dataSet == o.dataSet && o instanceof Way && ++counter >= n)
+                    return true;
             }
             return false;
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java	(revision 11385)
@@ -645,8 +645,7 @@
         PolyData result = null;
         for (PolyData combined : outerPolygons) {
-            if (combined.contains(inner.poly) != Intersection.OUTSIDE) {
-                if (result == null || result.contains(combined.poly) == Intersection.INSIDE) {
-                    result = combined;
-                }
+            if (combined.contains(inner.poly) != Intersection.OUTSIDE
+                    && (result == null || result.contains(combined.poly) == Intersection.INSIDE)) {
+                result = combined;
             }
         }
Index: trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java	(revision 11385)
@@ -314,9 +314,7 @@
         String authority = urlMatcher.group(PARSE_URL_AUTHORITY);
         if ("file".equals(scheme)) { // Special case - file: allows an empty authority
-            if (!"".equals(authority)) {
-                if (authority.contains(":")) { // but cannot allow trailing :
-                    setErrorMessage(tr("URL contains an invalid authority: {0}", authority));
-                    return false;
-                }
+            if (!"".equals(authority) && authority.contains(":")) { // but cannot allow trailing :
+                setErrorMessage(tr("URL contains an invalid authority: {0}", authority));
+                return false;
             }
             // drop through to continue validation
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java	(revision 11385)
@@ -65,11 +65,9 @@
                 for (Node n : w.getNodes()) {
                     if (!isPowerTower(n)) {
-                        if (!isPowerAllowed(n) && IN_DOWNLOADED_AREA.test(n)) {
-                            if (!w.isFirstLastNode(n) || !isPowerStation(n)) {
-                                error = TestError.builder(this, Severity.WARNING, POWER_LINES)
-                                        .message(tr("Missing power tower/pole within power line"))
-                                        .primitives(n);
-                                errorNode = n;
-                            }
+                        if (!isPowerAllowed(n) && IN_DOWNLOADED_AREA.test(n) && (!w.isFirstLastNode(n) || !isPowerStation(n))) {
+                            error = TestError.builder(this, Severity.WARNING, POWER_LINES)
+                                    .message(tr("Missing power tower/pole within power line"))
+                                    .primitives(n);
+                            errorNode = n;
                         }
                     } else if (fixValue == null) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 11384)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 11385)
@@ -466,66 +466,64 @@
                 withErrors.put(p, "HTML");
             }
-            if (checkValues && key != null && value != null && !value.isEmpty() && presetsValueData != null) {
-                if (!isTagIgnored(key, value)) {
-                    if (!isKeyInPresets(key)) {
-                        String prettifiedKey = harmonizeKey(key);
-                        String fixedKey = harmonizedKeys.get(prettifiedKey);
-                        if (fixedKey != null && !"".equals(fixedKey) && !fixedKey.equals(key)) {
-                            // misspelled preset key
-                            final TestError.Builder error = TestError.builder(this, Severity.WARNING, MISSPELLED_KEY)
-                                    .message(tr("Misspelled property key"), marktr("Key ''{0}'' looks like ''{1}''."), key, fixedKey)
-                                    .primitives(p);
-                            if (p.hasKey(fixedKey)) {
-                                errors.add(error.build());
-                            } else {
-                                errors.add(error.fix(() -> new ChangePropertyKeyCommand(p, key, fixedKey)).build());
-                            }
-                            withErrors.put(p, "WPK");
+            if (checkValues && key != null && value != null && !value.isEmpty() && presetsValueData != null && !isTagIgnored(key, value)) {
+                if (!isKeyInPresets(key)) {
+                    String prettifiedKey = harmonizeKey(key);
+                    String fixedKey = harmonizedKeys.get(prettifiedKey);
+                    if (fixedKey != null && !"".equals(fixedKey) && !fixedKey.equals(key)) {
+                        // misspelled preset key
+                        final TestError.Builder error = TestError.builder(this, Severity.WARNING, MISSPELLED_KEY)
+                                .message(tr("Misspelled property key"), marktr("Key ''{0}'' looks like ''{1}''."), key, fixedKey)
+                                .primitives(p);
+                        if (p.hasKey(fixedKey)) {
+                            errors.add(error.build());
                         } else {
-                            errors.add(TestError.builder(this, Severity.OTHER, INVALID_VALUE)
-                                    .message(tr("Presets do not contain property key"), marktr("Key ''{0}'' not in presets."), key)
-                                    .primitives(p)
-                                    .build());
-                            withErrors.put(p, "UPK");
+                            errors.add(error.fix(() -> new ChangePropertyKeyCommand(p, key, fixedKey)).build());
                         }
-                    } else if (!isTagInPresets(key, value)) {
-                        // try to fix common typos and check again if value is still unknown
-                        String fixedValue = harmonizeValue(prop.getValue());
-                        Map<String, String> possibleValues = getPossibleValues(presetsValueData.get(key));
-                        if (possibleValues.containsKey(fixedValue)) {
-                            final String newKey = possibleValues.get(fixedValue);
-                            // misspelled preset value
-                            errors.add(TestError.builder(this, Severity.WARNING, MISSPELLED_VALUE)
-                                    .message(tr("Misspelled property value"),
-                                            marktr("Value ''{0}'' for key ''{1}'' looks like ''{2}''."), prop.getValue(), key, fixedValue)
-                                    .primitives(p)
-                                    .fix(() -> new ChangePropertyCommand(p, key, newKey))
-                                    .build());
-                            withErrors.put(p, "WPV");
-                        } else {
-                            // unknown preset value
-                            errors.add(TestError.builder(this, Severity.OTHER, INVALID_VALUE)
-                                    .message(tr("Presets do not contain property value"),
-                                            marktr("Value ''{0}'' for key ''{1}'' not in presets."), prop.getValue(), key)
-                                    .primitives(p)
-                                    .build());
-                            withErrors.put(p, "UPV");
-                        }
+                        withErrors.put(p, "WPK");
+                    } else {
+                        errors.add(TestError.builder(this, Severity.OTHER, INVALID_VALUE)
+                                .message(tr("Presets do not contain property key"), marktr("Key ''{0}'' not in presets."), key)
+                                .primitives(p)
+                                .build());
+                        withErrors.put(p, "UPK");
                     }
-                }
-            }
-            if (checkFixmes && key != null && value != null && !value.isEmpty()) {
-                if ((value.toLowerCase(Locale.ENGLISH).contains("fixme")
-                        || value.contains("check and delete")
-                        || key.contains("todo") || key.toLowerCase(Locale.ENGLISH).contains("fixme"))
-                        && !withErrors.contains(p, "FIXME")) {
-                    errors.add(TestError.builder(this, Severity.OTHER, FIXME)
-                            .message(tr("FIXMES"))
-                            .primitives(p)
-                            .build());
-                    withErrors.put(p, "FIXME");
-                }
-            }
-        }
+                } else if (!isTagInPresets(key, value)) {
+                    // try to fix common typos and check again if value is still unknown
+                    String fixedValue = harmonizeValue(prop.getValue());
+                    Map<String, String> possibleValues = getPossibleValues(presetsValueData.get(key));
+                    if (possibleValues.containsKey(fixedValue)) {
+                        final String newKey = possibleValues.get(fixedValue);
+                        // misspelled preset value
+                        errors.add(TestError.builder(this, Severity.WARNING, MISSPELLED_VALUE)
+                                .message(tr("Misspelled property value"),
+                                        marktr("Value ''{0}'' for key ''{1}'' looks like ''{2}''."), prop.getValue(), key, fixedValue)
+                                .primitives(p)
+                                .fix(() -> new ChangePropertyCommand(p, key, newKey))
+                                .build());
+                        withErrors.put(p, "WPV");
+                    } else {
+                        // unknown preset value
+                        errors.add(TestError.builder(this, Severity.OTHER, INVALID_VALUE)
+                                .message(tr("Presets do not contain property value"),
+                                        marktr("Value ''{0}'' for key ''{1}'' not in presets."), prop.getValue(), key)
+                                .primitives(p)
+                                .build());
+                        withErrors.put(p, "UPV");
+                    }
+                }
+            }
+            if (checkFixmes && key != null && value != null && !value.isEmpty() && isFixme(key, value) && !withErrors.contains(p, "FIXME")) {
+               errors.add(TestError.builder(this, Severity.OTHER, FIXME)
+                .message(tr("FIXMES"))
+                .primitives(p)
+                .build());
+               withErrors.put(p, "FIXME");
+            }
+        }
+    }
+
+    private static boolean isFixme(String key, String value) {
+        return key.toLowerCase(Locale.ENGLISH).contains("fixme") || key.contains("todo")
+          || value.toLowerCase(Locale.ENGLISH).contains("fixme") || value.contains("check and delete");
     }
 
