Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 8342)
@@ -916,6 +916,5 @@
             try {
                 UIManager.setLookAndFeel(laf);
-            }
-            catch (final NoClassDefFoundError | ClassNotFoundException e) {
+            } catch (final NoClassDefFoundError | ClassNotFoundException e) {
                 // Try to find look and feel in plugin classloaders
                 Class<?> klass = null;
@@ -938,6 +937,5 @@
                     Main.pref.put("laf", defaultlaf);
                 }
-            }
-            catch (final UnsupportedLookAndFeelException e) {
+            } catch (final UnsupportedLookAndFeelException e) {
                 info("Look and Feel not supported: " + laf);
                 Main.pref.put("laf", defaultlaf);
Index: trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 8342)
@@ -119,6 +119,5 @@
                     tree.getSelectedLayers(), (String) formats.getSelectedItem());
             return new ImageryInfo(info.getName(), url, "wms", info.getEulaAcceptanceRequired(), info.getCookies());
-        } // exception handling from AddWMSLayerPanel.java
-        catch (MalformedURLException ex) {
+        } catch (MalformedURLException ex) {
             JOptionPane.showMessageDialog(Main.parent, tr("Invalid service URL."),
                     tr("WMS Error"), JOptionPane.ERROR_MESSAGE);
Index: trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 8342)
@@ -171,19 +171,18 @@
         try {
             Command cmd = null;
-            //// Decide what to align based on selection:
-
-            /// Only ways selected -> For each way align their nodes taking care of intersection
+            // Decide what to align based on selection:
+
             if(selectedNodes.isEmpty() && !selectedWays.isEmpty()) {
+                // Only ways selected -> For each way align their nodes taking care of intersection
                 cmd = alignMultiWay(selectedWays);
-            }
-            /// Only 1 node selected -> align this node relative to referers way
-            else if(selectedNodes.size() == 1) {
+            } else if(selectedNodes.size() == 1) {
+                // Only 1 node selected -> align this node relative to referers way
                 Node selectedNode = selectedNodes.get(0);
                 List<Way> involvedWays = null;
                 if(selectedWays.isEmpty())
-                    /// No selected way, all way containing this node are used
+                    // No selected way, all way containing this node are used
                     involvedWays = OsmPrimitive.getFilteredList(selectedNode.getReferrers(), Way.class);
                 else
-                    /// Selected way, use only these ways
+                    // Selected way, use only these ways
                     involvedWays = selectedWays;
                 List<Line> lines = getInvolvedLines(selectedNode, involvedWays);
@@ -191,11 +190,9 @@
                     throw new InvalidSelection();
                 cmd = alignSingleNode(selectedNodes.get(0), lines);
-            }
-            // More than 3 nodes and way(s) selected -> align selected nodes. Don't care of way(s).
-            else if(selectedNodes.size() >= 3) {
+            } else if(selectedNodes.size() >= 3) {
+                // More than 3 nodes and way(s) selected -> align selected nodes. Don't care of way(s).
                 cmd = alignOnlyNodes(selectedNodes);
-            }
-            /// All others cases are invalid
-            else {
+            } else {
+                // All others cases are invalid
                 throw new InvalidSelection();
             }
@@ -257,10 +254,8 @@
                 if(n == way.firstNode() || n == way.lastNode()) continue;
                 cmds.add(lines.get(way).projectionCommand(n));
-            }
-            else if(referers.size() == 2) {
+            } else if(referers.size() == 2) {
                 Command cmd = lines.get(referers.get(0)).intersectionCommand(n, lines.get(referers.get(1)));
                 cmds.add(cmd);
-            }
-            else
+            } else
                 throw new InvalidSelection(tr("Intersection of three or more ways can not be solved. Abort."));
         }
Index: trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 8342)
@@ -150,6 +150,5 @@
                         nodes.add(way.way.getNode(pos));
                     }
-                }
-                else {
+                } else {
                     for (int pos = way.way.getNodesCount() - 1; pos > 0; pos--) {
                         nodes.add(way.way.getNode(pos));
@@ -1292,6 +1291,5 @@
                     outerWays.add(rm.getWay());
                     hasKnownOuter |= selectedWays.contains(rm.getWay());
-                }
-                else if ("inner".equalsIgnoreCase(rm.getRole())) {
+                } else if ("inner".equalsIgnoreCase(rm.getRole())) {
                     innerWays.add(rm.getWay());
                 }
Index: trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 8342)
@@ -114,6 +114,5 @@
                     Main.map.repaint();
                 } else throw new InvalidUserInputException();
-            }
-            catch (InvalidUserInputException ex) {
+            } catch (InvalidUserInputException ex) {
                 new Notification(
                         tr("Orthogonalize Shape / Undo<br>"+
@@ -154,6 +153,5 @@
                 if (p instanceof Node) {
                     nodeList.add((Node) p);
-                }
-                else if (p instanceof Way) {
+                } else if (p instanceof Way) {
                     wayDataList.add(new WayData((Way) p));
                 } else
@@ -169,6 +167,5 @@
                     if (nodeList.size() == 2) {  // fixed direction
                         commands.addAll(orthogonalize(wayDataList, nodeList));
-                    }
-                    else if (nodeList.isEmpty()) {
+                    } else if (nodeList.isEmpty()) {
                         List<List<WayData>> groups = buildGroups(wayDataList);
                         for (List<WayData> g: groups) {
@@ -267,6 +264,5 @@
                 }
                 headingAll = EN.polar(new EastNorth(0., 0.), totSum);
-            }
-            else {
+            } else {
                 headingAll = EN.polar(headingNodes.get(0).getEastNorth(), headingNodes.get(1).getEastNorth());
                 for (WayData w : wayDataList) {
@@ -392,6 +388,5 @@
                         Math.abs(dy) > Math.abs(EPSILON * tmp.east()))
                     throw new AssertionError();
-            }
-            else {
+            } else {
                 OrthogonalizeAction.rememberMovements.put(n, new EastNorth(dx, dy));
                 commands.add(new MoveCommand(n, dx, dy));
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 8342)
@@ -529,6 +529,5 @@
                     // double click adds a new node
                     addNewNode(e);
-                }
-                else if (e.getPoint().distance(initialMousePos) > initialMoveThreshold && newN1en != null && selectedSegment != null) {
+                } else if (e.getPoint().distance(initialMousePos) > initialMoveThreshold && newN1en != null && selectedSegment != null) {
                     // main extrusion commands
                     performExtrusion();
@@ -1177,6 +1176,5 @@
 
             return new Line2D.Double(start, new Point2D.Double(start.getX() + (unitvector.getX() * linelength) , start.getY() + (unitvector.getY() * linelength)));
-        }
-        catch (NoninvertibleTransformException e) {
+        } catch (NoninvertibleTransformException e) {
             return new Line2D.Double(start, new Point2D.Double(start.getX() + (unitvector.getX() * 10) , start.getY() + (unitvector.getY() * 10)));
         }
Index: trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 8342)
@@ -97,6 +97,5 @@
                         // new value is null and tag exists (will delete tag)
                         modified = true;
-                }
-                else if (oldVal == null || !newVal.equals(oldVal))
+                } else if (oldVal == null || !newVal.equals(oldVal))
                     // new value is not null and is different from current value
                     modified = true;
@@ -121,6 +120,5 @@
                         if (oldVal != null)
                             osm.remove(tag.getKey());
-                    }
-                    else if (oldVal == null || !newVal.equals(oldVal))
+                    } else if (oldVal == null || !newVal.equals(oldVal))
                         osm.put(tag.getKey(), newVal);
                 }
@@ -130,6 +128,5 @@
             }
             return true;
-        }
-        finally {
+        } finally {
             Main.main.getCurrentDataSet().endUpdate();
         }
@@ -171,6 +168,5 @@
                 text = trn("Set {0}={1} for {2} object", "Set {0}={1} for {2} objects", objects.size(), entry.getKey(), entry.getValue(), objects.size());
             }
-        }
-        else {
+        } else {
             boolean allnull = true;
             for (Map.Entry<String, String> tag : this.tags.entrySet()) {
Index: trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java	(revision 8342)
@@ -96,6 +96,5 @@
                 }
             }
-        }
-        finally {
+        } finally {
             Main.main.getCurrentDataSet().endUpdate();
         }
Index: trunk/src/org/openstreetmap/josm/data/osm/User.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/User.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/data/osm/User.java	(revision 8342)
@@ -228,6 +228,5 @@
         if (names.size() == 1) {
             s.append(" name:").append(getName());
-        }
-        else if (names.size() > 1) {
+        } else if (names.size() > 1) {
             s.append(String.format(" %d names:%s", names.size(), getName()));
         }
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java	(revision 8342)
@@ -72,9 +72,7 @@
                 accept = true;
                 done = true;
-            }
-            else if ( (outcode0 & outcode1) > 0 ) {
+            } else if ( (outcode0 & outcode1) > 0 ) {
                 done = true;
-            }
-            else {
+            } else {
                 long x = 0, y = 0;
                 outcodeOut = outcode0 != 0 ? outcode0: outcode1;
@@ -82,14 +80,11 @@
                     x = x1 + (x2 - x1) * (ymax - y1)/(y2 - y1);
                     y = ymax;
-                }
-                else if ((outcodeOut & OUT_BOTTOM) > 0 ) {
+                } else if ((outcodeOut & OUT_BOTTOM) > 0 ) {
                     x = x1 + (x2 - x1) * (ymin - y1)/(y2 - y1);
                     y = ymin;
-                }
-                else if ((outcodeOut & OUT_RIGHT)> 0) {
+                } else if ((outcodeOut & OUT_RIGHT)> 0) {
                     y = y1 + (y2 - y1) * (xmax - x1)/(x2 - x1);
                     x = xmax;
-                }
-                else if ((outcodeOut & OUT_LEFT) > 0) {
+                } else if ((outcodeOut & OUT_LEFT) > 0) {
                     y = y1 + (y2 - y1) * (xmin - x1)/(x2 - x1);
                     x = xmin;
@@ -124,12 +119,10 @@
         if (y > ymax) {
             code |= OUT_TOP;
-        }
-        else if (y < ymin) {
+        } else if (y < ymin) {
             code |= OUT_BOTTOM;
         }
         if (x > xmax) {
             code |= OUT_RIGHT;
-        }
-        else if (x < xmin) {
+        } else if (x < xmin) {
             code |= OUT_LEFT;
         }
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 8342)
@@ -946,12 +946,9 @@
 
         Node viaNode;
-        if(via instanceof Node)
-        {
+        if(via instanceof Node) {
             viaNode = (Node) via;
             if(!fromWay.isFirstLastNode(viaNode))
                 return;
-        }
-        else
-        {
+        } else {
             Way viaWay = (Way) via;
             Node firstNode = viaWay.firstNode();
@@ -960,6 +957,5 @@
 
             String onewayviastr = viaWay.get("oneway");
-            if(onewayviastr != null)
-            {
+            if(onewayviastr != null) {
                 if("-1".equals(onewayviastr)) {
                     onewayvia = true;
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java	(revision 8342)
@@ -189,6 +189,5 @@
                 errors.add(new TestError(this, Severity.ERROR, tr("Unordered coastline"),
                         UNORDERED_COASTLINE, primitives, highlight));
-            }
-            else if (reversed) {
+            } else if (reversed) {
                 errors.add(new TestError(this, Severity.ERROR, tr("Reversed coastline"),
                         REVERSED_COASTLINE, primitives));
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java	(revision 8342)
@@ -132,6 +132,5 @@
                             type = OVERLAPPING_WAY_AREA;
                         }
-                    }
-                    else if (highway == ways) {
+                    } else if (highway == ways) {
                         errortype = tr("Overlapping highways");
                         type = OVERLAPPING_HIGHWAY;
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 8342)
@@ -323,6 +323,5 @@
                 errors.add(new TestError(this, Severity.WARNING, ROLE_VERIF_PROBLEM_MSG,
                         tr(s, keyname), MessageFormat.format(s, keyname), ROLE_MISSING, n));
-            }
-            else if (vc > count) {
+            } else if (vc > count) {
                 String s = marktr("Number of {0} roles too low ({1})");
                 errors.add(new TestError(this, Severity.WARNING, ROLE_VERIF_PROBLEM_MSG,
Index: trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 8342)
@@ -168,6 +168,5 @@
                         before street for better visibility */
                             n =  tr("House number {0} at {1}", s, t);
-                        }
-                        else {
+                        } else {
                             /* I18n: house number as parameter */
                             n = tr("House number {0}", s);
@@ -267,6 +266,5 @@
                         before street for better visibility */
                             n =  tr("House number {0} at {1}", s, t);
-                        }
-                        else {
+                        } else {
                             /* I18n: house number as parameter */
                             n = tr("House number {0}", s);
Index: trunk/src/org/openstreetmap/josm/gui/FileDrop.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 8342)
@@ -34,4 +34,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.OpenFileAction;
+import org.openstreetmap.josm.gui.FileDrop.TransferableObject;
 
 /**
@@ -75,6 +76,6 @@
  * @since 1231
  */
-public class FileDrop
-{
+public class FileDrop {
+
     private Border normalBorder;
     private DropTargetListener dropListener;
@@ -123,164 +124,153 @@
             final Border dragBorder,
             final boolean recursive,
-            final Listener listener)
-    {
-
-        if( supportsDnD() )
-        {   // Make a drop listener
-            dropListener = new DropTargetListener()
-            {   @Override
-                public void dragEnter( DropTargetDragEvent evt )
-            {       Main.trace("FileDrop: dragEnter event." );
-
-            // Is this an acceptable drag event?
-            if( isDragOk( evt ) )
-            {
-                // If it's a Swing component, set its border
-                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." );
-                }   // end if: JComponent
-
-                // Acknowledge that it's okay to enter
-                evt.acceptDrag( DnDConstants.ACTION_COPY );
-                Main.trace("FileDrop: event accepted." );
-            }   // end if: drag ok
-            else
-            {   // Reject the drag event
-                evt.rejectDrag();
-                Main.trace("FileDrop: event rejected." );
-            }   // end else: drag not ok
-            }   // end dragEnter
-
-            @Override
-            public void dragOver( DropTargetDragEvent evt )
-            {   // This is called continually as long as the mouse is
-                // over the drag target.
-            }   // end dragOver
-
-            @Override
-            public void drop( DropTargetDropEvent evt )
-            {   Main.trace("FileDrop: drop event." );
-            try
-            {   // Get whatever was dropped
-                Transferable tr = evt.getTransferable();
-
-                // Is it a file list?
-                if (tr.isDataFlavorSupported (DataFlavor.javaFileListFlavor))
-                {
-                    // Say we'll take it.
-                    evt.acceptDrop ( DnDConstants.ACTION_COPY );
-                    Main.trace("FileDrop: file list accepted." );
-
-                    // Get a useful list
-                    List<?> fileList = (List<?>)tr.getTransferData(DataFlavor.javaFileListFlavor);
-
-                    // Convert list to array
-                    final File[] files = fileList.toArray(new File[fileList.size()]);
-
-                    // Alert listener to drop.
-                    if( listener != null ) {
-                        listener.filesDropped( files );
+            final Listener listener) {
+
+        if( supportsDnD() ) {
+            // Make a drop listener
+            dropListener = new DropTargetListener() {
+                @Override
+                public void dragEnter( DropTargetDragEvent evt ) {
+                    Main.trace("FileDrop: dragEnter event." );
+
+                    // Is this an acceptable drag event?
+                    if( isDragOk( evt ) ) {
+                        // If it's a Swing component, set its border
+                        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." );
+                        }
+
+                        // Acknowledge that it's okay to enter
+                        evt.acceptDrag( DnDConstants.ACTION_COPY );
+                        Main.trace("FileDrop: event accepted." );
+                    } else {
+                        // Reject the drag event
+                        evt.rejectDrag();
+                        Main.trace("FileDrop: event rejected." );
                     }
-
-                    // Mark that drop is completed.
-                    evt.getDropTargetContext().dropComplete(true);
-                    Main.trace("FileDrop: drop complete." );
-                }   // end if: file list
-                else // this section will check for a reader flavor.
-                {
-                    // Thanks, Nathan!
-                    // BEGIN 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
-                    DataFlavor[] flavors = tr.getTransferDataFlavors();
-                    boolean handled = false;
-                    for (DataFlavor flavor : flavors) {
-                        if (flavor.isRepresentationClassReader()) {
+                }
+
+                @Override
+                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." );
+                    try {
+                        // Get whatever was dropped
+                        Transferable tr = evt.getTransferable();
+
+                        // Is it a file list?
+                        if (tr.isDataFlavorSupported (DataFlavor.javaFileListFlavor)) {
+
                             // Say we'll take it.
-                            evt.acceptDrop(DnDConstants.ACTION_COPY);
-                            Main.trace("FileDrop: reader accepted.");
-
-                            Reader reader = flavor.getReaderForText(tr);
-
-                            BufferedReader br = new BufferedReader(reader);
-
-                            if (listener != null) {
-                                listener.filesDropped(createFileArray(br));
+                            evt.acceptDrop ( DnDConstants.ACTION_COPY );
+                            Main.trace("FileDrop: file list accepted." );
+
+                            // Get a useful list
+                            List<?> fileList = (List<?>)tr.getTransferData(DataFlavor.javaFileListFlavor);
+
+                            // Convert list to array
+                            final File[] files = fileList.toArray(new File[fileList.size()]);
+
+                            // Alert listener to drop.
+                            if( listener != null ) {
+                                listener.filesDropped( files );
                             }
 
                             // Mark that drop is completed.
                             evt.getDropTargetContext().dropComplete(true);
-                            Main.trace("FileDrop: drop complete.");
-                            handled = true;
-                            break;
+                            Main.trace("FileDrop: drop complete." );
+                        } else {
+                            // this section will check for a reader flavor.
+                            // Thanks, Nathan!
+                            // BEGIN 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
+                            DataFlavor[] flavors = tr.getTransferDataFlavors();
+                            boolean handled = false;
+                            for (DataFlavor flavor : flavors) {
+                                if (flavor.isRepresentationClassReader()) {
+                                    // Say we'll take it.
+                                    evt.acceptDrop(DnDConstants.ACTION_COPY);
+                                    Main.trace("FileDrop: reader accepted.");
+
+                                    Reader reader = flavor.getReaderForText(tr);
+
+                                    BufferedReader br = new BufferedReader(reader);
+
+                                    if (listener != null) {
+                                        listener.filesDropped(createFileArray(br));
+                                    }
+
+                                    // Mark that drop is completed.
+                                    evt.getDropTargetContext().dropComplete(true);
+                                    Main.trace("FileDrop: drop complete.");
+                                    handled = true;
+                                    break;
+                                }
+                            }
+                            if(!handled){
+                                Main.trace("FileDrop: not a file list or reader - abort." );
+                                evt.rejectDrop();
+                            }
+                            // END 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
+                        }
+                    } catch (IOException | UnsupportedFlavorException e) {
+                        Main.warn("FileDrop: "+e.getClass().getSimpleName()+" - abort:" );
+                        Main.error(e);
+                        try {
+                            evt.rejectDrop();
+                        } catch (InvalidDnDOperationException ex) {
+                            // Catch InvalidDnDOperationException to fix #11259
+                            Main.error(ex);
+                        }
+                    } finally {
+                        // 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(!handled){
-                        Main.trace("FileDrop: not a file list or reader - abort." );
-                        evt.rejectDrop();
+                }
+
+                @Override
+                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." );
                     }
-                    // END 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
-                }   // end else: not a file list
-            }   // end try
-            catch (IOException | UnsupportedFlavorException e) {
-                Main.warn("FileDrop: "+e.getClass().getSimpleName()+" - abort:" );
-                Main.error(e);
-                try {
-                    evt.rejectDrop();
-                } catch (InvalidDnDOperationException ex) {
-                    // Catch InvalidDnDOperationException to fix #11259
-                    Main.error(ex);
-                }
-            } finally {
-                // 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." );
-                }   // end if: JComponent
-            }   // end finally
-            }   // end drop
-
-            @Override
-            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." );
-            }   // end if: JComponent
-            }   // end dragExit
-
-            @Override
-            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." );
-            }   // end if: drag ok
-            else
-            {   evt.rejectDrag();
-            Main.debug("FileDrop: event rejected." );
-            }   // end else: drag not ok
-            }   // end dropActionChanged
-            }; // end DropTargetListener
+                }
+
+                @Override
+                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." );
+                    } else {
+                        evt.rejectDrag();
+                        Main.debug("FileDrop: event rejected." );
+                    }
+                }
+            };
 
             // Make the component (and possibly children) drop targets
             makeDropTarget( c, recursive );
-        }   // end if: supports dnd
-        else
-        {   Main.info("FileDrop: Drag and drop is not supported with this JVM" );
-        }   // end else: does not support DnD
-    }   // end constructor
-
-    private static synchronized boolean supportsDnD()
-    {   // Static Boolean
-        if( supportsDnD == null )
-        {
+        } else {
+            Main.info("FileDrop: Drag and drop is not supported with this JVM" );
+        }
+    }
+
+    private static synchronized boolean supportsDnD() {
+        if( supportsDnD == null ) {
             boolean support = false;
             try {
@@ -291,12 +281,11 @@
             }
             supportsDnD = support;
-        }   // end if: first time through
+        }
         return supportsDnD.booleanValue();
-    }   // end supportsDnD
+    }
 
     // BEGIN 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
     private static final String ZERO_CHAR_STRING = "" + (char)0;
-    private static File[] createFileArray(BufferedReader bReader)
-    {
+    private static File[] createFileArray(BufferedReader bReader) {
         try {
             List<File> list = new ArrayList<>();
@@ -324,38 +313,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 );
-        }   // end try
-        catch( TooManyListenersException e )
-        {   Main.error(e);
-        Main.warn("FileDrop: Drop will not work due to previous error. Do you have another listener attached?" );
-        }   // end catch
+        try {
+            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?" );
+        }
 
         // Listen for hierarchy changes and remove the drop target when the parent gets cleared out.
-        c.addHierarchyListener( new HierarchyListener()
-        {   @Override
-            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." );
-        }   // end if: null parent
-        else
-        {   new DropTarget(c, dropListener);
-        Main.trace("FileDrop: Drop target added to component." );
-        }   // end else: parent not null
-        }   // end hierarchyChanged
-        }); // end hierarchy listener
+        c.addHierarchyListener( new HierarchyListener() {
+            @Override
+            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." );
+                } else {
+                    new DropTarget(c, dropListener);
+                    Main.trace("FileDrop: Drop target added to component." );
+                }
+            }
+        });
         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;
@@ -368,39 +353,38 @@
                 makeDropTarget( comp, recursive);
             }
-        }   // end if: recursively set components as listener
-    }   // end dropListener
+        }
+    }
 
     /** Determine if the dragged data is a file list. */
-    private boolean isDragOk( final DropTargetDragEvent evt )
-    {   boolean ok = false;
-
-    // Get data flavors being dragged
-    DataFlavor[] flavors = evt.getCurrentDataFlavors();
-
-    // See if any of the flavors are a file list
-    int i = 0;
-    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 ) ||
-                curFlavor.isRepresentationClassReader()){
-            ok = true;
-        }
-        // END 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
-        i++;
-    }   // end while: through flavors
-
-    // 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() );
-    }
-
-    return ok;
-    }   // end isDragOk
+    private boolean isDragOk( final DropTargetDragEvent evt ) {
+        boolean ok = false;
+
+        // Get data flavors being dragged
+        DataFlavor[] flavors = evt.getCurrentDataFlavors();
+
+        // See if any of the flavors are a file list
+        int i = 0;
+        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 ) ||
+                    curFlavor.isRepresentationClassReader()){
+                ok = true;
+            }
+            // END 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
+            i++;
+        }
+
+        // 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() );
+        }
+
+        return ok;
+    }
 
     /**
@@ -414,7 +398,7 @@
      * @return {@code true} if at least one item has been removed, {@code false} otherwise
      */
-    public static boolean remove( Component c)
-    {   return remove( c, true );
-    }   // end remove
+    public static boolean remove( Component c) {
+        return remove( c, true );
+    }
 
     /**
@@ -427,6 +411,6 @@
      * @return {@code true} if at least one item has been removed, {@code false} otherwise
      */
-    public static boolean remove( Component c, boolean recursive )
-    {   // Make sure we support dnd.
+    public static boolean remove( Component c, boolean recursive ) {
+        // Make sure we support dnd.
         if (supportsDnD()) {
             Main.trace("FileDrop: Removing drag-and-drop hooks.");
@@ -437,9 +421,9 @@
                 }
                 return true;
-            }   // end if: recursive
-            else return false;
-        }   // end if: supports DnD
-        else return false;
-    }   // end remove
+            } else
+                return false;
+        } else
+            return false;
+    }
 
     /* ********  I N N E R   I N T E R F A C E   L I S T E N E R  ******** */
@@ -466,6 +450,5 @@
          */
         public abstract void filesDropped( File[] files );
-
-    }   // end inner-interface Listener
+    }
 
     /* ********  I N N E R   C L A S S  ******** */
@@ -545,8 +528,8 @@
          * @param data The data to transfer
          */
-        public TransferableObject( Object data )
-        {   this.data = data;
+        public TransferableObject( Object data ) {
+            this.data = data;
             this.customFlavor = new DataFlavor( data.getClass(), MIME_TYPE );
-        }   // end constructor
+        }
 
         /**
@@ -559,7 +542,7 @@
          * @param fetcher The {@link Fetcher} that will return the data object
          */
-        public TransferableObject( Fetcher fetcher )
-        {   this.fetcher = fetcher;
-        }   // end constructor
+        public TransferableObject( Fetcher fetcher ) {
+            this.fetcher = fetcher;
+        }
 
         /**
@@ -575,8 +558,8 @@
          * @param fetcher The {@link Fetcher} that will return the data object
          */
-        public TransferableObject(Class<?> dataClass, Fetcher fetcher )
-        {   this.fetcher = fetcher;
-        this.customFlavor = new DataFlavor( dataClass, MIME_TYPE );
-        }   // end constructor
+        public TransferableObject(Class<?> dataClass, Fetcher fetcher ) {
+            this.fetcher = fetcher;
+            this.customFlavor = new DataFlavor( dataClass, MIME_TYPE );
+        }
 
         /**
@@ -587,7 +570,7 @@
          * @return The custom data flavor for the encapsulated object
          */
-        public DataFlavor getCustomDataFlavor()
-        {   return customFlavor;
-        }   // end getCustomDataFlavor
+        public DataFlavor getCustomDataFlavor() {
+            return customFlavor;
+        }
 
         /* ********  T R A N S F E R A B L E   M E T H O D S  ******** */
@@ -603,18 +586,15 @@
          */
         @Override
-        public DataFlavor[] getTransferDataFlavors()
-        {
+        public DataFlavor[] getTransferDataFlavors() {
             if( customFlavor != null )
-                return new DataFlavor[]
-                                                            {   customFlavor,
+                return new DataFlavor[] {
+                    customFlavor,
                     DATA_FLAVOR,
-                    DataFlavor.stringFlavor
-                                                            };  // end flavors array
+                    DataFlavor.stringFlavor};
             else
-                return new DataFlavor[]
-                                                            {   DATA_FLAVOR,
-                    DataFlavor.stringFlavor
-                                                            };  // end flavors array
-        }   // end getTransferDataFlavors
+                return new DataFlavor[] {
+                    DATA_FLAVOR,
+                    DataFlavor.stringFlavor};
+        }
 
         /**
@@ -630,6 +610,5 @@
         @Override
         public Object getTransferData( DataFlavor flavor )
-        throws UnsupportedFlavorException, IOException
-        {
+        throws UnsupportedFlavorException, IOException {
             // Native object
             if( flavor.equals( DATA_FLAVOR ) )
@@ -640,7 +619,7 @@
                 return fetcher == null ? data.toString() : fetcher.getObject().toString();
 
-                // We can't do anything else
-                throw new UnsupportedFlavorException(flavor);
-        }   // end getTransferData
+            // We can't do anything else
+            throw new UnsupportedFlavorException(flavor);
+        }
 
         /**
@@ -652,6 +631,5 @@
          */
         @Override
-        public boolean isDataFlavorSupported( DataFlavor flavor )
-        {
+        public boolean isDataFlavorSupported( DataFlavor flavor ) {
             // Native object
             if( flavor.equals( DATA_FLAVOR ) )
@@ -664,5 +642,5 @@
             // We can't do anything else
             return false;
-        }   // end isDataFlavorSupported
+        }
 
         /* ********  I N N E R   I N T E R F A C E   F E T C H E R  ******** */
@@ -678,6 +656,5 @@
          * @author Robert Harder
          */
-        public static interface Fetcher
-        {
+        public static interface Fetcher {
             /**
              * Return the object being encapsulated in the
@@ -687,7 +664,5 @@
              */
             public abstract Object getObject();
-        }   // end inner interface Fetcher
-
-    }   // end class TransferableObject
-
-}   // end class FileDrop
+        }
+    }
+}
Index: trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 8342)
@@ -432,8 +432,8 @@
         double lat = cl.lat();
         double lon = cl.lon();
-        if(lat < b.getMinLat()) {changed = true; lat = b.getMinLat(); }
-        else if(lat > b.getMaxLat()) {changed = true; lat = b.getMaxLat(); }
-        if(lon < b.getMinLon()) {changed = true; lon = b.getMinLon(); }
-        else if(lon > b.getMaxLon()) {changed = true; lon = b.getMaxLon(); }
+        if(lat < b.getMinLat()) {changed = true; lat = b.getMinLat();
+        } else if(lat > b.getMaxLat()) {changed = true; lat = b.getMaxLat(); }
+        if(lon < b.getMinLon()) {changed = true; lon = b.getMinLon();
+        } else if(lon > b.getMaxLon()) {changed = true; lon = b.getMaxLon(); }
         if(changed) {
             newCenter = Projections.project(new LatLon(lat,lon));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java	(revision 8342)
@@ -137,6 +137,5 @@
                 p.add(dlg, 0);
                 p.setVisible(true);
-            }
-            else if (dlg.isDialogInCollapsedView()) {
+            } else if (dlg.isDialogInCollapsedView()) {
                 p.add(dlg, 0);
                 p.setVisible(true);
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 8342)
@@ -399,6 +399,6 @@
             setMinimumSize(new Dimension(Integer.MAX_VALUE,20));
             titleBar.lblMinimized.setIcon(ImageProvider.get("misc", "minimized"));
-        }
-        else throw new IllegalStateException();
+        } else
+            throw new IllegalStateException();
     }
 
@@ -413,6 +413,6 @@
             setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
             titleBar.lblMinimized.setIcon(ImageProvider.get("misc", "normal"));
-        }
-        else throw new IllegalStateException();
+        } else
+            throw new IllegalStateException();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 8342)
@@ -791,7 +791,6 @@
                     tagTable.clearSelection();
                 }
-            }
-            // double click, edit or add tag
-            else if (e.getSource() == tagTable) {
+            } else if (e.getSource() == tagTable) {
+                // double click, edit or add tag
                 int row = tagTable.rowAtPoint(e.getPoint());
                 if (row > -1) {
@@ -807,6 +806,5 @@
                     editMembership(row);
                 }
-            }
-            else {
+            } else {
                 editHelper.addTag();
                 btnAdd.requestFocusInWindow();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java	(revision 8342)
@@ -79,6 +79,5 @@
                 g.drawImage(corners,xoff+xloop-2,y1-3,xoff+xloop+1,y1, 2,0,5,3, new Color(0,0,0,0), null);
                 g.drawLine(xoff+3,y1-3,xoff+xloop-3,y1-3);
-            }
-            else {
+            } else {
                 g.setColor(Color.red);
                 if(value.isOnewayHead) {
@@ -107,6 +106,5 @@
                 g.drawImage(corners,xoff+xloop-2,y2+1,xoff+xloop+1,y2+4, 2,2,5,5, new Color(0,0,0,0), null);
                 g.drawLine(xoff+3-1,y2+3,xoff+xloop-3,y2+3);
-            }
-            else {
+            } else {
                 g.setColor(Color.red);
                 if(value.isOnewayTail) {
Index: trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 8342)
@@ -162,6 +162,5 @@
                 try {
                     bookmarks.add(new Bookmark(entry));
-                }
-                catch (Exception e) {
+                } catch (Exception e) {
                     Main.error(tr("Error reading bookmark entry: %s", e.getMessage()));
                 }
Index: trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 8342)
@@ -381,6 +381,5 @@
             );
             boundingBoxChanged(currentBounds,null);
-        }
-        else {
+        } else {
             Bounds bounds = getSavedDownloadBounds();
             if (bounds != null) {
Index: trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java	(revision 8342)
@@ -60,14 +60,11 @@
             Dimension iScreenSize = Toolkit.getDefaultToolkit().getScreenSize();
 
-            // enlarge
-            if(iDownloadDialogDimension == null) {
-                // make the each dimension 90% of the absolute display size
+            if (iDownloadDialogDimension == null) {
+                // enlarge: make the each dimension 90% of the absolute display size
                 w = iScreenSize.width * 90 / 100;
                 h = iScreenSize.height * 90 / 100;
                 iDownloadDialogDimension = iGui.getSize();
-            }
-            // shrink
-            else {
-                // set the size back to the initial dimensions
+            } else {
+                // shrink: set the size back to the initial dimensions
                 w = iDownloadDialogDimension.width;
                 h = iDownloadDialogDimension.height;
Index: trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java	(revision 8342)
@@ -320,24 +320,17 @@
         if (e instanceof OsmApiException) {
             OsmApiException ex = (OsmApiException)e;
-            // There was an upload conflict. Let the user decide whether
-            // and how to resolve it
-            //
             if(ex.getResponseCode() == HttpURLConnection.HTTP_CONFLICT) {
+                // There was an upload conflict. Let the user decide whether and how to resolve it
                 handleUploadConflict(ex);
                 return;
+            } else if (ex.getResponseCode() == HttpURLConnection.HTTP_PRECON_FAILED) {
+                // There was a precondition failed. Notify the user.
+                handlePreconditionFailed(ex);
+                return;
+            } else if (ex.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
+                // Tried to update or delete a primitive which never existed on the server?
+                ExceptionDialogUtil.explainNotFound(ex);
+                return;
             }
-            // There was a precondition failed. Notify the user.
-            //
-            else if (ex.getResponseCode() == HttpURLConnection.HTTP_PRECON_FAILED) {
-                handlePreconditionFailed(ex);
-                return;
-            }
-            // Tried to update or delete a primitive which never existed on
-            // the server?
-            //
-            else if (ex.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
-                ExceptionDialogUtil.explainNotFound(ex);
-                return;
-            }
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 8342)
@@ -499,6 +499,5 @@
                             tempG.drawImage(e.thumbnail, target.x, target.y, target.width, target.height, null);
                         }
-                    }
-                    else { // thumbnail not loaded yet
+                    } else { // thumbnail not loaded yet
                         icon.paintIcon(mv, tempG,
                                 p.x - icon.getIconWidth() / 2,
@@ -509,6 +508,5 @@
             }
             g.drawImage(offscreenBuffer, 0, 0, null);
-        }
-        else {
+        } else {
             for (ImageEntry e : data) {
                 if (e.getPos() == null) {
@@ -534,6 +532,5 @@
                     imgWidth = d.width;
                     imgHeight = d.height;
-                }
-                else {
+                } else {
                     imgWidth = selectedIcon.getIconWidth();
                     imgHeight = selectedIcon.getIconHeight();
@@ -694,6 +691,5 @@
                 cal.set(Calendar.MONTH, Integer.parseInt(dateStampComps[1]) - 1);
                 cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(dateStampComps[2]));
-            }
-            else {
+            } else {
                 // No GPS date stamp in EXIF data. Copy it from EXIF time.
                 // Date is not set if EXIF time is not available.
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 8342)
@@ -212,6 +212,5 @@
                     }
                     return new Marker(wpt.getCoor(), wpt, symbolName, parentLayer, time, offset);
-                }
-                else if (url.toString().endsWith(".wav")) {
+                } else if (url.toString().endsWith(".wav")) {
                     AudioMarker audioMarker = new AudioMarker(wpt.getCoor(), wpt, url, parentLayer, time, offset);
                     Extensions exts = (Extensions) wpt.get(GpxConstants.META_EXTENSIONS);
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 8342)
@@ -421,7 +421,5 @@
                         return previousMarker;
                     }
-                }
-                else if (marker.getClass() == AudioMarker.class)
-                {
+                } else if (marker.getClass() == AudioMarker.class) {
                     if(nextTime || startMarker == null)
                         return marker;
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 8342)
@@ -103,6 +103,6 @@
         wasPlaying = AudioPlayer.playing();
         if (wasPlaying) {
-            try { AudioPlayer.pause(); }
-            catch (Exception ex) { AudioPlayer.audioMalfunction(ex);}
+            try { AudioPlayer.pause();
+            } catch (Exception ex) { AudioPlayer.audioMalfunction(ex);}
         }
     }
@@ -113,6 +113,6 @@
     private void endDrag(boolean reset) {
         if (! wasPlaying || reset) {
-            try { AudioPlayer.pause(); }
-            catch (Exception ex) { AudioPlayer.audioMalfunction(ex);}
+            try { AudioPlayer.pause();
+            } catch (Exception ex) { AudioPlayer.audioMalfunction(ex);}
         }
         if (reset) {
@@ -243,6 +243,5 @@
                     );
             endDrag(true);
-        }
-        else if (recent.parentLayer.synchronizeAudioMarkers(ca)) {
+        } else if (recent.parentLayer.synchronizeAudioMarkers(ca)) {
             JOptionPane.showMessageDialog(
                     Main.parent,
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 8342)
@@ -274,7 +274,5 @@
             }
             return p;
-        }
-        else if (osm instanceof Relation)
-        {
+        } else if (osm instanceof Relation) {
             Pair<StyleList, Range> p = generateStyles(osm, scale, true);
             if (drawMultipolygon && ((Relation)osm).isMultipolygon()) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 8342)
@@ -170,14 +170,13 @@
                 throw new AssertionError("the new range must be within a subrange that has no data");
 
-            //  --|-------|--------|--
-            //   i-1      i       i+1
-            //            (--------]
             if (bd.get(i+1) == upper) {
+                //  --|-------|--------|--
+                //   i-1      i       i+1
+                //            (--------]
                 data.set(i, sl);
-            }
-            //  --|-------|--------|--
-            //   i-1      i       i+1
-            //            (-----]
-            else {
+            } else {
+                //  --|-------|--------|--
+                //   i-1      i       i+1
+                //            (-----]
                 bd.add(i+1, upper);
                 data.add(i, sl);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 8342)
@@ -394,6 +394,5 @@
                         }
                     }
-                }
-                else if (e.osm instanceof Relation) {
+                } else if (e.osm instanceof Relation) {
                     List<RelationMember> members = ((Relation) e.osm).getMembers();
                     for (int i=0; i<members.size(); i++) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 8342)
@@ -269,6 +269,5 @@
 
     public void add(XmlCondition c, Collection<XmlCondition> conditions, Prototype prot) {
-         if(conditions != null)
-         {
+         if(conditions != null) {
             prot.conditions = conditions;
             if (prot instanceof IconPrototype) {
@@ -282,6 +281,5 @@
             } else
                 throw new RuntimeException();
-         }
-         else {
+         } else {
              String key = c.getKey();
             prot.code = key;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 8342)
@@ -614,6 +614,5 @@
                         comp.setText(tr("Separator"));
                         comp.setIcon(ImageProvider.get("preferences/separator"));
-                    }
-                    else if (node.getUserObject() instanceof Action) {
+                    } else if (node.getUserObject() instanceof Action) {
                         Action action = (Action) node.getUserObject();
                         comp.setText((String) action.getValue(Action.NAME));
@@ -783,6 +782,5 @@
                         if (obj == null) {
                             dragActions.add(ActionDefinition.getSeparator());
-                        }
-                        else if (obj instanceof Action) {
+                        } else if (obj instanceof Action) {
                             dragActions.add(new ActionDefinition((Action) obj));
                         }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java	(revision 8342)
@@ -190,6 +190,5 @@
                 vn = 8;
             }
-        }
-        else {
+        } else {
             vn = 0;
         }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 8342)
@@ -148,7 +148,6 @@
                 // Alert user if plugin requirements are not met
                 PluginHandler.checkRequiredPluginsPreconditions(PluginListPanel.this, model.getAvailablePlugins(), cb.pi, false);
-            }
-            // If the plugin has been unselected, was it required by other plugins still selected ?
-            else if (!cb.isSelected()) {
+            } else if (!cb.isSelected()) {
+                // If the plugin has been unselected, was it required by other plugins still selected ?
                 Set<String> otherPlugins = new HashSet<>();
                 for (PluginInformation pi : model.getAvailablePlugins()) {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 8342)
@@ -648,6 +648,5 @@
                         // Ignore - cannot auto-increment if last was non-numeric
                     }
-                }
-                else if (!usage.hadKeys() || PROP_FILL_DEFAULT.get() || "force".equals(use_last_as_default)) {
+                } else if (!usage.hadKeys() || PROP_FILL_DEFAULT.get() || "force".equals(use_last_as_default)) {
                     // selected osm primitives are untagged or filling default values feature is enabled
                     if (!"false".equals(use_last_as_default) && LAST_VALUES.containsKey(key) && !presetInitiallyMatches) {
Index: trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java	(revision 8342)
@@ -252,6 +252,5 @@
             int dividerSize = getDividerSize();
             return new Dimension(dividerSize, dividerSize);
-        }
-        else {
+        } else {
             Split split = (Split)root;
             List<Node> splitChildren = split.getChildren();
@@ -264,6 +263,5 @@
                     height = Math.max(height, size.height);
                 }
-            }
-            else {
+            } else {
                 for(Node splitChild : splitChildren) {
                     Dimension size = preferredNodeSize(splitChild);
@@ -280,10 +278,8 @@
             Component child = childForNode(root);
             return (child != null) ? child.getMinimumSize() : new Dimension(0, 0);
-        }
-        else if (root instanceof Divider) {
+        } else if (root instanceof Divider) {
             int dividerSize = getDividerSize();
             return new Dimension(dividerSize, dividerSize);
-        }
-        else {
+        } else {
             Split split = (Split)root;
             List<Node> splitChildren = split.getChildren();
@@ -296,6 +292,5 @@
                     height = Math.max(height, size.height);
                 }
-            }
-            else {
+            } else {
                 for(Node splitChild : splitChildren) {
                     Dimension size = minimumNodeSize(splitChild);
@@ -347,6 +342,5 @@
             int lastChildMaxX = lastChildBounds.x + lastChildBounds.width;
             splitBounds.add(lastChildMaxX, bounds.y + bounds.height);
-        }
-        else {
+        } else {
             int lastChildMaxY = lastChildBounds.y + lastChildBounds.height;
             splitBounds.add(bounds.x + bounds.width, lastChildMaxY);
@@ -379,35 +373,31 @@
                 (totalWeightedWidth - minWeightedWidth) > extraWidth;
 
-                while(splitChildren.hasNext()) {
-                    Node splitChild = splitChildren.next();
-                    Rectangle splitChildBounds = splitChild.getBounds();
-                    double minSplitChildWidth = minimumNodeSize(splitChild).getWidth();
-                    double splitChildWeight = (onlyShrinkWeightedComponents)
-                    ? splitChild.getWeight()
-                            : (splitChildBounds.getWidth() / totalWidth);
-
-                    if (!splitChildren.hasNext()) {
-                        double newWidth =  Math.max(minSplitChildWidth, bounds.getMaxX() - x);
-                        Rectangle newSplitChildBounds = boundsWithXandWidth(bounds, x, newWidth);
-                        layout2(splitChild, newSplitChildBounds);
-                    }
-                    else if ((availableWidth > 0.0) && (splitChildWeight > 0.0)) {
-                        double allocatedWidth = Math.rint(splitChildWeight * extraWidth);
-                        double oldWidth = splitChildBounds.getWidth();
-                        double newWidth = Math.max(minSplitChildWidth, oldWidth - allocatedWidth);
-                        Rectangle newSplitChildBounds = boundsWithXandWidth(bounds, x, newWidth);
-                        layout2(splitChild, newSplitChildBounds);
-                        availableWidth -= (oldWidth - splitChild.getBounds().getWidth());
-                    }
-                    else {
-                        double existingWidth = splitChildBounds.getWidth();
-                        Rectangle newSplitChildBounds = boundsWithXandWidth(bounds, x, existingWidth);
-                        layout2(splitChild, newSplitChildBounds);
-                    }
-                    x = splitChild.getBounds().getMaxX();
-                }
-        }
-
-        else {
+            while(splitChildren.hasNext()) {
+                Node splitChild = splitChildren.next();
+                Rectangle splitChildBounds = splitChild.getBounds();
+                double minSplitChildWidth = minimumNodeSize(splitChild).getWidth();
+                double splitChildWeight = (onlyShrinkWeightedComponents)
+                ? splitChild.getWeight()
+                        : (splitChildBounds.getWidth() / totalWidth);
+
+                if (!splitChildren.hasNext()) {
+                    double newWidth =  Math.max(minSplitChildWidth, bounds.getMaxX() - x);
+                    Rectangle newSplitChildBounds = boundsWithXandWidth(bounds, x, newWidth);
+                    layout2(splitChild, newSplitChildBounds);
+                } else if ((availableWidth > 0.0) && (splitChildWeight > 0.0)) {
+                    double allocatedWidth = Math.rint(splitChildWeight * extraWidth);
+                    double oldWidth = splitChildBounds.getWidth();
+                    double newWidth = Math.max(minSplitChildWidth, oldWidth - allocatedWidth);
+                    Rectangle newSplitChildBounds = boundsWithXandWidth(bounds, x, newWidth);
+                    layout2(splitChild, newSplitChildBounds);
+                    availableWidth -= (oldWidth - splitChild.getBounds().getWidth());
+                } else {
+                    double existingWidth = splitChildBounds.getWidth();
+                    Rectangle newSplitChildBounds = boundsWithXandWidth(bounds, x, existingWidth);
+                    layout2(splitChild, newSplitChildBounds);
+                }
+                x = splitChild.getBounds().getMaxX();
+            }
+        } else {
             int totalHeight = 0;          // sum of the children's heights
             int minWeightedHeight = 0;    // sum of the weighted childrens' min heights
@@ -429,34 +419,32 @@
                 (totalWeightedHeight - minWeightedHeight) > extraHeight;
 
-                while(splitChildren.hasNext()) {
-                    Node splitChild = splitChildren.next();
-                    Rectangle splitChildBounds = splitChild.getBounds();
-                    double minSplitChildHeight = minimumNodeSize(splitChild).getHeight();
-                    double splitChildWeight = (onlyShrinkWeightedComponents)
-                    ? splitChild.getWeight()
-                            : (splitChildBounds.getHeight() / totalHeight);
-
-                    if (!splitChildren.hasNext()) {
-                        double oldHeight = splitChildBounds.getHeight();
-                        double newHeight =  Math.max(minSplitChildHeight, bounds.getMaxY() - y);
-                        Rectangle newSplitChildBounds = boundsWithYandHeight(bounds, y, newHeight);
-                        layout2(splitChild, newSplitChildBounds);
-                        availableHeight -= (oldHeight - splitChild.getBounds().getHeight());
-                    }
-                    else if ((availableHeight > 0.0) && (splitChildWeight > 0.0)) {
-                        double allocatedHeight = Math.rint(splitChildWeight * extraHeight);
-                        double oldHeight = splitChildBounds.getHeight();
-                        double newHeight = Math.max(minSplitChildHeight, oldHeight - allocatedHeight);
-                        Rectangle newSplitChildBounds = boundsWithYandHeight(bounds, y, newHeight);
-                        layout2(splitChild, newSplitChildBounds);
-                        availableHeight -= (oldHeight - splitChild.getBounds().getHeight());
-                    }
-                    else {
-                        double existingHeight = splitChildBounds.getHeight();
-                        Rectangle newSplitChildBounds = boundsWithYandHeight(bounds, y, existingHeight);
-                        layout2(splitChild, newSplitChildBounds);
-                    }
-                    y = splitChild.getBounds().getMaxY();
-                }
+            while(splitChildren.hasNext()) {
+                Node splitChild = splitChildren.next();
+                Rectangle splitChildBounds = splitChild.getBounds();
+                double minSplitChildHeight = minimumNodeSize(splitChild).getHeight();
+                double splitChildWeight = (onlyShrinkWeightedComponents)
+                ? splitChild.getWeight()
+                        : (splitChildBounds.getHeight() / totalHeight);
+
+                if (!splitChildren.hasNext()) {
+                    double oldHeight = splitChildBounds.getHeight();
+                    double newHeight =  Math.max(minSplitChildHeight, bounds.getMaxY() - y);
+                    Rectangle newSplitChildBounds = boundsWithYandHeight(bounds, y, newHeight);
+                    layout2(splitChild, newSplitChildBounds);
+                    availableHeight -= (oldHeight - splitChild.getBounds().getHeight());
+                } else if ((availableHeight > 0.0) && (splitChildWeight > 0.0)) {
+                    double allocatedHeight = Math.rint(splitChildWeight * extraHeight);
+                    double oldHeight = splitChildBounds.getHeight();
+                    double newHeight = Math.max(minSplitChildHeight, oldHeight - allocatedHeight);
+                    Rectangle newSplitChildBounds = boundsWithYandHeight(bounds, y, newHeight);
+                    layout2(splitChild, newSplitChildBounds);
+                    availableHeight -= (oldHeight - splitChild.getBounds().getHeight());
+                } else {
+                    double existingHeight = splitChildBounds.getHeight();
+                    Rectangle newSplitChildBounds = boundsWithYandHeight(bounds, y, existingHeight);
+                    layout2(splitChild, newSplitChildBounds);
+                }
+                y = splitChild.getBounds().getMaxY();
+            }
         }
 
@@ -476,14 +464,14 @@
         Node lastWeightedChild = split.lastWeightedChild();
 
-        /* Layout the Split's child Nodes' along the X axis.  The bounds
-         * of each child will have the same y coordinate and height as the
-         * layoutGrow() bounds argument.  Extra width is allocated to the
-         * to each child with a non-zero weight:
-         *     newWidth = currentWidth + (extraWidth * splitChild.getWeight())
-         * Any extraWidth "left over" (that's availableWidth in the loop
-         * below) is given to the last child.  Note that Dividers always
-         * have a weight of zero, and they're never the last child.
-         */
         if (split.isRowLayout()) {
+            /* Layout the Split's child Nodes' along the X axis.  The bounds
+             * of each child will have the same y coordinate and height as the
+             * layoutGrow() bounds argument.  Extra width is allocated to the
+             * to each child with a non-zero weight:
+             *     newWidth = currentWidth + (extraWidth * splitChild.getWeight())
+             * Any extraWidth "left over" (that's availableWidth in the loop
+             * below) is given to the last child.  Note that Dividers always
+             * have a weight of zero, and they're never the last child.
+             */
             double x = bounds.getX();
             double extraWidth = bounds.getWidth() - splitBounds.getWidth();
@@ -499,6 +487,5 @@
                     Rectangle newSplitChildBounds = boundsWithXandWidth(bounds, x, newWidth);
                     layout2(splitChild, newSplitChildBounds);
-                }
-                else if ((availableWidth > 0.0) && (splitChildWeight > 0.0)) {
+                } else if ((availableWidth > 0.0) && (splitChildWeight > 0.0)) {
                     double allocatedWidth = (splitChild.equals(lastWeightedChild))
                     ? availableWidth
@@ -508,6 +495,5 @@
                     layout2(splitChild, newSplitChildBounds);
                     availableWidth -= allocatedWidth;
-                }
-                else {
+                } else {
                     double existingWidth = splitChildBounds.getWidth();
                     Rectangle newSplitChildBounds = boundsWithXandWidth(bounds, x, existingWidth);
@@ -516,16 +502,14 @@
                 x = splitChild.getBounds().getMaxX();
             }
-        }
-
-        /* Layout the Split's child Nodes' along the Y axis.  The bounds
-         * of each child will have the same x coordinate and width as the
-         * layoutGrow() bounds argument.  Extra height is allocated to the
-         * to each child with a non-zero weight:
-         *     newHeight = currentHeight + (extraHeight * splitChild.getWeight())
-         * Any extraHeight "left over" (that's availableHeight in the loop
-         * below) is given to the last child.  Note that Dividers always
-         * have a weight of zero, and they're never the last child.
-         */
-        else {
+        } else {
+            /* Layout the Split's child Nodes' along the Y axis.  The bounds
+             * of each child will have the same x coordinate and width as the
+             * layoutGrow() bounds argument.  Extra height is allocated to the
+             * to each child with a non-zero weight:
+             *     newHeight = currentHeight + (extraHeight * splitChild.getWeight())
+             * Any extraHeight "left over" (that's availableHeight in the loop
+             * below) is given to the last child.  Note that Dividers always
+             * have a weight of zero, and they're never the last child.
+             */
             double y = bounds.getY();
             double extraHeight = bounds.getMaxY() - splitBounds.getHeight();
@@ -571,9 +555,7 @@
             }
             root.setBounds(bounds);
-        }
-        else if (root instanceof Divider) {
+        } else if (root instanceof Divider) {
             root.setBounds(bounds);
-        }
-        else if (root instanceof Split) {
+        } else if (root instanceof Split) {
             Split split = (Split)root;
             boolean grow = split.isRowLayout()
@@ -583,6 +565,5 @@
                 layoutGrow(split, bounds);
                 root.setBounds(bounds);
-            }
-            else {
+            } else {
                 layoutShrink(split, bounds);
                 // split.setBounds() called in layoutShrink()
@@ -608,6 +589,5 @@
         if (root instanceof Leaf) {
             root.setBounds(bounds);
-        }
-        else if (root instanceof Split) {
+        } else if (root instanceof Split) {
             Split split = (Split)root;
             Iterator<Node> splitChildren = split.getChildren().iterator();
@@ -629,36 +609,34 @@
                         (splitChildren.hasNext()) ? (Divider)(splitChildren.next()) : null;
 
-                        double childWidth = 0.0;
-                        if (getFloatingDividers()) {
-                            childWidth = preferredNodeSize(splitChild).getWidth();
+                    double childWidth = 0.0;
+                    if (getFloatingDividers()) {
+                        childWidth = preferredNodeSize(splitChild).getWidth();
+                    }
+                    else {
+                        if (dividerChild != null) {
+                            childWidth = dividerChild.getBounds().getX() - x;
                         }
                         else {
-                            if (dividerChild != null) {
-                                childWidth = dividerChild.getBounds().getX() - x;
-                            }
-                            else {
-                                childWidth = split.getBounds().getMaxX() - x;
-                            }
+                            childWidth = split.getBounds().getMaxX() - x;
                         }
-                        childBounds = boundsWithXandWidth(bounds, x, childWidth);
-                        layout1(splitChild, childBounds);
-
-                        if (getFloatingDividers() && (dividerChild != null)) {
-                            double dividerX = childBounds.getMaxX();
-                            Rectangle dividerBounds = boundsWithXandWidth(bounds, dividerX, dividerSize);
-                            dividerChild.setBounds(dividerBounds);
-                        }
-                        if (dividerChild != null) {
-                            x = dividerChild.getBounds().getMaxX();
-                        }
-                }
-            }
-
-            /* Layout the Split's child Nodes' along the Y axis.  The bounds
-             * of each child will have the same x coordinate and width as the
-             * layout1() bounds argument.  The algorithm is identical to what's
-             * explained above, for the X axis case.
-             */
-            else {
+                    }
+                    childBounds = boundsWithXandWidth(bounds, x, childWidth);
+                    layout1(splitChild, childBounds);
+
+                    if (getFloatingDividers() && (dividerChild != null)) {
+                        double dividerX = childBounds.getMaxX();
+                        Rectangle dividerBounds = boundsWithXandWidth(bounds, dividerX, dividerSize);
+                        dividerChild.setBounds(dividerBounds);
+                    }
+                    if (dividerChild != null) {
+                        x = dividerChild.getBounds().getMaxX();
+                    }
+                }
+            } else {
+                /* Layout the Split's child Nodes' along the Y axis.  The bounds
+                 * of each child will have the same x coordinate and width as the
+                 * layout1() bounds argument.  The algorithm is identical to what's
+                 * explained above, for the X axis case.
+                 */
                 double y = bounds.getY();
                 while(splitChildren.hasNext()) {
@@ -670,10 +648,8 @@
                         if (getFloatingDividers()) {
                             childHeight = preferredNodeSize(splitChild).getHeight();
-                        }
-                        else {
+                        } else {
                             if (dividerChild != null) {
                                 childHeight = dividerChild.getBounds().getY() - y;
-                            }
-                            else {
+                            } else {
                                 childHeight = split.getBounds().getMaxY() - y;
                             }
@@ -772,6 +748,5 @@
             Divider divider = (Divider)root;
             return (divider.getBounds().contains(x, y)) ? divider : null;
-        }
-        else if (root instanceof Split) {
+        } else if (root instanceof Split) {
             Split split = (Split)root;
             for(Node child : split.getChildren()) {
@@ -810,6 +785,5 @@
                         dividers.add((Divider)child);
                     }
-                }
-                else if (child instanceof Split) {
+                } else if (child instanceof Split) {
                     dividers.addAll(dividersThatOverlap(child, r));
                 }
@@ -982,6 +956,5 @@
          * children are to be laid out in a row: all the same height,
          * each node's left edge equal to the previous Node's right
-         * edge.  If false, children are laid on in a column.  Default
-         * value is true.
+         * edge. If false, children are laid on in a column. Default value is true.
          *
          * @param rowLayout true for horizontal row layout, false for column
@@ -1007,6 +980,5 @@
          * of each new child is set to this Split node, and the parent
          * of each old child (if any) is set to null.  This method
-         * defensively copies the incoming List.  Default value is
-         * an empty List.
+         * defensively copies the incoming List. Default value is an empty List.
          *
          * @param children List of children
@@ -1156,23 +1128,18 @@
             if (st.nextToken() == StreamTokenizer.TT_NUMBER) {
                 node.setWeight(st.nval);
-            }
-            else {
+            } else {
                 throwParseException(st, "invalid weight");
             }
-        }
-        else if ("NAME".equalsIgnoreCase(name)) {
+        } else if ("NAME".equalsIgnoreCase(name)) {
             if (st.nextToken() == StreamTokenizer.TT_WORD) {
                 if (node instanceof Leaf) {
                     ((Leaf)node).setName(st.sval);
-                }
-                else {
+                } else {
                     throwParseException(st, "can't specify name for " + node);
                 }
-            }
-            else {
+            } else {
                 throwParseException(st, "invalid name");
             }
-        }
-        else {
+        } else {
             throwParseException(st, "unrecognized attribute \"" + name + "\"");
         }
@@ -1183,6 +1150,5 @@
         if (children.isEmpty()) {
             children.add(child);
-        }
-        else {
+        } else {
             children.add(new Divider());
             children.add(child);
@@ -1200,6 +1166,5 @@
             if (token == StreamTokenizer.TT_WORD) {
                 parseAttribute(st.sval, st, leaf);
-            }
-            else {
+            } else {
                 throwParseException(st, "Bad Leaf: " + leaf);
             }
@@ -1213,14 +1178,11 @@
             if (token == ')') {
                 break;
-            }
-            else if (token == StreamTokenizer.TT_WORD) {
+            } else if (token == StreamTokenizer.TT_WORD) {
                 if ("WEIGHT".equalsIgnoreCase(st.sval)) {
                     parseAttribute(st.sval, st, parent);
-                }
-                else {
+                } else {
                     addSplitChild(parent, new Leaf(st.sval));
                 }
-            }
-            else if (token == '(') {
+            } else if (token == '(') {
                 if ((token = st.nextToken()) != StreamTokenizer.TT_WORD) {
                     throwParseException(st, "invalid node type");
@@ -1229,12 +1191,10 @@
                 if ("LEAF".equals(nodeType)) {
                     parseLeaf(st, parent);
-                }
-                else if ("ROW".equals(nodeType) || "COLUMN".equals(nodeType)) {
+                } else if ("ROW".equals(nodeType) || "COLUMN".equals(nodeType)) {
                     Split split = new Split();
                     split.setRowLayout("ROW".equals(nodeType));
                     addSplitChild(parent, split);
                     parseSplit(st, split);
-                }
-                else {
+                } else {
                     throwParseException(st, "unrecognized node type '" + nodeType + "'");
                 }
@@ -1249,9 +1209,7 @@
             parseSplit(st, root);
             return root.getChildren().get(0);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             Main.error(e);
-        }
-        finally {
+        } finally {
             Utils.close(r);
         }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java	(revision 8342)
@@ -214,6 +214,5 @@
                     dp.paint(dpg, divider);
                 }
-            }
-            finally {
+            } finally {
                 dpg.dispose();
             }
@@ -239,6 +238,5 @@
             if ((prevNode == null) || (nextNode == null)) {
                 dragUnderway = false;
-            }
-            else {
+            } else {
                 initialDividerBounds = divider.getBounds();
                 dragOffsetX = mx - initialDividerBounds.x;
@@ -251,6 +249,5 @@
                     dragMax = nextNodeBounds.x + nextNodeBounds.width;
                     dragMax -= dragDivider.getBounds().width;
-                }
-                else {
+                } else {
                     dragMin = prevNodeBounds.y;
                     dragMax = nextNodeBounds.y + nextNodeBounds.height;
@@ -261,6 +258,5 @@
                 dragUnderway = true;
             }
-        }
-        else {
+        } else {
             dragUnderway = false;
         }
@@ -272,6 +268,5 @@
             damageR.x = dragMin;
             damageR.width = dragMax - dragMin;
-        }
-        else {
+        } else {
             damageR.y = dragMin;
             damageR.height = dragMax - dragMin;
@@ -290,6 +285,5 @@
             bounds.x = Math.max(bounds.x, dragMin);
             bounds.x = Math.min(bounds.x, dragMax);
-        }
-        else {
+        } else {
             bounds.y = my - dragOffsetY;
             bounds.y = Math.max(bounds.y, dragMin);
@@ -300,6 +294,5 @@
             revalidate();
             repaintDragLimits();
-        }
-        else {
+        } else {
             repaint(oldBounds.union(bounds));
         }
Index: trunk/src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 8342)
@@ -376,6 +376,5 @@
                     currentwp.put(GpxConstants.PT_PDOP, Float.parseFloat(accu));
                 }
-            }
-            else if("$GPRMC".equals(e[0]) || "$GNRMC".equals(e[0])) {
+            } else if("$GPRMC".equals(e[0]) || "$GNRMC".equals(e[0])) {
                 // coordinates
                 LatLon latLon = parseLatLon(
Index: trunk/src/org/openstreetmap/josm/io/OsmApiException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 8342)
@@ -130,6 +130,5 @@
         .append(responseCode);
         String eh = "";
-        try
-        {
+        try {
             if(errorHeader != null)
                 eh = tr(errorHeader.trim());
@@ -139,10 +138,8 @@
                 .append(">");
             }
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             // Ignored
         }
-        try
-        {
+        try {
             String eb = errorBody != null ? tr(errorBody.trim()) : "";
             if (!eb.isEmpty() && !eb.equals(eh)) {
@@ -151,6 +148,5 @@
                 .append(">");
             }
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             // Ignored
         }
Index: trunk/src/org/openstreetmap/josm/io/OsmServerReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 8342)
@@ -187,6 +187,5 @@
                             }
                         }
-                    }
-                    catch(Exception e) {
+                    } catch(Exception e) {
                         errorBody.append(tr("Reading error text failed."));
                     }
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java	(revision 8342)
@@ -5,5 +5,4 @@
 
 import java.io.IOException;
-import java.net.BindException;
 import java.net.ServerSocket;
 import java.net.Socket;
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java	(revision 8342)
@@ -7,5 +7,4 @@
 import java.io.InputStream;
 import java.math.BigInteger;
-import java.net.BindException;
 import java.net.ServerSocket;
 import java.net.Socket;
Index: trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 8342)
@@ -273,6 +273,5 @@
                         }
                     }
-                }
-                catch(Exception e) {
+                } catch(Exception e) {
                     Main.error(e);
                 }
Index: trunk/src/org/openstreetmap/josm/tools/Diff.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 8342)
@@ -764,6 +764,5 @@
                            or until the first nonprovisional at least 8 lines in.
                            Until that point, cancel any provisionals.  */
-                        for (j = 0, consec = 0; j < length; j++)
-                        {
+                        for (j = 0, consec = 0; j < length; j++) {
                             if (j >= 8 && discards[i + j] == 1) {
                                 break;
@@ -771,6 +770,5 @@
                             if (discards[i + j] == 2) {
                                 consec = 0; discards[i + j] = 0;
-                            }
-                            else if (discards[i + j] == 0) {
+                            } else if (discards[i + j] == 0) {
                                 consec = 0;
                             } else {
@@ -786,6 +784,5 @@
 
                         /* Same thing, from end.  */
-                        for (j = 0, consec = 0; j < length; j++)
-                        {
+                        for (j = 0, consec = 0; j < length; j++) {
                             if (j >= 8 && discards[i - j] == 1) {
                                 break;
@@ -793,6 +790,5 @@
                             if (discards[i - j] == 2) {
                                 consec = 0; discards[i - j] = 0;
-                            }
-                            else if (discards[i - j] == 0) {
+                            } else if (discards[i - j] == 0) {
                                 consec = 0;
                             } else {
Index: trunk/src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 8341)
+++ trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 8342)
@@ -183,6 +183,5 @@
                                 }
                             }
-                        }
-                        else if (test && !intersectionNodes.isEmpty())
+                        } else if (test && !intersectionNodes.isEmpty())
                             return intersectionNodes;
                     }
