Index: trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java	(revision 11383)
+++ 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 11383)
+++ 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 11383)
+++ 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 11383)
+++ 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 11383)
+++ 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 11383)
+++ 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 11383)
+++ 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;
