Index: trunk/src/org/openstreetmap/josm/gui/IconToggleButton.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/IconToggleButton.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/IconToggleButton.java	(revision 11386)
@@ -79,11 +79,8 @@
     String getPreferenceKey() {
         String s = (String) getSafeActionValue("toolbar");
-        if (s == null) {
-            if (getAction() != null) {
-                s = getAction().getClass().getName();
-            }
+        if (s == null && getAction() != null) {
+            s = getAction().getClass().getName();
         }
         return "sidetoolbar.hidden."+s;
-
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/PopupMenuHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/PopupMenuHandler.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/PopupMenuHandler.java	(revision 11386)
@@ -74,9 +74,7 @@
             MenuElement[] elements = menu.getSubElements();
             for (int i = 0; i < elements.length; i++) {
-                if (elements[i] instanceof JMenuItem) {
-                    if (((JMenuItem) elements[i]).getAction() == a) {
-                        menu.remove(i);
-                        return;
-                    }
+                if (elements[i] instanceof JMenuItem && ((JMenuItem) elements[i]).getAction() == a) {
+                    menu.remove(i);
+                    return;
                 }
             }
Index: trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapControler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapControler.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapControler.java	(revision 11386)
@@ -118,6 +118,5 @@
 
     /**
-     * Start drawing the selection rectangle if it was the 1st button (left
-     * button)
+     * Start drawing the selection rectangle if it was the 1st button (left button)
      */
     @Override
@@ -132,10 +131,8 @@
     public void mouseDragged(MouseEvent e) {
         if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK &&
-                !(Main.isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK)) {
-            if (iStartSelectionPoint != null) {
-                iEndSelectionPoint = e.getPoint();
-                iSlippyMapChooser.setSelection(iStartSelectionPoint, iEndSelectionPoint);
-                isSelecting = true;
-            }
+                !(Main.isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK) && iStartSelectionPoint != null) {
+            iEndSelectionPoint = e.getPoint();
+            iSlippyMapChooser.setSelection(iStartSelectionPoint, iEndSelectionPoint);
+            isSelecting = true;
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java	(revision 11386)
@@ -98,8 +98,6 @@
             @Override
             public void mouseClicked(MouseEvent e) {
-                if (SwingUtilities.isLeftMouseButton(e) && e.getClickCount() == 2) {
-                    if (noteData != null && noteData.getSelectedNote() != null) {
-                        Main.map.mapView.zoomTo(noteData.getSelectedNote().getLatLon());
-                    }
+                if (SwingUtilities.isLeftMouseButton(e) && e.getClickCount() == 2 && noteData != null && noteData.getSelectedNote() != null) {
+                    Main.map.mapView.zoomTo(noteData.getSelectedNote().getLatLon());
                 }
             }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 11386)
@@ -205,8 +205,6 @@
 
         //update highlights
-        if (highlightEnabled && focused == displaylist && Main.isDisplayingMapView()) {
-            if (highlightHelper.highlightOnly(sel)) {
-                Main.map.mapView.repaint();
-            }
+        if (highlightEnabled && focused == displaylist && Main.isDisplayingMapView() && highlightHelper.highlightOnly(sel)) {
+            Main.map.mapView.repaint();
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 11386)
@@ -211,8 +211,6 @@
                     actEditRelationSelection.actionPerformed(null);
                 }
-            } else if (highlightEnabled && Main.isDisplayingMapView()) {
-                if (helper.highlightOnly(model.getElementAt(idx))) {
-                    Main.map.mapView.repaint();
-                }
+            } else if (highlightEnabled && Main.isDisplayingMapView() && helper.highlightOnly(model.getElementAt(idx))) {
+                Main.map.mapView.repaint();
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 11386)
@@ -385,8 +385,6 @@
                 if (Main.isDisplayingMapView()) {
                     int row = membershipTable.rowAtPoint(e.getPoint());
-                    if (row >= 0) {
-                        if (highlightHelper.highlightOnly((Relation) membershipTable.getValueAt(row, 0))) {
-                            Main.map.mapView.repaint();
-                        }
+                    if (row >= 0 && highlightHelper.highlightOnly((Relation) membershipTable.getValueAt(row, 0))) {
+                        Main.map.mapView.repaint();
                     }
                 }
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java	(revision 11386)
@@ -132,8 +132,6 @@
                 }
             }
-            if (strategy.isCloseChangesetAfterUpload()) {
-                if (changeset != null && changeset.getId() > 0) {
-                    OsmApi.getOsmApi().closeChangeset(changeset, monitor.createSubTaskMonitor(0, false));
-                }
+            if (strategy.isCloseChangesetAfterUpload() && changeset != null && changeset.getId() > 0) {
+                OsmApi.getOsmApi().closeChangeset(changeset, monitor.createSubTaskMonitor(0, false));
             }
         } catch (OsmTransferException sxe) {
Index: trunk/src/org/openstreetmap/josm/gui/layer/AlignImageryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/AlignImageryPanel.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/layer/AlignImageryPanel.java	(revision 11386)
@@ -83,10 +83,8 @@
     public static void addNagPanelIfNeeded(ImageryInfo infoToAdd) {
         BooleanProperty showAgain = new BooleanProperty("message.imagery.nagPanel." + infoToAdd.getUrl(), true);
-        if (Main.isDisplayingMapView() && showAgain.get() && !infoToAdd.isGeoreferenceValid()) {
-            if (Main.map.getTopPanel(AlignImageryPanel.class) == null) {
-                double w = GuiHelper.getScreenSize().getWidth();
-                AlignImageryPanel p = new AlignImageryPanel(w > 1300, showAgain, infoToAdd);
-                Main.map.addTopPanel(p);
-            }
+        if (Main.isDisplayingMapView() && showAgain.get() && !infoToAdd.isGeoreferenceValid()
+                && Main.map.getTopPanel(AlignImageryPanel.class) == null) {
+            double w = GuiHelper.getScreenSize().getWidth();
+            Main.map.addTopPanel(new AlignImageryPanel(w > 1300, showAgain, infoToAdd));
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/NativeScaleLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/NativeScaleLayer.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/layer/NativeScaleLayer.java	(revision 11386)
@@ -174,11 +174,9 @@
                 for (int i = 0; i < size; i++) {
                     Scale current = this.scales.get(i);
-                    if (previous != null) {
-                        if (scale <= previous.scale && scale >= current.scale) {
-                            if (floor || previous.scale / scale < scale / current.scale) {
-                                return new Scale(previous.scale, previous.isNative, i-1);
-                            } else {
-                                return new Scale(current.scale, current.isNative, i);
-                            }
+                    if (previous != null && scale <= previous.scale && scale >= current.scale) {
+                        if (floor || previous.scale / scale < scale / current.scale) {
+                            return new Scale(previous.scale, previous.isNative, i-1);
+                        } else {
+                            return new Scale(current.scale, current.isNative, i);
                         }
                     }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 11386)
@@ -143,8 +143,6 @@
                 if (!hasNonModifier) {
                     p.a = new StyleElementList(p.a, NodeElement.SIMPLE_NODE_ELEMSTYLE);
-                    if (!hasText) {
-                        if (TextLabel.AUTO_LABEL_COMPOSITION_STRATEGY.compose(osm) != null) {
-                            p.a = new StyleElementList(p.a, BoxTextElement.SIMPLE_NODE_TEXT_ELEMSTYLE);
-                        }
+                    if (!hasText && TextLabel.AUTO_LABEL_COMPOSITION_STRATEGY.compose(osm) != null) {
+                        p.a = new StyleElementList(p.a, BoxTextElement.SIMPLE_NODE_TEXT_ELEMSTYLE);
                     }
                 }
@@ -318,16 +316,15 @@
         } else if (osm instanceof Relation) {
             Pair<StyleElementList, Range> p = generateStyles(osm, scale, true);
-            if (drawMultipolygon && ((Relation) osm).isMultipolygon()) {
-                if (!Utils.exists(p.a, AreaElement.class) && Main.pref.getBoolean("multipolygon.deprecated.outerstyle", true)) {
-                    // look at outer ways to find area style
-                    Multipolygon multipolygon = MultipolygonCache.getInstance().get(nc, (Relation) osm);
-                    for (Way w : multipolygon.getOuterWays()) {
-                        Pair<StyleElementList, Range> wayStyles = generateStyles(w, scale, false);
-                        p.b = Range.cut(p.b, wayStyles.b);
-                        StyleElement area = Utils.find(wayStyles.a, AreaElement.class);
-                        if (area != null) {
-                            p.a = new StyleElementList(p.a, area);
-                            break;
-                        }
+            if (drawMultipolygon && ((Relation) osm).isMultipolygon()
+                    && !Utils.exists(p.a, AreaElement.class) && Main.pref.getBoolean("multipolygon.deprecated.outerstyle", true)) {
+                // look at outer ways to find area style
+                Multipolygon multipolygon = MultipolygonCache.getInstance().get(nc, (Relation) osm);
+                for (Way w : multipolygon.getOuterWays()) {
+                    Pair<StyleElementList, Range> wayStyles = generateStyles(w, scale, false);
+                    p.b = Range.cut(p.b, wayStyles.b);
+                    StyleElement area = Utils.find(wayStyles.a, AreaElement.class);
+                    if (area != null) {
+                        p.a = new StyleElementList(p.a, area);
+                        break;
                     }
                 }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 11386)
@@ -277,8 +277,6 @@
         for (int i = 0; i < colors.getRowCount(); ++i) {
             String key = (String) colors.getValueAt(i, 0);
-            if (Main.pref.putColor(key, (Color) colors.getValueAt(i, 1))) {
-                if (key.startsWith("mappaint.")) {
-                    ret = true;
-                }
+            if (Main.pref.putColor(key, (Color) colors.getValueAt(i, 1)) && key.startsWith("mappaint.")) {
+                ret = true;
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java	(revision 11386)
@@ -101,15 +101,11 @@
 
         switch(vColIndex) {
-        case 0: renderTagName((TagModel) value); break;
-        case 1: renderTagValue((TagModel) value); break;
-
-        default: throw new JosmRuntimeException("unexpected index in switch statement");
+            case 0: renderTagName((TagModel) value); break;
+            case 1: renderTagValue((TagModel) value); break;
+            default: throw new JosmRuntimeException("unexpected index in switch statement");
         }
-        if (hasFocus && isSelected) {
-            if (table.getSelectedColumnCount() == 1 && table.getSelectedRowCount() == 1) {
-                if (table.getEditorComponent() != null) {
-                    table.getEditorComponent().requestFocusInWindow();
-                }
-            }
+        if (hasFocus && isSelected && table.getSelectedColumnCount() == 1 && table.getSelectedRowCount() == 1
+                && table.getEditorComponent() != null) {
+            table.getEditorComponent().requestFocusInWindow();
         }
         return this;
Index: trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReader.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReader.java	(revision 11386)
@@ -280,8 +280,6 @@
                         if (o instanceof ComboMultiSelect) {
                             ((ComboMultiSelect) o).addListEntries(listEntries);
-                        } else if (o instanceof Key) {
-                            if (((Key) o).value == null) {
-                                ((Key) o).value = ""; // Fix #8530
-                            }
+                        } else if (o instanceof Key && ((Key) o).value == null) {
+                            ((Key) o).value = ""; // Fix #8530
                         }
                         listEntries = new LinkedList<>();
Index: trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresets.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresets.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresets.java	(revision 11386)
@@ -127,9 +127,7 @@
      */
     public static void addTaggingPresets(Collection<TaggingPreset> presets) {
-        if (presets != null) {
-            if (taggingPresets.addAll(presets)) {
-                for (TaggingPresetListener listener : listeners) {
-                    listener.taggingPresetsModified();
-                }
+        if (presets != null && taggingPresets.addAll(presets)) {
+            for (TaggingPresetListener listener : listeners) {
+                listener.taggingPresetsModified();
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/util/AdvancedKeyPressDetector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/AdvancedKeyPressDetector.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/util/AdvancedKeyPressDetector.java	(revision 11386)
@@ -120,12 +120,10 @@
             if (timer.isRunning()) {
                 timer.stop();
-            } else if (set.add(e.getKeyCode()) && enabled) {
-                if (isFocusInMainWindow()) {
-                    for (KeyPressReleaseListener q: keyListeners) {
-                        if (Main.isTraceEnabled()) {
-                            Main.trace(q+" => doKeyPressed("+e+')');
-                        }
-                        q.doKeyPressed(e);
+            } else if (set.add(e.getKeyCode()) && enabled && isFocusInMainWindow()) {
+                for (KeyPressReleaseListener q: keyListeners) {
+                    if (Main.isTraceEnabled()) {
+                        Main.trace(q+" => doKeyPressed("+e+')');
                     }
+                    q.doKeyPressed(e);
                 }
             }
@@ -133,12 +131,10 @@
             if (timer.isRunning()) {
                 timer.stop();
-                if (set.remove(e.getKeyCode()) && enabled) {
-                    if (isFocusInMainWindow()) {
-                        for (KeyPressReleaseListener q: keyListeners) {
-                            if (Main.isTraceEnabled()) {
-                                Main.trace(q+" => doKeyReleased("+e+')');
-                            }
-                            q.doKeyReleased(e);
+                if (set.remove(e.getKeyCode()) && enabled && isFocusInMainWindow()) {
+                    for (KeyPressReleaseListener q: keyListeners) {
+                        if (Main.isTraceEnabled()) {
+                            Main.trace(q+" => doKeyReleased("+e+')');
                         }
+                        q.doKeyReleased(e);
                     }
                 }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java	(revision 11386)
@@ -115,9 +115,6 @@
             tc.getDocument().addDocumentListener(this);
         }
-        if (addActionListener) {
-            if (tc instanceof JosmTextField) {
-                JosmTextField tf = (JosmTextField) tc;
-                tf.addActionListener(this);
-            }
+        if (addActionListener && tc instanceof JosmTextField) {
+            ((JosmTextField) tc).addActionListener(this);
         }
         tc.addPropertyChangeListener("enabled", this);
Index: trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 11386)
@@ -339,10 +339,7 @@
             while (entries.hasMoreElements()) {
                 ZipEntry entry = entries.nextElement();
-                if (entry.getName().endsWith('.' + extension)) {
-                    /* choose any file with correct extension. When more than
-                        one file, prefer the one which matches namepart */
-                    if (resentry == null || entry.getName().indexOf(namepart) >= 0) {
-                        resentry = entry;
-                    }
+                // choose any file with correct extension. When more than one file, prefer the one which matches namepart
+                if (entry.getName().endsWith('.' + extension) && (resentry == null || entry.getName().indexOf(namepart) >= 0)) {
+                    resentry = entry;
                 }
             }
Index: trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 11386)
@@ -193,10 +193,8 @@
         remember(relation.getPrimitiveId());
         for (RelationMember member : !recursesDown() ? relation.getMembers() : Collections.<RelationMember>emptyList()) {
-            if (OsmPrimitiveType.from(member.getMember()).equals(OsmPrimitiveType.RELATION)) {
-                // avoid infinite recursion in case of cyclic dependencies in relations
-                //
-                if (relations.contains(member.getMember().getId())) {
-                    continue;
-                }
+            // avoid infinite recursion in case of cyclic dependencies in relations
+            if (OsmPrimitiveType.from(member.getMember()).equals(OsmPrimitiveType.RELATION)
+                    && relations.contains(member.getMember().getId())) {
+                continue;
             }
             if (!member.getMember().isIncomplete()) {
Index: trunk/src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 11386)
@@ -667,10 +667,8 @@
                 int retCode = response.getResponseCode();
 
-                if (retCode >= 500) {
-                    if (retries-- > 0) {
-                        sleepAndListen(retries, monitor);
-                        Main.info(tr("Starting retry {0} of {1}.", getMaxRetries() - retries, getMaxRetries()));
-                        continue;
-                    }
+                if (retCode >= 500 && retries-- > 0) {
+                    sleepAndListen(retries, monitor);
+                    Main.info(tr("Starting retry {0} of {1}.", getMaxRetries() - retries, getMaxRetries()));
+                    continue;
                 }
 
Index: trunk/src/org/openstreetmap/josm/io/OsmExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmExporter.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/io/OsmExporter.java	(revision 11386)
@@ -82,7 +82,6 @@
         File tmpFile = null;
         try {
-            // use a tmp file because if something errors out in the
-            // process of writing the file, we might just end up with
-            // a truncated file.  That can destroy lots of work.
+            // use a tmp file because if something errors out in the process of writing the file,
+            // we might just end up with a truncated file.  That can destroy lots of work.
             if (file.exists()) {
                 tmpFile = new File(file.getPath() + '~');
@@ -91,8 +90,6 @@
 
             doSave(file, layer);
-            if (noBackup || !Main.pref.getBoolean("save.keepbackup", false)) {
-                if (tmpFile != null) {
-                    Utils.deleteFile(tmpFile);
-                }
+            if ((noBackup || !Main.pref.getBoolean("save.keepbackup", false)) && tmpFile != null) {
+                Utils.deleteFile(tmpFile);
             }
             layer.onPostSaveToFile();
@@ -107,6 +104,5 @@
 
             try {
-                // if the file save failed, then the tempfile will not
-                // be deleted.  So, restore the backup if we made one.
+                // if the file save failed, then the tempfile will not be deleted. So, restore the backup if we made one.
                 if (tmpFile != null && tmpFile.exists()) {
                     Utils.copyFile(tmpFile, file);
Index: trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 11385)
+++ trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 11386)
@@ -291,9 +291,7 @@
                 break;
             case MIRROR:
-                if ("mirror".equals(qName)) {
-                    if (mirrorEntry != null) {
-                        entry.addMirror(mirrorEntry);
-                        mirrorEntry = null;
-                    }
+                if ("mirror".equals(qName) && mirrorEntry != null) {
+                    entry.addMirror(mirrorEntry);
+                    mirrorEntry = null;
                 }
                 break;
