Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 8443)
@@ -505,5 +505,5 @@
         Main.map = map;
 
-        for (MapFrameListener listener : mapFrameListeners ) {
+        for (MapFrameListener listener : mapFrameListeners) {
             listener.mapFrameInitialized(old, map);
         }
Index: trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java	(revision 8443)
@@ -93,5 +93,5 @@
         //
         int max = Math.min(10, primitivesToShow.size());
-        if (primitivesToShow.size() > max && ! confirmLaunchMultiple(primitivesToShow.size()))
+        if (primitivesToShow.size() > max && !confirmLaunchMultiple(primitivesToShow.size()))
             return;
         for(int i = 0; i < max; i++) {
Index: trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java	(revision 8443)
@@ -68,6 +68,6 @@
         ExtendedDialog ed = new ExtendedDialog(Main.parent,
                 tr("Select target layer"),
-                new String[] { tr("Merge"), tr("Cancel") });
-        ed.setButtonIcons(new String[] { "dialogs/mergedown", "cancel" });
+                new String[] {tr("Merge"), tr("Cancel")});
+        ed.setButtonIcons(new String[] {"dialogs/mergedown", "cancel"});
         ed.setContent(pnl);
         ed.showDialog();
Index: trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 8443)
@@ -127,5 +127,5 @@
         }
 
-        return new Node[] { nodea, nodeb };
+        return new Node[] {nodea, nodeb};
     }
 
@@ -155,5 +155,5 @@
         }
 
-        return new Node[] { node1, node2 };
+        return new Node[] {node1, node2};
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 8443)
@@ -511,5 +511,5 @@
 
             for (NodePair pair: edges) {
-                if (!undirectedEdges.contains(pair) && ! undirectedEdges.contains(pair.swap())) {
+                if (!undirectedEdges.contains(pair) && !undirectedEdges.contains(pair.swap())) {
                     undirectedEdges.add(pair);
                 }
@@ -616,5 +616,5 @@
             while(!nextPairs.isEmpty()) {
                 NodePair cur= nextPairs.pop();
-                if (! path.contains(cur) && ! path.contains(cur.swap())) {
+                if (!path.contains(cur) && !path.contains(cur.swap())) {
                     while(!path.isEmpty() && !path.peek().isPredecessorOf(cur)) {
                         path.pop();
Index: trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java	(revision 8443)
@@ -348,11 +348,11 @@
         Set<String> conflictingKeys = new TreeSet<>();
 
-        for( RelationMember m : relation.getMembers() ) {
-
-            if( m.hasRole() && "inner".equals(m.getRole()) && m.isWay() && m.getWay().hasKeys() ) {
+        for (RelationMember m : relation.getMembers()) {
+
+            if (m.hasRole() && "inner".equals(m.getRole()) && m.isWay() && m.getWay().hasKeys()) {
                 innerWays.add(m.getWay());
             }
 
-            if( m.hasRole() && "outer".equals(m.getRole()) && m.isWay() && m.getWay().hasKeys() ) {
+            if (m.hasRole() && "outer".equals(m.getRole()) && m.isWay() && m.getWay().hasKeys()) {
                 Way way = m.getWay();
                 outerWays.add(way);
@@ -403,6 +403,6 @@
             if (moveTags) {
                 // remove duplicated tags from outer ways
-                for( Way way : outerWays ) {
-                    if( way.hasKey(key) ) {
+                for (Way way : outerWays) {
+                    if (way.hasKey(key)) {
                         affectedWays.add(way);
                     }
@@ -422,5 +422,5 @@
             for (Entry<String, String> entry : values.entrySet()) {
                 String key = entry.getKey();
-                if (!r2.hasKey(key) && !"area".equals(key) ) {
+                if (!r2.hasKey(key) && !"area".equals(key)) {
                     if (relation.isNew())
                         relation.put(key, entry.getValue());
Index: trunk/src/org/openstreetmap/josm/actions/DownloadAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DownloadAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/DownloadAction.java	(revision 8443)
@@ -42,5 +42,5 @@
         dialog.restoreSettings();
         dialog.setVisible(true);
-        if (! dialog.isCanceled()) {
+        if (!dialog.isCanceled()) {
             dialog.rememberSettings();
             Bounds area = dialog.getSelectedDownloadArea();
Index: trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java	(revision 8443)
@@ -79,5 +79,5 @@
     public void export(Layer layer) {
         CheckParameterUtil.ensureParameterNotNull(layer, "layer");
-        if (! (layer instanceof OsmDataLayer) && ! (layer instanceof GpxLayer))
+        if (!(layer instanceof OsmDataLayer) && !(layer instanceof GpxLayer))
             throw new IllegalArgumentException(MessageFormat.format("Expected instance of OsmDataLayer or GpxLayer. Got ''{0}''.", layer.getClass().getName()));
 
Index: trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 8443)
@@ -194,7 +194,7 @@
             super(Main.parent,
                     tr("Adjust imagery offset"),
-                    new String[] { tr("OK"),tr("Cancel") },
+                    new String[] {tr("OK"),tr("Cancel")},
                     false);
-            setButtonIcons(new String[] { "ok", "cancel" });
+            setButtonIcons(new String[] {"ok", "cancel"});
             contentInsets = new Insets(10, 15, 5, 15);
             JPanel pnl = new JPanel(new GridBagLayout());
@@ -229,5 +229,5 @@
             String ostr = tOffset.getText();
             int semicolon = ostr.indexOf(';');
-            if( semicolon >= 0 && semicolon + 1 < ostr.length() ) {
+            if (semicolon >= 0 && semicolon + 1 < ostr.length()) {
                 try {
                     // here we assume that Double.parseDouble() needs '.' as a decimal separator
Index: trunk/src/org/openstreetmap/josm/actions/JumpToAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JumpToAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/JumpToAction.java	(revision 8443)
@@ -109,5 +109,5 @@
         p.add(url, GBC.eol().fill(GBC.HORIZONTAL));
 
-        Object[] buttons = { tr("Jump there"), tr("Cancel") };
+        Object[] buttons = {tr("Jump there"), tr("Cancel")};
         LatLon ll = null;
         double zoomLvl = 100;
Index: trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 8443)
@@ -198,5 +198,5 @@
             List<Node> newNodes = new ArrayList<>(w.getNodesCount());
             for (Node n: w.getNodes()) {
-                if (! nodesToDelete.contains(n) && !n.equals(targetNode)) {
+                if (!nodesToDelete.contains(n) && !n.equals(targetNode)) {
                     newNodes.add(n);
                 } else if (newNodes.isEmpty()) {
Index: trunk/src/org/openstreetmap/josm/actions/MoveNodeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MoveNodeAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/MoveNodeAction.java	(revision 8443)
@@ -67,5 +67,5 @@
             return;
         }
-        if ((selection.size()) == 1 && (selection.toArray()[0] instanceof Node) ) {
+        if ((selection.size()) == 1 && (selection.toArray()[0] instanceof Node)) {
             setEnabled(true);
         } else {
Index: trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 8443)
@@ -101,9 +101,9 @@
             try {
                 for (OsmPrimitive p : sel) {
-                    if (! (p instanceof Node)) throw new InvalidUserInputException();
+                    if (!(p instanceof Node)) throw new InvalidUserInputException();
                     Node n = (Node) p;
                     if (rememberMovements.containsKey(n)) {
                         EastNorth tmp = rememberMovements.get(n);
-                        commands.add(new MoveCommand(n, - tmp.east(), - tmp.north()));
+                        commands.add(new MoveCommand(n, -tmp.east(), -tmp.north()));
                         rememberMovements.remove(n);
                     }
@@ -299,5 +299,5 @@
         // rotate
         for (Node n: allNodes) {
-            EastNorth tmp = EN.rotateCC(pivot, n.getEastNorth(), - headingAll);
+            EastNorth tmp = EN.rotateCC(pivot, n.getEastNorth(), -headingAll);
             nX.put(n, tmp.east());
             nY.put(n, tmp.north());
@@ -328,9 +328,9 @@
                             Node n2 = w.way.getNodes().get(i+1);
                             if (Arrays.asList(orientation).contains(w.segDirections[i])) {
-                                if (cs.contains(n1) && ! cs.contains(n2)) {
+                                if (cs.contains(n1) && !cs.contains(n2)) {
                                     cs.add(n2);
                                     somethingHappened = true;
                                 }
-                                if (cs.contains(n2) && ! cs.contains(n1)) {
+                                if (cs.contains(n2) && !cs.contains(n1)) {
                                     cs.add(n1);
                                     somethingHappened = true;
@@ -468,5 +468,5 @@
             }
             // rotate the vertical vector by 90 degrees (clockwise) and add it to the horizontal vector
-            segSum = EN.sum(h, new EastNorth(v.north(), - v.east()));
+            segSum = EN.sum(h, new EastNorth(v.north(), -v.east()));
             //            if (EN.abs(segSum) < lh) throw new AssertionError();
             this.heading = EN.polar(new EastNorth(0.,0.), segSum);
@@ -505,5 +505,5 @@
             a -= 2 * Math.PI;
         }
-        while (a <= - Math.PI) {
+        while (a <= -Math.PI) {
             a += 2 * Math.PI;
         }
Index: trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 8443)
@@ -109,5 +109,5 @@
          */
         protected <T extends OsmPrimitive> boolean hasSourceTagsByType(OsmPrimitiveType type) {
-            return ! getSourceTagsByType(type).isEmpty();
+            return !getSourceTagsByType(type).isEmpty();
         }
 
@@ -196,5 +196,5 @@
                 if (hasTargetPrimitives(type.getOsmClass())) {
                     TagCollection tc = TagCollection.unionOfAllPrimitives(getSourcePrimitivesByType(type));
-                    if (!tc.isEmpty() && ! tc.isApplicableToPrimitive())
+                    if (!tc.isEmpty() && !tc.isApplicableToPrimitive())
                         return false;
                 }
Index: trunk/src/org/openstreetmap/josm/actions/PreferencesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PreferencesAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/PreferencesAction.java	(revision 8443)
@@ -107,5 +107,5 @@
         if (tab != null) {
             p.selectPreferencesTabByClass(tab);
-        } else if( subTab != null) {
+        } else if (subTab != null) {
             p.selectSubPreferencesTabByClass(subTab);
         }
Index: trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java	(revision 8443)
@@ -74,5 +74,5 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        if (! isEnabled())
+        if (!isEnabled())
             return;
         if (getCurrentDataSet() == null)
Index: trunk/src/org/openstreetmap/josm/actions/SaveAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SaveAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/SaveAction.java	(revision 8443)
@@ -37,5 +37,5 @@
     @Override public File getFile(Layer layer) {
         File f = layer.getAssociatedFile();
-        if(f != null && ! f.exists()) {
+        if (f != null && !f.exists()) {
             f=null;
         }
Index: trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 8443)
@@ -139,5 +139,5 @@
     protected boolean isRequiredNode(Way way, Node node) {
         boolean isRequired =  Collections.frequency(way.getNodes(), node) > 1;
-        if (! isRequired) {
+        if (!isRequired) {
             List<OsmPrimitive> parents = new LinkedList<>();
             parents.addAll(node.getReferrers());
Index: trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 8443)
@@ -126,5 +126,5 @@
         List<Way> selectedWays = OsmPrimitive.getFilteredList(selection, Way.class);
         List<Relation> selectedRelations =
-            OsmPrimitive.getFilteredList( selection, Relation.class);
+            OsmPrimitive.getFilteredList(selection, Relation.class);
         List<Way> applicableWays = getApplicableWays(selectedWays, selectedNodes);
 
Index: trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java	(revision 8443)
@@ -45,5 +45,5 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        if (! isEnabled())
+        if (!isEnabled())
             return;
         if (getEditLayer() == null)
Index: trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 8443)
@@ -126,5 +126,5 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        if (! isEnabled())
+        if (!isEnabled())
             return;
         Collection<OsmPrimitive> toUpdate = getData();
Index: trunk/src/org/openstreetmap/josm/actions/ZoomToAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ZoomToAction.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/actions/ZoomToAction.java	(revision 8443)
@@ -24,9 +24,9 @@
 
     private final OsmPrimitivesTable table;
-    
+
     private final String descriptionNominal;
     private final String descriptionInactiveLayer;
     private final String descriptionNoSelection;
-    
+
     public ZoomToAction(OsmPrimitivesTable table, String descriptionNominal, String descriptionInactiveLayer, String descriptionNoSelection) {
         CheckParameterUtil.ensureParameterNotNull(table);
@@ -39,21 +39,21 @@
         updateEnabledState();
     }
-    
+
     public ZoomToAction(MemberTable table) {
-        this(table, 
+        this(table,
                 tr("Zoom to the object the first selected member refers to"),
                 tr("Zooming disabled because layer of this relation is not active"),
                 tr("Zooming disabled because there is no selected member"));
     }
-    
+
     public ZoomToAction(RelationMemberTable table) {
-        this(table, 
+        this(table,
                 tr("Zoom to the object the first selected member refers to"),
                 tr("Zooming disabled because layer of this relation is not active"),
                 tr("Zooming disabled because there is no selected member"));
     }
-    
+
     public ZoomToAction(NodeListTable table) {
-        this(table, 
+        this(table,
                 tr("Zoom to the first selected node"),
                 tr("Zooming disabled because layer of this way is not active"),
@@ -63,5 +63,5 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        if (! isEnabled())
+        if (!isEnabled())
             return;
         int[] rows = this.table.getSelectedRows();
Index: trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java	(revision 8443)
@@ -82,5 +82,5 @@
     @Override
     public String getDescriptionText() {
-        String text = tr( "Replace \"{0}\" by \"{1}\" for", key, newKey);
+        String text = tr("Replace \"{0}\" by \"{1}\" for", key, newKey);
         if (objects.size() == 1) {
             NameVisitor v = new NameVisitor();
Index: trunk/src/org/openstreetmap/josm/command/RotateCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/RotateCommand.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/command/RotateCommand.java	(revision 8443)
@@ -50,5 +50,5 @@
      **/
     protected final double getAngle(EastNorth currentEN) {
-        if ( pivot == null )
+        if (pivot == null)
             return 0.0; // should never happen by contract
         return Math.atan2(currentEN.east()-pivot.east(), currentEN.north()-pivot.north());
Index: trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java	(revision 8443)
@@ -133,5 +133,5 @@
         EastNorth sum = new EastNorth(0,0);
 
-        for (Node n : nodes ) {
+        for (Node n : nodes) {
             EastNorth en = n.getEastNorth();
             sum = sum.add(en.east(), en.north());
Index: trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java	(revision 8443)
@@ -233,5 +233,5 @@
         Collection<OsmPrimitive> referrers = oldway.getReferrers();
         for (OsmPrimitive referrer: referrers) {
-            if (! (referrer instanceof Relation)) {
+            if (!(referrer instanceof Relation)) {
                 continue;
             }
Index: trunk/src/org/openstreetmap/josm/data/AutosaveTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/AutosaveTask.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/data/AutosaveTask.java	(revision 8443)
@@ -59,5 +59,5 @@
 public class AutosaveTask extends TimerTask implements LayerChangeListener, Listener {
 
-    private static final char[] ILLEGAL_CHARACTERS = { '/', '\n', '\r', '\t', '\0', '\f', '`', '?', '*', '\\', '<', '>', '|', '\"', ':' };
+    private static final char[] ILLEGAL_CHARACTERS = {'/', '\n', '\r', '\t', '\0', '\f', '`', '?', '*', '\\', '<', '>', '|', '\"', ':'};
     private static final String AUTOSAVE_DIR = "autosave";
     private static final String DELETED_LAYERS_DIR = "autosave/deleted_layers";
Index: trunk/src/org/openstreetmap/josm/data/Bounds.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Bounds.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/data/Bounds.java	(revision 8443)
@@ -143,9 +143,9 @@
     }
 
-    public Bounds(double [] coords) {
+    public Bounds(double[] coords) {
         this(coords, true);
     }
 
-    public Bounds(double [] coords, boolean roundToOsmPrecision) {
+    public Bounds(double[] coords, boolean roundToOsmPrecision) {
         CheckParameterUtil.ensureParameterNotNull(coords, "coords");
         if (coords.length != 4)
Index: trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 8443)
@@ -412,9 +412,8 @@
         tmp.settingsMap.putAll(pref.settingsMap);
         tmp.defaultsMap.putAll(pref.defaultsMap);
-        tmp.colornames.putAll( pref.colornames );
+        tmp.colornames.putAll(pref.colornames);
 
         return tmp;
     }
-
 
     public static class XMLCommandProcessor {
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 8443)
@@ -879,5 +879,5 @@
             }
         } else {
-            if (! prefDir.mkdirs()) {
+            if (!prefDir.mkdirs()) {
                 Main.warn(tr("Failed to initialize preferences. Failed to create missing preference directory: {0}", prefDir.getAbsoluteFile()));
                 JOptionPane.showMessageDialog(
Index: trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 8443)
@@ -113,5 +113,6 @@
      * @return the option selected by user. {@link JOptionPane#CLOSED_OPTION} if the dialog was closed.
      */
-    public static int showOptionDialog(String preferenceKey, Component parent, Object message, String title, int optionType, int messageType, Object [] options, Object defaultOption) throws HeadlessException {
+    public static int showOptionDialog(String preferenceKey, Component parent, Object message, String title, int optionType,
+            int messageType, Object[] options, Object defaultOption) throws HeadlessException {
         int ret = getDialogReturnValue(preferenceKey);
         if (isYesOrNo(ret))
Index: trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 8443)
@@ -618,5 +618,5 @@
         int nodesNo = way.isClosed() ? way.getNumNodes() -1 : way.getNumNodes();
         String nodes = trn("{0} node", "{0} nodes", nodesNo, nodesNo);
-        if(sb.length() == 0 ) {
+        if (sb.length() == 0) {
             sb.append(way.getId());
         }
Index: trunk/src/org/openstreetmap/josm/gui/FileDrop.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 8443)
@@ -34,5 +34,4 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.OpenFileAction;
-import org.openstreetmap.josm.gui.FileDrop.TransferableObject;
 
 /**
@@ -85,5 +84,5 @@
 
     // Default border color
-    private static Color defaultBorderColor = new Color( 0f, 0f, 1f, 0.25f );
+    private static Color defaultBorderColor = new Color(0f, 0f, 1f, 0.25f);
 
     /**
@@ -91,12 +90,12 @@
      * @param c The drop target
      */
-    public FileDrop(final Component c){
+    public FileDrop(final Component c) {
         this(
                 c,     // Drop target
-                BorderFactory.createMatteBorder( 2, 2, 2, 2, defaultBorderColor ), // Drag border
+                BorderFactory.createMatteBorder(2, 2, 2, 2, defaultBorderColor), // Drag border
                 true, // Recursive
-                new FileDrop.Listener(){
+                new FileDrop.Listener() {
                     @Override
-                    public void filesDropped( File[] files ){
+                    public void filesDropped(File[] files){
                         // start asynchronous loading of files
                         OpenFileAction.OpenFileTask task = new OpenFileAction.OpenFileTask(Arrays.asList(files), null);
@@ -126,40 +125,40 @@
             final Listener listener) {
 
-        if( supportsDnD() ) {
+        if (supportsDnD()) {
             // Make a drop listener
             dropListener = new DropTargetListener() {
                 @Override
-                public void dragEnter( DropTargetDragEvent evt ) {
+                public void dragEnter(DropTargetDragEvent evt) {
                     Main.trace("FileDrop: dragEnter event." );
 
                     // Is this an acceptable drag event?
-                    if( isDragOk( evt ) ) {
+                    if (isDragOk(evt) ) {
                         // If it's a Swing component, set its border
-                        if( c instanceof JComponent ) {
+                        if (c instanceof JComponent) {
                            JComponent jc = (JComponent) c;
                             normalBorder = jc.getBorder();
-                            Main.trace("FileDrop: normal border saved." );
-                            jc.setBorder( dragBorder );
-                            Main.trace("FileDrop: drag border set." );
+                            Main.trace("FileDrop: normal border saved.");
+                            jc.setBorder(dragBorder);
+                            Main.trace("FileDrop: drag border set.");
                         }
 
                         // Acknowledge that it's okay to enter
-                        evt.acceptDrag( DnDConstants.ACTION_COPY );
-                        Main.trace("FileDrop: event accepted." );
+                        evt.acceptDrag( DnDConstants.ACTION_COPY);
+                        Main.trace("FileDrop: event accepted.");
                     } else {
                         // Reject the drag event
                         evt.rejectDrag();
-                        Main.trace("FileDrop: event rejected." );
+                        Main.trace("FileDrop: event rejected.");
                     }
                 }
 
                 @Override
-                public void dragOver( DropTargetDragEvent evt ) {
+                public void dragOver(DropTargetDragEvent evt) {
                     // This is called continually as long as the mouse is over the drag target.
                 }
 
                 @Override
-                public void drop( DropTargetDropEvent evt ) {
-                   Main.trace("FileDrop: drop event." );
+                public void drop(DropTargetDropEvent evt) {
+                   Main.trace("FileDrop: drop event.");
                     try {
                         // Get whatever was dropped
@@ -180,5 +179,5 @@
 
                             // Alert listener to drop.
-                            if( listener != null ) {
+                            if (listener != null) {
                                 listener.filesDropped(files);
                             }
@@ -214,6 +213,6 @@
                                 }
                             }
-                            if(!handled){
-                                Main.trace("FileDrop: not a file list or reader - abort." );
+                            if (!handled) {
+                                Main.trace("FileDrop: not a file list or reader - abort.");
                                 evt.rejectDrop();
                             }
@@ -221,5 +220,5 @@
                         }
                     } catch (IOException | UnsupportedFlavorException e) {
-                        Main.warn("FileDrop: "+e.getClass().getSimpleName()+" - abort:" );
+                        Main.warn("FileDrop: "+e.getClass().getSimpleName()+" - abort:");
                         Main.error(e);
                         try {
@@ -231,8 +230,8 @@
                     } finally {
                         // If it's a Swing component, reset its border
-                        if( c instanceof JComponent ) {
+                        if (c instanceof JComponent) {
                            JComponent jc = (JComponent) c;
-                            jc.setBorder( normalBorder );
-                            Main.debug("FileDrop: normal border restored." );
+                            jc.setBorder(normalBorder);
+                            Main.debug("FileDrop: normal border restored.");
                         }
                     }
@@ -240,24 +239,24 @@
 
                 @Override
-                public void dragExit( DropTargetEvent evt ) {
-                    Main.debug("FileDrop: dragExit event." );
+                public void dragExit(DropTargetEvent evt) {
+                    Main.debug("FileDrop: dragExit event.");
                     // If it's a Swing component, reset its border
-                    if( c instanceof JComponent ) {
-                       JComponent jc = (JComponent) c;
-                        jc.setBorder( normalBorder );
-                        Main.debug("FileDrop: normal border restored." );
+                    if (c instanceof JComponent) {
+                        JComponent jc = (JComponent) c;
+                        jc.setBorder(normalBorder);
+                        Main.debug("FileDrop: normal border restored.");
                     }
                 }
 
                 @Override
-                public void dropActionChanged( DropTargetDragEvent evt ) {
-                    Main.debug("FileDrop: dropActionChanged event." );
+                public void dropActionChanged(DropTargetDragEvent evt) {
+                    Main.debug("FileDrop: dropActionChanged event.");
                     // Is this an acceptable drag event?
-                    if( isDragOk( evt ) ) {
-                        evt.acceptDrag( DnDConstants.ACTION_COPY );
-                        Main.debug("FileDrop: event accepted." );
+                    if (isDragOk(evt) ) {
+                        evt.acceptDrag( DnDConstants.ACTION_COPY);
+                        Main.debug("FileDrop: event accepted.");
                     } else {
                         evt.rejectDrag();
-                        Main.debug("FileDrop: event rejected." );
+                        Main.debug("FileDrop: event rejected.");
                     }
                 }
@@ -265,17 +264,17 @@
 
             // Make the component (and possibly children) drop targets
-            makeDropTarget( c, recursive );
+            makeDropTarget(c, recursive);
         } else {
-            Main.info("FileDrop: Drag and drop is not supported with this JVM" );
+            Main.info("FileDrop: Drag and drop is not supported with this JVM");
         }
     }
 
     private static synchronized boolean supportsDnD() {
-        if( supportsDnD == null ) {
+        if (supportsDnD == null) {
             boolean support = false;
             try {
-                Class.forName( "java.awt.dnd.DnDConstants" );
+                Class.forName("java.awt.dnd.DnDConstants");
                 support = true;
-            } catch( Exception e ) {
+            } catch(Exception e) {
                 support = false;
             }
@@ -313,34 +312,34 @@
     // END 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
 
-    private void makeDropTarget( final Component c, boolean recursive ) {
+    private void makeDropTarget(final Component c, boolean recursive) {
         // Make drop target
         final DropTarget dt = new DropTarget();
         try {
-            dt.addDropTargetListener( dropListener );
-        } catch( TooManyListenersException e ) {
+            dt.addDropTargetListener(dropListener);
+        } catch(TooManyListenersException e) {
             Main.error(e);
-            Main.warn("FileDrop: Drop will not work due to previous error. Do you have another listener attached?" );
+            Main.warn("FileDrop: Drop will not work due to previous error. Do you have another listener attached?");
         }
 
         // Listen for hierarchy changes and remove the drop target when the parent gets cleared out.
-        c.addHierarchyListener( new HierarchyListener() {
+        c.addHierarchyListener(new HierarchyListener() {
             @Override
-            public void hierarchyChanged( HierarchyEvent evt ) {
-                Main.trace("FileDrop: Hierarchy changed." );
+            public void hierarchyChanged(HierarchyEvent evt) {
+                Main.trace("FileDrop: Hierarchy changed.");
                 Component parent = c.getParent();
-                if( parent == null ) {
-                    c.setDropTarget( null );
-                    Main.trace("FileDrop: Drop target cleared from component." );
+                if (parent == null) {
+                    c.setDropTarget(null);
+                    Main.trace("FileDrop: Drop target cleared from component.");
                 } else {
                     new DropTarget(c, dropListener);
-                    Main.trace("FileDrop: Drop target added to component." );
+                    Main.trace("FileDrop: Drop target added to component.");
                 }
             }
         });
-        if( c.getParent() != null ) {
+        if (c.getParent() != null) {
             new DropTarget(c, dropListener);
         }
 
-        if( recursive && (c instanceof Container ) ) {
+        if (recursive && (c instanceof Container)) {
             // Get the container
             Container cont = (Container) c;
@@ -351,5 +350,5 @@
             // Set it's components as listeners also
             for (Component comp : comps) {
-                makeDropTarget( comp, recursive);
+                makeDropTarget(comp, recursive);
             }
         }
@@ -357,5 +356,5 @@
 
     /** Determine if the dragged data is a file list. */
-    private boolean isDragOk( final DropTargetDragEvent evt ) {
+    private boolean isDragOk(final DropTargetDragEvent evt) {
         boolean ok = false;
 
@@ -365,9 +364,9 @@
         // See if any of the flavors are a file list
         int i = 0;
-        while( !ok && i < flavors.length ) {
+        while(!ok && i < flavors.length) {
             // BEGIN 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
             // Is the flavor a file list?
             final DataFlavor curFlavor = flavors[i];
-            if( curFlavor.equals( DataFlavor.javaFileListFlavor ) ||
+            if (curFlavor.equals( DataFlavor.javaFileListFlavor ) ||
                     curFlavor.isRepresentationClassReader()){
                 ok = true;
@@ -378,9 +377,9 @@
 
         // show data flavors
-        if( flavors.length == 0 ) {
-            Main.trace("FileDrop: no data flavors." );
-        }
-        for( i = 0; i < flavors.length; i++ ) {
-            Main.trace(flavors[i].toString() );
+        if (flavors.length == 0) {
+            Main.trace("FileDrop: no data flavors.");
+        }
+        for (i = 0; i < flavors.length; i++) {
+            Main.trace(flavors[i].toString());
         }
 
@@ -398,6 +397,6 @@
      * @return {@code true} if at least one item has been removed, {@code false} otherwise
      */
-    public static boolean remove( Component c) {
-        return remove( c, true );
+    public static boolean remove(Component c) {
+        return remove(c, true);
     }
 
@@ -411,5 +410,5 @@
      * @return {@code true} if at least one item has been removed, {@code false} otherwise
      */
-    public static boolean remove( Component c, boolean recursive ) {
+    public static boolean remove(Component c, boolean recursive) {
         // Make sure we support dnd.
         if (supportsDnD()) {
@@ -449,5 +448,5 @@
          * @param files An array of <tt>File</tt>s that were dropped.
          */
-        public abstract void filesDropped( File[] files );
+        public abstract void filesDropped(File[] files);
     }
 
@@ -512,5 +511,5 @@
          */
         public static final DataFlavor DATA_FLAVOR =
-            new DataFlavor( FileDrop.TransferableObject.class, MIME_TYPE );
+            new DataFlavor(FileDrop.TransferableObject.class, MIME_TYPE);
 
         private Fetcher fetcher;
@@ -528,7 +527,7 @@
          * @param data The data to transfer
          */
-        public TransferableObject( Object data ) {
+        public TransferableObject(Object data) {
             this.data = data;
-            this.customFlavor = new DataFlavor( data.getClass(), MIME_TYPE );
+            this.customFlavor = new DataFlavor(data.getClass(), MIME_TYPE);
         }
 
@@ -542,5 +541,5 @@
          * @param fetcher The {@link Fetcher} that will return the data object
          */
-        public TransferableObject( Fetcher fetcher ) {
+        public TransferableObject(Fetcher fetcher) {
             this.fetcher = fetcher;
         }
@@ -558,7 +557,7 @@
          * @see Fetcher
          */
-        public TransferableObject(Class<?> dataClass, Fetcher fetcher ) {
+        public TransferableObject(Class<?> dataClass, Fetcher fetcher) {
             this.fetcher = fetcher;
-            this.customFlavor = new DataFlavor( dataClass, MIME_TYPE );
+            this.customFlavor = new DataFlavor(dataClass, MIME_TYPE);
         }
 
@@ -587,5 +586,5 @@
         @Override
         public DataFlavor[] getTransferDataFlavors() {
-            if( customFlavor != null )
+            if (customFlavor != null)
                 return new DataFlavor[] {
                     customFlavor,
@@ -609,12 +608,12 @@
          */
         @Override
-        public Object getTransferData( DataFlavor flavor )
+        public Object getTransferData(DataFlavor flavor)
         throws UnsupportedFlavorException, IOException {
             // Native object
-            if( flavor.equals( DATA_FLAVOR ) )
+            if (flavor.equals(DATA_FLAVOR))
                 return fetcher == null ? data : fetcher.getObject();
 
             // String
-            if( flavor.equals( DataFlavor.stringFlavor ) )
+            if (flavor.equals(DataFlavor.stringFlavor))
                 return fetcher == null ? data.toString() : fetcher.getObject().toString();
 
@@ -631,11 +630,11 @@
          */
         @Override
-        public boolean isDataFlavorSupported( DataFlavor flavor ) {
+        public boolean isDataFlavorSupported(DataFlavor flavor) {
             // Native object
-            if( flavor.equals( DATA_FLAVOR ) )
+            if (flavor.equals(DATA_FLAVOR))
                 return true;
 
             // String
-            if( flavor.equals( DataFlavor.stringFlavor ) )
+            if (flavor.equals( DataFlavor.stringFlavor))
                 return true;
 
Index: trunk/src/org/openstreetmap/josm/gui/IconToggleButton.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/IconToggleButton.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/gui/IconToggleButton.java	(revision 8443)
@@ -112,5 +112,5 @@
                 hiddenFlag = Boolean.parseBoolean(hiddenFlagStr);
             }
-            setVisible( !hiddenFlag ); // show or hide, do what preferences say
+            setVisible(!hiddenFlag); // show or hide, do what preferences say
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 8443)
@@ -285,9 +285,9 @@
 
     private void addDynamic(Action a) {
-        dynamicItems.add( this.add(a) );
+        dynamicItems.add(this.add(a));
     }
 
     private void addDynamic(JMenuItem it) {
-        dynamicItems.add( this.add(it) );
+        dynamicItems.add(this.add(it));
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 8443)
@@ -242,5 +242,5 @@
 
         int c;
-        while ((c = g.getopt()) != -1 ) {
+        while ((c = g.getopt()) != -1) {
             Option opt = null;
             switch (c) {
Index: trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 8443)
@@ -938,5 +938,5 @@
                      */
                     double perDistSq = Double.longBitsToDouble(
-                            Double.doubleToLongBits( a - (a - b + c) * (a - b + c) / 4 / c )
+                            Double.doubleToLongBits(a - (a - b + c) * (a - b + c) / 4 / c)
                             >> 32 << 32); // resolution in numbers with large exponent not needed here..
 
@@ -1319,5 +1319,5 @@
             double r = (
                     (pt.getX()-a.getX())*(b.getX()-a.getX()) +
-                    (pt.getY()-a.getY())*(b.getY()-a.getY()) )
+                    (pt.getY()-a.getY())*(b.getY()-a.getY()))
                     / a.distanceSq(b);
             return project(r, a, b);
Index: trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 8443)
@@ -364,5 +364,5 @@
                 localFile = null;
             } else {
-                if ( maxAge == DEFAULT_MAXTIME
+                if (maxAge == DEFAULT_MAXTIME
                         || maxAge <= 0 // arbitrary value <= 0 is deprecated
                 ) {
Index: trunk/src/org/openstreetmap/josm/io/Capabilities.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 8443)
@@ -70,5 +70,5 @@
      */
     public boolean isDefined(String element, String attribute) {
-        if (! capabilities.containsKey(element)) return false;
+        if (!capabilities.containsKey(element)) return false;
         Map<String, String> e = capabilities.get(element);
         if (e == null) return false;
@@ -84,5 +84,5 @@
      */
     public String get(String element, String attribute) {
-        if (! capabilities.containsKey(element)) return null;
+        if (!capabilities.containsKey(element)) return null;
         Map<String, String> e = capabilities.get(element);
         if (e == null) return null;
@@ -131,5 +131,5 @@
             }
         } else {
-            if (! capabilities.containsKey(element))  {
+            if (!capabilities.containsKey(element))  {
                 Map<String,String> h = new HashMap<>();
                 capabilities.put(element, h);
Index: trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 8443)
@@ -193,5 +193,5 @@
      * @throws IllegalArgumentException if createdBefore is null
      */
-    public ChangesetQuery closedAfterAndCreatedBefore(Date closedAfter, Date createdBefore ) {
+    public ChangesetQuery closedAfterAndCreatedBefore(Date closedAfter, Date createdBefore) {
         CheckParameterUtil.ensureParameterNotNull(closedAfter, "closedAfter");
         CheckParameterUtil.ensureParameterNotNull(createdBefore, "createdBefore");
Index: trunk/src/org/openstreetmap/josm/io/GpxExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxExporter.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/io/GpxExporter.java	(revision 8443)
@@ -135,6 +135,6 @@
         ExtendedDialog ed = new ExtendedDialog(Main.parent,
                 tr("Export options"),
-                new String[] { tr("Export and Save"), tr("Cancel") });
-        ed.setButtonIcons(new String[] { "exportgpx", "cancel" });
+                new String[] {tr("Export and Save"), tr("Cancel")});
+        ed.setButtonIcons(new String[] {"exportgpx", "cancel"});
         ed.setContent(p);
         ed.showDialog();
Index: trunk/src/org/openstreetmap/josm/io/OsmConnection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmConnection.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/io/OsmConnection.java	(revision 8443)
@@ -119,5 +119,5 @@
         OAuthConsumer consumer = oauthParameters.buildConsumer();
         OAuthAccessTokenHolder holder = OAuthAccessTokenHolder.getInstance();
-        if (! holder.containsAccessToken())
+        if (!holder.containsAccessToken())
             throw new MissingOAuthAccessTokenException();
         consumer.setTokenWithSecret(holder.getAccessTokenKey(), holder.getAccessTokenSecret());
Index: trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java	(revision 8443)
@@ -120,5 +120,5 @@
               .append('/')
               .append(id.getUniqueId());
-            if (full && ! id.getType().equals(OsmPrimitiveType.NODE)) {
+            if (full && !id.getType().equals(OsmPrimitiveType.NODE)) {
                 sb.append("/full");
             } else if (version > 0) {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java	(revision 8443)
@@ -42,5 +42,5 @@
             UserInfo userInfo = new UserInfo();
             Node xmlNode = (Node)xpath.compile("/osm/user[1]").evaluate(document, XPathConstants.NODE);
-            if ( xmlNode== null)
+            if (xmlNode == null)
                 throw new XmlParsingException(tr("XML tag <user> is missing."));
 
Index: trunk/src/org/openstreetmap/josm/io/OsmWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmWriter.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/io/OsmWriter.java	(revision 8443)
@@ -315,7 +315,7 @@
         }
         if (this.changeset != null && this.changeset.getId() != 0) {
-            out.print(" changeset='"+this.changeset.getId()+"'" );
+            out.print(" changeset='"+this.changeset.getId()+"'");
         } else if (osm.getChangesetId() > 0 && !osm.isNew()) {
-            out.print(" changeset='"+osm.getChangesetId()+"'" );
+            out.print(" changeset='"+osm.getChangesetId()+"'");
         }
     }
Index: trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java	(revision 8443)
@@ -111,5 +111,5 @@
             );
             dialog.setContent(tr("JOSM version {0} required for plugin {1}.", pi.mainversion, pi.name));
-            dialog.setButtonIcons(new String[] { "download", "cancel" });
+            dialog.setButtonIcons(new String[] {"download", "cancel"});
             dialog.showDialog();
             int answer = dialog.getValue();
Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8443)
@@ -208,5 +208,5 @@
      * List of unmaintained plugins. Not really up-to-date as the vast majority of plugins are not maintained after a few months, sadly...
      */
-    private static final String [] UNMAINTAINED_PLUGINS = new String[] {"gpsbabelgui", "Intersect_way"};
+    private static final String[] UNMAINTAINED_PLUGINS = new String[] {"gpsbabelgui", "Intersect_way"};
 
     /**
@@ -360,5 +360,5 @@
         if (message == null) return false;
 
-        ButtonSpec [] options = new ButtonSpec[] {
+        ButtonSpec[] options = new ButtonSpec[] {
                 new ButtonSpec(
                         tr("Update plugins"),
@@ -984,5 +984,5 @@
                 // notify user if downloading a locally installed plugin failed
                 //
-                if (! pluginDownloadTask.getFailedPlugins().isEmpty()) {
+                if (!pluginDownloadTask.getFailedPlugins().isEmpty()) {
                     alertFailedPluginUpdate(parent, pluginDownloadTask.getFailedPlugins());
                     return plugins;
@@ -1010,5 +1010,5 @@
      */
     public static boolean confirmDisablePlugin(Component parent, String reason, String name) {
-        ButtonSpec [] options = new ButtonSpec[] {
+        ButtonSpec[] options = new ButtonSpec[] {
                 new ButtonSpec(
                         tr("Disable plugin"),
@@ -1075,5 +1075,5 @@
     public static void installDownloadedPlugins(boolean dowarn) {
         File pluginDir = Main.pref.getPluginsDirectory();
-        if (! pluginDir.exists() || ! pluginDir.isDirectory() || ! pluginDir.canWrite())
+        if (!pluginDir.exists() || !pluginDir.isDirectory() || !pluginDir.canWrite())
             return;
 
@@ -1276,5 +1276,5 @@
         );
         final PluginInformation pluginInfo = plugin.getPluginInformation();
-        if (! plugins.contains(pluginInfo.name))
+        if (!plugins.contains(pluginInfo.name))
             // plugin not activated ? strange in this context but anyway, don't bother
             // the user with dialogs, skip conditional deactivation
Index: trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 8443)
@@ -317,5 +317,5 @@
         List<File> siteCacheFiles = new LinkedList<>();
         for (String location : PluginInformation.getPluginLocations()) {
-            File [] f = new File(location).listFiles(
+            File[] f = new File(location).listFiles(
                     new FilenameFilter() {
                         @Override
Index: trunk/src/org/openstreetmap/josm/tools/CheckParameterUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/CheckParameterUtil.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/tools/CheckParameterUtil.java	(revision 8443)
@@ -111,5 +111,5 @@
     public static void ensureValidNodeId(PrimitiveId id, String parameterName) throws IllegalArgumentException {
         ensureParameterNotNull(id, parameterName);
-        if (! id.getType().equals(OsmPrimitiveType.NODE))
+        if (!id.getType().equals(OsmPrimitiveType.NODE))
             throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' of type node expected, got ''{1}''", parameterName, id.getType().getAPIName()));
     }
Index: trunk/src/org/openstreetmap/josm/tools/ColorScale.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ColorScale.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/tools/ColorScale.java	(revision 8443)
@@ -38,7 +38,7 @@
         ColorScale sc = new ColorScale();
         //                    red   yellow  green   blue    red
-        int[] h = new int[] { 0,    59,     127,    244,    360};
-        int[] s = new int[] { 100,  84,     99,     100 };
-        int[] b = new int[] { 90,   93,     74,     83 };
+        int[] h = new int[] {0,    59,     127,    244,    360};
+        int[] s = new int[] {100,  84,     99,     100};
+        int[] b = new int[] {90,   93,     74,     83};
 
         sc.colors = new Color[count];
Index: trunk/src/org/openstreetmap/josm/tools/Diff.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 8443)
@@ -97,5 +97,5 @@
     public Diff(Object[] a, Object[] b) {
         Map<Object,Integer> h = new HashMap<>(a.length + b.length);
-        filevec = new FileData[] { new FileData(a,h),new FileData(b,h) };
+        filevec = new FileData[] {new FileData(a,h), new FileData(b,h)};
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 8443)
@@ -298,5 +298,5 @@
         if (Math.abs(det) > 1e-12 * mag) {
             double u = uu/det, v = vv/det;
-            if (u>-1e-8 && u < 1+1e-8 && v>-1e-8 && v < 1+1e-8 ) {
+            if (u>-1e-8 && u < 1+1e-8 && v>-1e-8 && v < 1+1e-8) {
                 if (u<0) u=0;
                 if (u>1) u=1.0;
@@ -355,5 +355,5 @@
             return null; // Lines are parallel
 
-        return new EastNorth(b1 * c2 / det + p1.getX(),  - a1 * c2 / det + p1.getY());
+        return new EastNorth(b1 * c2 / det + p1.getX(), -a1 * c2 / det + p1.getY());
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 8443)
@@ -721,10 +721,10 @@
             String[] extensions;
             if (name.indexOf('.') != -1) {
-                extensions = new String[] { "" };
+                extensions = new String[] {""};
             } else {
-                extensions = new String[] { ".png", ".svg"};
+                extensions = new String[] {".png", ".svg"};
             }
             final int ARCHIVE = 0, LOCAL = 1;
-            for (int place : new Integer[] { ARCHIVE, LOCAL }) {
+            for (int place : new Integer[] {ARCHIVE, LOCAL}) {
                 for (String ext : extensions) {
 
Index: trunk/src/org/openstreetmap/josm/tools/Shortcut.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 8443)
@@ -415,5 +415,5 @@
                 // Try to reassign Meta to Ctrl
                 int newmodifier = findNewOsxModifier(requestedGroup);
-                if ( findShortcut(requestedKey, newmodifier) == null ) {
+                if (findShortcut(requestedKey, newmodifier) == null) {
                     return reassignShortcut(shortText, longText, requestedKey, conflict, requestedGroup, requestedKey, newmodifier);
                 }
@@ -422,5 +422,5 @@
                 for (int k : keys) {
                     int newmodifier = getGroupModifier(m);
-                    if ( findShortcut(k, newmodifier) == null ) {
+                    if (findShortcut(k, newmodifier) == null) {
                         return reassignShortcut(shortText, longText, requestedKey, conflict, m, k, newmodifier);
                     }
Index: trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 8443)
@@ -132,5 +132,5 @@
             while (pos < n) {
                 c = data.charAt(pos);
-                if (c == '\t' || c == '\n' || c == '\r' || c == ' ' ) {
+                if (c == '\t' || c == '\n' || c == '\r' || c == ' ') {
                     pos++;
                 } else {
@@ -142,5 +142,5 @@
 
     protected static String unescape(String k) {
-        if(! (k.startsWith("\"") && k.endsWith("\"")) ) {
+        if (!(k.startsWith("\"") && k.endsWith("\""))) {
             if (k.contains("=")) {
                 // '=' not in quotes will be treated as an error!
@@ -220,5 +220,6 @@
         String bufJson = buf.trim();
         // trim { }, if there are any
-        if (bufJson.startsWith("{") && bufJson.endsWith("}") ) bufJson = bufJson.substring(1,bufJson.length()-1);
+        if (bufJson.startsWith("{") && bufJson.endsWith("}"))
+            bufJson = bufJson.substring(1, bufJson.length()-1);
         tags = readTagsByRegexp(bufJson, "[\\s]*,[\\s]*",
                 "[\\s]*(\\\".*?[^\\\\]\\\")"+"[\\s]*:[\\s]*"+"(\\\".*?[^\\\\]\\\")[\\s]*", true);
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8443)
@@ -421,5 +421,5 @@
      */
     public static boolean deleteDirectory(File path) {
-        if( path.exists() ) {
+        if (path.exists()) {
             File[] files = path.listFiles();
             if (files != null) {
Index: trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 8442)
+++ trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 8443)
@@ -68,5 +68,5 @@
     public static WindowGeometry centerInWindow(Component reference, Dimension extent) {
         Window parentWindow = null;
-        while(reference != null && ! (reference instanceof Window) ) {
+        while (reference != null && !(reference instanceof Window)) {
             reference = reference.getParent();
         }
