Index: trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java	(revision 2626)
@@ -19,5 +19,4 @@
 import java.text.ParsePosition;
 import java.util.Locale;
-import java.util.logging.Logger;
 
 import javax.swing.AbstractAction;
@@ -52,5 +51,5 @@
  */
 public final class AddNodeAction extends JosmAction {
-    static private final Logger logger = Logger.getLogger(AddNodeAction.class.getName());
+    //static private final Logger logger = Logger.getLogger(AddNodeAction.class.getName());
 
     public AddNodeAction() {
@@ -311,5 +310,5 @@
         }
 
-        class TextFieldFocusHandler implements FocusListener {
+        static class TextFieldFocusHandler implements FocusListener {
             public void focusGained(FocusEvent e) {
                 Component c = e.getComponent();
Index: trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 2626)
@@ -56,5 +56,5 @@
     // HelperClass
     // Saves a node and two positions where to insert the node into the ways
-    private class NodeToSegs implements Comparable<NodeToSegs> {
+    private static class NodeToSegs implements Comparable<NodeToSegs> {
         public int pos;
         public Node n;
@@ -71,9 +71,22 @@
                 return this.pos - o.pos;
         }
+
+        @Override
+        public int hashCode() {
+            return pos;
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (o instanceof NodeToSegs)
+                return compareTo((NodeToSegs) o) == 0;
+            else
+                return false;
+        }
     }
 
     // HelperClass
     // Saves a relation and a role an OsmPrimitve was part of until it was stripped from all relations
-    private class RelationRole {
+    private static class RelationRole {
         public final Relation rel;
         public final String role;
Index: trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 2626)
@@ -37,8 +37,8 @@
 public final class OrthogonalizeAction extends JosmAction {
     String USAGE = "<h3>"+
-            "When one or more ways are selected, the shape is adjusted, such that all angles are 90 or 180 degrees.<h3>"+
-            "You can add two nodes to the selection. Then the direction is fixed by these two reference nodes.<h3>"+
-            "(Afterwards, you can undo the movement for certain nodes:<br>"+
-            "Select them and press the shortcut for Orthogonalize / Undo. The default is Shift-Q.)";
+    "When one or more ways are selected, the shape is adjusted, such that all angles are 90 or 180 degrees.<h3>"+
+    "You can add two nodes to the selection. Then the direction is fixed by these two reference nodes.<h3>"+
+    "(Afterwards, you can undo the movement for certain nodes:<br>"+
+    "Select them and press the shortcut for Orthogonalize / Undo. The default is Shift-Q.)";
 
     public OrthogonalizeAction() {
@@ -72,12 +72,12 @@
      * This action can be triggered by shortcut only.
      */
-    public class Undo extends JosmAction {
+    public static class Undo extends JosmAction {
         public Undo() {
             super(tr("Orthogonalize Shape / Undo"),
-                "ortho",
-                tr("Undo orthogonalization for certain nodes"),
-                Shortcut.registerShortcut("tools:orthogonalizeUndo", tr("Tool: {0}", tr("Orthogonalize Shape / Undo")),
-                        KeyEvent.VK_Q,
-                        Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
+                    "ortho",
+                    tr("Undo orthogonalization for certain nodes"),
+                    Shortcut.registerShortcut("tools:orthogonalizeUndo", tr("Tool: {0}", tr("Orthogonalize Shape / Undo")),
+                            KeyEvent.VK_Q,
+                            Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
         }
         public void actionPerformed(ActionEvent e) {
@@ -103,9 +103,9 @@
             catch (InvalidUserInputException ex) {
                 JOptionPane.showMessageDialog(
-                    Main.parent,
-                    tr("Orthogonalize Shape / Undo\n"+
+                        Main.parent,
+                        tr("Orthogonalize Shape / Undo\n"+
                         "Please select nodes that were moved by the previous Orthogonalize Shape action!"),
-                    tr("Undo Orthogonalize Shape"),
-                    JOptionPane.INFORMATION_MESSAGE);
+                        tr("Undo Orthogonalize Shape"),
+                        JOptionPane.INFORMATION_MESSAGE);
             }
         }
@@ -143,12 +143,9 @@
                 else if (p instanceof Way) {
                     wayDataList.add(new WayData((Way) p));
-                }
-                else {      // maybe a relation got selected...
+                } else
                     throw new InvalidUserInputException("Selection must consist only of ways and nodes.");
-                }
-            }
-            if (wayDataList.isEmpty()) {
+            }
+            if (wayDataList.isEmpty())
                 throw new InvalidUserInputException("usage");
-            }
             else  {
                 if (nodeList.size() == 2 || nodeList.isEmpty()) {
@@ -186,8 +183,8 @@
                     } else
                         throw new IllegalStateException();
-                    
+
                     Main.main.undoRedo.add(new SequenceCommand(tr("Orthogonalize"), commands));
                     Main.map.repaint();
-                    
+
                 } else
                     throw new InvalidUserInputException("usage");
@@ -196,15 +193,15 @@
             if (ex.getMessage().equals("usage")) {
                 JOptionPane.showMessageDialog(
-                    Main.parent,
-                    "<html><h2>"+tr("Usage")+tr(USAGE),
-                    tr("Orthogonalize Shape"),
-                    JOptionPane.INFORMATION_MESSAGE);
+                        Main.parent,
+                        "<html><h2>"+tr("Usage")+tr(USAGE),
+                        tr("Orthogonalize Shape"),
+                        JOptionPane.INFORMATION_MESSAGE);
             }
             else {
                 JOptionPane.showMessageDialog(
-                    Main.parent,
-                    "<html><h3>"+tr(ex.getMessage())+"<br><hr><h3>"+tr("Usage")+tr(USAGE),
-                    tr("Selected Elements cannot be orthogonalized"),
-                    JOptionPane.INFORMATION_MESSAGE);
+                        Main.parent,
+                        "<html><h3>"+tr(ex.getMessage())+"<br><hr><h3>"+tr("Usage")+tr(USAGE),
+                        tr("Selected Elements cannot be orthogonalized"),
+                        JOptionPane.INFORMATION_MESSAGE);
             }
         }
@@ -232,5 +229,5 @@
      **/
     private static Collection<Command> orthogonalize(ArrayList<WayData> wayDataList, ArrayList<Node> headingNodes)
-        throws InvalidUserInputException
+    throws InvalidUserInputException
     {
         // find average heading
@@ -263,6 +260,6 @@
         } catch (RejectedAngleException ex) {
             throw new InvalidUserInputException(
-                "<html>Please make sure all selected ways head in a similar direction<br>"+
-                "or orthogonalize them one by one.");
+                    "<html>Please make sure all selected ways head in a similar direction<br>"+
+            "or orthogonalize them one by one.");
         }
 
@@ -302,5 +299,7 @@
             int s_size = s.size();
             for (int dummy = 0; dummy < s_size; ++ dummy) {
-                if (s.isEmpty()) break;
+                if (s.isEmpty()) {
+                    break;
+                }
                 final Node dummy_n = s.iterator().next();     // pick arbitrary element of s
 
@@ -357,5 +356,5 @@
         // rotate back and log the change
         final Collection<Command> commands = new LinkedList<Command>();
-//        OrthogonalizeAction.rememberMovements.clear();
+        //        OrthogonalizeAction.rememberMovements.clear();
         for (Node n: allNodes) {
             EastNorth tmp = new EastNorth(nX.get(n), nY.get(n));
@@ -366,7 +365,6 @@
                 final double EPSILON = 1E-6;
                 if (Math.abs(dx) > Math.abs(EPSILON * tmp.east()) ||
-                    Math.abs(dy) > Math.abs(EPSILON * tmp.east())) {
+                        Math.abs(dy) > Math.abs(EPSILON * tmp.east()))
                     throw new AssertionError();
-                }
             }
             else {
@@ -386,7 +384,7 @@
         final public int nNode;           // Number of Nodes of the Way
         public Direction[] segDirections; // Direction of the segments
-                                          // segment i goes from node i to node (i+1)
+        // segment i goes from node i to node (i+1)
         public EastNorth segSum;          // (Vector-)sum of all horizontal segments plus the sum of all vertical
-                                          //     segments turned by 90 degrees
+        //     segments turned by 90 degrees
         public double heading;            // heading of segSum == approximate heading of the way
         public WayData(Way pWay) {
@@ -422,14 +420,18 @@
             // sum up segments
             EastNorth h = new EastNorth(0.,0.);
-            double lh = EN.abs(h);
+            //double lh = EN.abs(h);
             EastNorth v = new EastNorth(0.,0.);
-            double lv = EN.abs(v);
+            //double lv = EN.abs(v);
             for (int i = 0; i < nSeg; ++i) {
                 EastNorth segment = EN.diff(en[i+1], en[i]);
-                if      (segDirections[i] == Direction.RIGHT) h = EN.sum(h,segment);
-                else if (segDirections[i] == Direction.UP)    v = EN.sum(v,segment);
-                else if (segDirections[i] == Direction.LEFT)  h = EN.diff(h,segment);
-                else if (segDirections[i] == Direction.DOWN)  v = EN.diff(v,segment);
-                else throw new IllegalStateException();
+                if      (segDirections[i] == Direction.RIGHT) {
+                    h = EN.sum(h,segment);
+                } else if (segDirections[i] == Direction.UP) {
+                    v = EN.sum(v,segment);
+                } else if (segDirections[i] == Direction.LEFT) {
+                    h = EN.diff(h,segment);
+                } else if (segDirections[i] == Direction.DOWN) {
+                    v = EN.diff(v,segment);
+                } else throw new IllegalStateException();
                 /**
                  * When summing up the length of the sum vector should increase.
@@ -437,15 +439,15 @@
                  * So only uncomment this for testing
                  **/
-//                if (segDirections[i].ordinal() % 2 == 0) {
-//                    if (EN.abs(h) < lh) throw new AssertionError();
-//                    lh = EN.abs(h);
-//                } else {
-//                    if (EN.abs(v) < lv) throw new AssertionError();
-//                    lv = EN.abs(v);
-//                }
+                //                if (segDirections[i].ordinal() % 2 == 0) {
+                //                    if (EN.abs(h) < lh) throw new AssertionError();
+                //                    lh = EN.abs(h);
+                //                } else {
+                //                    if (EN.abs(v) < lv) throw new AssertionError();
+                //                    lv = EN.abs(v);
+                //                }
             }
             // rotate the vertical vector by 90 degrees (clockwise) and add it to the horizontal vector
             segSum = EN.sum(h, new EastNorth(v.north(), - v.east()));
-//            if (EN.abs(segSum) < lh) throw new AssertionError();
+            //            if (EN.abs(segSum) < lh) throw new AssertionError();
             this.heading = EN.polar(new EastNorth(0.,0.), segSum);
         }
@@ -456,5 +458,7 @@
         public Direction changeBy(int directionChange) {
             int tmp = (this.ordinal() + directionChange) % 4;
-            if (tmp < 0) tmp += 4;          // the % operator can return negative value
+            if (tmp < 0) {
+                tmp += 4;          // the % operator can return negative value
+            }
             return Direction.values()[tmp];
         }
@@ -465,6 +469,10 @@
      */
     private static double standard_angle_0_to_2PI(double a) {
-        while (a >= 2 * Math.PI) a -= 2 * Math.PI;
-        while (a < 0)            a += 2 * Math.PI;
+        while (a >= 2 * Math.PI) {
+            a -= 2 * Math.PI;
+        }
+        while (a < 0) {
+            a += 2 * Math.PI;
+        }
         return a;
     }
@@ -474,6 +482,10 @@
      */
     private static double standard_angle_mPI_to_PI(double a) {
-        while (a > Math.PI)    a -= 2 * Math.PI;
-        while (a <= - Math.PI) a += 2 * Math.PI;
+        while (a > Math.PI) {
+            a -= 2 * Math.PI;
+        }
+        while (a <= - Math.PI) {
+            a += 2 * Math.PI;
+        }
         return a;
     }
@@ -499,13 +511,4 @@
             return new EastNorth(en1.east() - en2.east(), en1.north() - en2.north());
         }
-        public static double abs(EastNorth en) {
-            return Math.sqrt(en.east() * en.east() + en.north() * en.north());
-        }
-        public static String toString(EastNorth en) {
-            return "["+u(en.east())+","+u(en.north())+"]";
-        }
-        public static long u(double d) {
-            return Math.round(d * 1000000.);
-        }
         public static double polar(EastNorth en1, EastNorth en2) {
             return Math.atan2(en2.north() - en1.north(), en2.east() -  en1.east());
@@ -523,14 +526,17 @@
         double d_m90 = Math.abs(a + Math.PI / 2);
         int dirChange;
-        if (d0 < deltaMax)         dirChange =  0;
-        else if (d90 < deltaMax)   dirChange =  1;
-        else if (d_m90 < deltaMax) dirChange = -1;
-        else {
+        if (d0 < deltaMax) {
+            dirChange =  0;
+        } else if (d90 < deltaMax) {
+            dirChange =  1;
+        } else if (d_m90 < deltaMax) {
+            dirChange = -1;
+        } else {
             a = standard_angle_0_to_2PI(a);
             double d180 = Math.abs(a - Math.PI);
-            if (d180 < deltaMax)   dirChange = 2;
-            else {
+            if (d180 < deltaMax) {
+                dirChange = 2;
+            } else
                 throw new RejectedAngleException();
-            }
         }
         return dirChange;
Index: trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 2626)
@@ -38,11 +38,10 @@
         MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader();
         reader.append(getCurrentDataSet(),id, type);
-        DataSet ds = null;
         try {
-            ds = reader.parseOsm(NullProgressMonitor.INSTANCE);
+            DataSet ds = reader.parseOsm(NullProgressMonitor.INSTANCE);
+            Main.map.mapView.getEditLayer().mergeFrom(ds);
         } catch(Exception e) {
             ExceptionDialogUtil.explainException(e);
         }
-        Main.map.mapView.getEditLayer().mergeFrom(ds);
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 2626)
@@ -244,5 +244,5 @@
             OsmPrimitive targetMember = getMergeTarget(sourceMember.getMember());
             if (targetMember == null)
-                throw new IllegalStateException(tr("Missing merge target of type {0} with id {1}", targetMember.getType(), targetMember.getUniqueId()));
+                throw new IllegalStateException(tr("Missing merge target of type {0} with id {1}", sourceMember.getType(), sourceMember.getUniqueId()));
             if (! targetMember.isDeleted() && targetMember.isVisible()) {
                 RelationMember newMember = new RelationMember(sourceMember.getRole(), targetMember);
Index: trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 2626)
@@ -636,5 +636,5 @@
                 }
                 if (!canRemove()) {
-                    abort("attempt to remove non-empty child: " + this.content + " " + this.children);
+                    abort("attempt to remove non-empty child: " + this.content + " " + Arrays.toString(this.children));
                 }
                 parent.children[i] = null;
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java	(revision 2626)
@@ -113,5 +113,5 @@
         if (this.id != o.id)
             throw new ClassCastException(tr("Can''t compare primitive with ID ''{0}'' to primitive with ID ''{1}''.", o.id, this.id));
-        return new Long(this.version).compareTo(o.version);
+        return Long.valueOf(this.version).compareTo(o.version);
     }
 
@@ -159,5 +159,5 @@
         if (this == obj)
             return true;
-        if (obj == null)
+        if (!(obj instanceof HistoryOsmPrimitive))
             return false;
         // equal semantics is valid for subclasses like {@see HistoryOsmNode} etc. too.
Index: trunk/src/org/openstreetmap/josm/gui/BookmarkList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/BookmarkList.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/BookmarkList.java	(revision 2626)
@@ -83,5 +83,5 @@
     }
 
-    class BookmarkCellRenderer extends JLabel implements ListCellRenderer {
+    static class BookmarkCellRenderer extends JLabel implements ListCellRenderer {
 
         private ImageIcon icon;
Index: trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 2626)
@@ -282,6 +282,5 @@
     protected Dimension findMaxDialogSize() {
         Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-        Dimension x = new Dimension(Math.round(screenSize.width*2/3),
-                Math.round(screenSize.height*2/3));
+        Dimension x = new Dimension(screenSize.width*2/3, screenSize.height*2/3);
         try {
             if(parent != null) {
@@ -420,5 +419,5 @@
         // Make it not wider than 1/2 of the screen
         Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-        lbl.setMaxWidth(Math.round(screenSize.width*1/2));
+        lbl.setMaxWidth(screenSize.width/2);
         return lbl;
     }
Index: trunk/src/org/openstreetmap/josm/gui/FileDrop.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 2626)
@@ -16,6 +16,4 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.OpenFileAction;
-
-import org.openstreetmap.josm.gui.FileDrop.TransferableObject;
 
 /**
@@ -438,5 +436,5 @@
             {   support = false;
             }   // end catch
-            supportsDnD = new Boolean( support );
+            supportsDnD = support;
         }   // end if: first time through
         return supportsDnD.booleanValue();
Index: trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/GettingStarted.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/GettingStarted.java	(revision 2626)
@@ -27,5 +27,5 @@
         + "body { font-family: sans-serif; font-weight: bold; }\n" + "h1 {text-align: center;}\n" + "</style>\n";
 
-    public class LinkGeneral extends JEditorPane implements HyperlinkListener {
+    public static class LinkGeneral extends JEditorPane implements HyperlinkListener {
         public LinkGeneral(String text) {
             setContentType("text/html");
@@ -46,5 +46,5 @@
      * Grabs current MOTD from cache or webpage and parses it.
      */
-    private class MotdContent extends CacheCustomContent {
+    private static class MotdContent extends CacheCustomContent {
         public MotdContent() {
             super("motd.html", CacheCustomContent.INTERVAL_DAILY);
Index: trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 2626)
@@ -69,4 +69,5 @@
 import org.openstreetmap.josm.actions.ZoomInAction;
 import org.openstreetmap.josm.actions.ZoomOutAction;
+import org.openstreetmap.josm.actions.OrthogonalizeAction.Undo;
 import org.openstreetmap.josm.actions.audio.AudioBackAction;
 import org.openstreetmap.josm.actions.audio.AudioFasterAction;
@@ -132,5 +133,5 @@
     public final JosmAction distribute = new DistributeAction();
     public final OrthogonalizeAction ortho = new OrthogonalizeAction();
-    public final JosmAction orthoUndo = ortho.new Undo();  // action is not shown in the menu. Only triggered by shortcut
+    public final JosmAction orthoUndo = new Undo();  // action is not shown in the menu. Only triggered by shortcut
     public final JosmAction mirror = new MirrorAction();
     public final AddNodeAction addnode = new AddNodeAction();
@@ -306,5 +307,5 @@
     }
 
-    class PresetsMenuEnabler implements MapView.LayerChangeListener {
+    static class PresetsMenuEnabler implements MapView.LayerChangeListener {
         private JMenu presetsMenu;
         public PresetsMenuEnabler(JMenu presetsMenu) {
Index: trunk/src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 2626)
@@ -74,5 +74,5 @@
      * a fixed text content to the right of the image.
      */
-    class ImageLabel extends JPanel {
+    static class ImageLabel extends JPanel {
         private JLabel tf;
         private int chars;
@@ -486,5 +486,5 @@
      * @author imi
      */
-    class MouseState {
+    static class MouseState {
         Point mousePos;
         int modifiers;
Index: trunk/src/org/openstreetmap/josm/gui/MapView.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 2626)
@@ -398,7 +398,7 @@
                             if (l1 == getActiveLayer()) return -1;
                             if (l2 == getActiveLayer()) return 1;
-                            return new Integer(layers.indexOf(l1)).compareTo(layers.indexOf(l2));
+                            return Integer.valueOf(layers.indexOf(l1)).compareTo(layers.indexOf(l2));
                         } else
-                            return new Integer(layers.indexOf(l1)).compareTo(layers.indexOf(l2));
+                            return Integer.valueOf(layers.indexOf(l1)).compareTo(layers.indexOf(l2));
                     }
                 }
Index: trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java	(revision 2626)
@@ -220,5 +220,5 @@
                             cmp = o1.getParent().getDisplayName(nf).compareTo(o2.getParent().getDisplayName(nf));
                             if (cmp != 0) return cmp;
-                            return new Integer(o1.getPosition()).compareTo(o2.getPosition());
+                            return Integer.valueOf(o1.getPosition()).compareTo(o2.getPosition());
                         }
                     }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java	(revision 2626)
@@ -20,5 +20,4 @@
 import java.util.Observable;
 import java.util.Observer;
-import java.util.logging.Logger;
 
 import javax.swing.AbstractAction;
@@ -774,7 +773,5 @@
         mergedEntriesTable.getSelectionModel().clearSelection();
         mergedEntriesTable.setEnabled(!newValue);
-        if (freezeAction != null) {
-            freezeAction.putValue(FreezeActionProperties.PROP_SELECTED, newValue);
-        }
+        freezeAction.putValue(FreezeActionProperties.PROP_SELECTED, newValue);
         if (newValue) {
             lblFrozenState.setText(
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java	(revision 2626)
@@ -307,5 +307,5 @@
      *
      */
-    class AdjustmentSynchronizer implements AdjustmentListener {
+    static class AdjustmentSynchronizer implements AdjustmentListener {
         private final ArrayList<Adjustable> synchronizedAdjustables;
 
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 2626)
@@ -1,6 +1,6 @@
 package org.openstreetmap.josm.gui.conflict.tags;
 
+import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
 import static org.openstreetmap.josm.tools.I18n.tr;
-import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
 
 import java.awt.BorderLayout;
@@ -399,5 +399,5 @@
     }
 
-    class AutoAdjustingSplitPane extends JSplitPane implements PropertyChangeListener, HierarchyBoundsListener {
+    static class AutoAdjustingSplitPane extends JSplitPane implements PropertyChangeListener, HierarchyBoundsListener {
         private double dividerLocation;
 
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java	(revision 2626)
@@ -160,9 +160,5 @@
         references = references == null ? new LinkedList<RelationToChildReference>() : references;
         decisions.clear();
-        if (references.isEmpty()) {
-            this.relations = new HashSet<Relation>(references.size());
-        } else {
-            this.relations = new HashSet<Relation>(references.size());
-        }
+        this.relations = new HashSet<Relation>(references.size());
         for (RelationToChildReference reference: references) {
             decisions.add(new RelationMemberConflictDecision(reference.getParent(), reference.getPosition()));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java	(revision 2626)
@@ -179,5 +179,5 @@
      * Action for canceling conflict resolution
      */
-    class HelpAction extends AbstractAction {
+    static class HelpAction extends AbstractAction {
         public HelpAction() {
             putValue(Action.SHORT_DESCRIPTION, tr("Show help information"));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java	(revision 2626)
@@ -30,5 +30,4 @@
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.gui.SideButton;
-import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 import org.openstreetmap.josm.gui.layer.DataChangeListener;
 import org.openstreetmap.josm.gui.layer.Layer;
@@ -204,5 +203,5 @@
     }
 
-    class StringRenderer extends DefaultTableCellRenderer {
+    static class StringRenderer extends DefaultTableCellRenderer {
         @Override
         public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,int row,int column) {
@@ -214,5 +213,5 @@
     }
 
-    class BooleanRenderer extends JCheckBox implements TableCellRenderer {
+    static class BooleanRenderer extends JCheckBox implements TableCellRenderer {
         public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,int row,int column) {
             Filters model = (Filters)table.getModel();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 2626)
@@ -43,5 +43,4 @@
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.gui.SideButton;
-import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 import org.openstreetmap.josm.gui.io.SaveLayersDialog;
 import org.openstreetmap.josm.gui.layer.Layer;
@@ -497,5 +496,5 @@
      *
      */
-    class LayerListCellRenderer extends DefaultListCellRenderer {
+    static class LayerListCellRenderer extends DefaultListCellRenderer {
 
         protected boolean isActiveLayer(Layer layer) {
@@ -621,5 +620,5 @@
      * the properties {@see Layer#VISIBLE_PROP} and {@see Layer#NAME_PROP}.
      */
-    public class LayerListModel extends DefaultListModel implements MapView.LayerChangeListener, PropertyChangeListener{
+    public static class LayerListModel extends DefaultListModel implements MapView.LayerChangeListener, PropertyChangeListener{
 
         /** manages list selection state*/
@@ -1010,5 +1009,5 @@
     }
 
-    class LayerList extends JList {
+    static class LayerList extends JList {
         public LayerList(ListModel dataModel) {
             super(dataModel);
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 2626)
@@ -339,5 +339,5 @@
      *
      */
-    class NewAction extends AbstractAction implements MapView.LayerChangeListener{
+    static class NewAction extends AbstractAction implements MapView.LayerChangeListener{
         public NewAction() {
             putValue(SHORT_DESCRIPTION,tr("Create a new relation"));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 2626)
@@ -46,5 +46,4 @@
 import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
 import org.openstreetmap.josm.gui.SideButton;
-import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -356,5 +355,5 @@
      * @author Jan Peter Stotz
      */
-    protected class SearchMenuItem extends JMenuItem implements ActionListener {
+    protected static class SearchMenuItem extends JMenuItem implements ActionListener {
         protected SearchSetting s;
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 2626)
@@ -43,5 +43,4 @@
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.gui.SideButton;
-import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -273,5 +272,5 @@
      *
      */
-    class UserTableModel extends DefaultTableModel {
+    static class UserTableModel extends DefaultTableModel {
         private ArrayList<UserInfo> data;
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetInSelectionListModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetInSelectionListModel.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetInSelectionListModel.java	(revision 2626)
@@ -9,5 +9,4 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.gui.MapView;
-import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -31,5 +30,5 @@
         if (newLayer == null || ! (newLayer instanceof OsmDataLayer)) {
             setChangesets(null);
-        } else if (newLayer instanceof OsmDataLayer){
+        } else {
             initFromPrimitives(((OsmDataLayer) newLayer).data.getSelected());
         }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 2626)
@@ -582,5 +582,5 @@
     }
 
-    class AddAbortException extends Exception  {
+    static class AddAbortException extends Exception  {
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 2626)
@@ -152,5 +152,5 @@
                     currentArea.getMax().latToString(CoordinateFormat.DECIMAL_DEGREES),
                     currentArea.getMax().lonToString(CoordinateFormat.DECIMAL_DEGREES)
-                    )
+            )
             );
         }
@@ -167,5 +167,5 @@
         bookmarks.clearSelection();
         updateDownloadAreaLabel();
-        actAdd.setEnabled(area != null);
+        actAdd.setEnabled(true);
     }
 
@@ -194,7 +194,7 @@
             b.setName(
                     JOptionPane.showInputDialog(
-                    Main.parent,tr("Please enter a name for the bookmarked download area."),
-                    tr("Name of location"),
-                    JOptionPane.QUESTION_MESSAGE)
+                            Main.parent,tr("Please enter a name for the bookmarked download area."),
+                            tr("Name of location"),
+                            JOptionPane.QUESTION_MESSAGE)
             );
             b.setArea(currentArea);
@@ -208,5 +208,5 @@
     class RemoveAction extends AbstractAction implements ListSelectionListener{
         public RemoveAction() {
-           //putValue(NAME, tr("Remove"));
+            //putValue(NAME, tr("Remove"));
             putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));
             putValue(SHORT_DESCRIPTION, tr("Remove the currently selected bookmarks"));
@@ -216,7 +216,6 @@
         public void actionPerformed(ActionEvent e) {
             Object[] sels = bookmarks.getSelectedValues();
-            if (sels == null || sels.length == 0) {
-                return;
-            }
+            if (sels == null || sels.length == 0)
+                return;
             for (Object sel: sels) {
                 ((DefaultListModel)bookmarks.getModel()).removeElement(sel);
@@ -234,5 +233,5 @@
     class RenameAction extends AbstractAction implements ListSelectionListener{
         public RenameAction() {
-           //putValue(NAME, tr("Remove"));
+            //putValue(NAME, tr("Remove"));
             putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));
             putValue(SHORT_DESCRIPTION, tr("Rename the currently selected bookmark"));
@@ -242,17 +241,16 @@
         public void actionPerformed(ActionEvent e) {
             Object[] sels = bookmarks.getSelectedValues();
-            if (sels == null || sels.length != 1) {
-                return;
-            }
+            if (sels == null || sels.length != 1)
+                return;
             Bookmark b = (Bookmark)sels[0];
             Object value =
-                    JOptionPane.showInputDialog(
-                    Main.parent,tr("Please enter a name for the bookmarked download area."),
-                    tr("Name of location"),
-                    JOptionPane.QUESTION_MESSAGE,
-                    null,
-                    null,
-                    b.getName()
-                    );
+                JOptionPane.showInputDialog(
+                        Main.parent,tr("Please enter a name for the bookmarked download area."),
+                        tr("Name of location"),
+                        JOptionPane.QUESTION_MESSAGE,
+                        null,
+                        null,
+                        b.getName()
+                );
             if (value != null) {
                 b.setName(value.toString());
Index: trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java	(revision 2626)
@@ -269,5 +269,5 @@
     }
 
-    class SelectAllOnFocusHandler extends FocusAdapter {
+    static class SelectAllOnFocusHandler extends FocusAdapter {
         private JTextComponent tfTarget;
         public SelectAllOnFocusHandler(JTextComponent tfTarget) {
Index: trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 2626)
@@ -144,5 +144,5 @@
 
     public void setDownloadArea(Bounds area) {
-       tblSearchResults.clearSelection();
+        tblSearchResults.clearSelection();
     }
 
@@ -166,5 +166,5 @@
                     new LatLon(lat - size / 2, lon - size),
                     new LatLon(lat + size / 2, lon+ size)
-                    );
+            );
             return b;
         }
@@ -176,5 +176,5 @@
      *
      */
-    private class NameFinderResultParser extends DefaultHandler {
+    private static class NameFinderResultParser extends DefaultHandler {
         private SearchResult currentResult = null;
         private StringBuffer description = null;
@@ -188,5 +188,5 @@
         @Override
         public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
-                throws SAXException {
+        throws SAXException {
             depth++;
             try {
@@ -323,20 +323,19 @@
             try {
                 getProgressMonitor().indeterminateSubTask(tr("Querying name server ..."));
-                    URL url = new URL("http://gazetteer.openstreetmap.org/namefinder/search.xml?find="
-                            +java.net.URLEncoder.encode(searchExpression, "UTF-8"));
-                    synchronized(this) {
-                        connection = (HttpURLConnection)url.openConnection();
-                    }
-                    connection.setConnectTimeout(15000);
-                    InputStream inputStream = connection.getInputStream();
-                    InputSource inputSource = new InputSource(new InputStreamReader(inputStream, "UTF-8"));
-                    NameFinderResultParser parser = new NameFinderResultParser();
-                    SAXParserFactory.newInstance().newSAXParser().parse(inputSource, parser);
-                    this.data = parser.getResult();
+                URL url = new URL("http://gazetteer.openstreetmap.org/namefinder/search.xml?find="
+                        +java.net.URLEncoder.encode(searchExpression, "UTF-8"));
+                synchronized(this) {
+                    connection = (HttpURLConnection)url.openConnection();
+                }
+                connection.setConnectTimeout(15000);
+                InputStream inputStream = connection.getInputStream();
+                InputSource inputSource = new InputSource(new InputStreamReader(inputStream, "UTF-8"));
+                NameFinderResultParser parser = new NameFinderResultParser();
+                SAXParserFactory.newInstance().newSAXParser().parse(inputSource, parser);
+                this.data = parser.getResult();
             } catch(Exception e) {
-                if (canceled) {
+                if (canceled)
                     // ignore exception
                     return;
-                }
                 lastException = e;
             }
@@ -344,5 +343,5 @@
     }
 
-    class NamedResultTableModel extends DefaultTableModel {
+    static class NamedResultTableModel extends DefaultTableModel {
         private ArrayList<SearchResult> data;
         private ListSelectionModel selectionModel;
@@ -378,7 +377,6 @@
 
         public SearchResult getSelectedSearchResult() {
-            if (selectionModel.getMinSelectionIndex() < 0) {
+            if (selectionModel.getMinSelectionIndex() < 0)
                 return null;
-            }
             return data.get(selectionModel.getMinSelectionIndex());
         }
@@ -442,5 +440,5 @@
     }
 
-    class NamedResultCellRenderer extends JLabel implements TableCellRenderer {
+    static class NamedResultCellRenderer extends JLabel implements TableCellRenderer {
 
         public NamedResultCellRenderer() {
Index: trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 2626)
@@ -399,5 +399,5 @@
     }
 
-    class BackAction extends AbstractAction implements Observer {
+    static class BackAction extends AbstractAction implements Observer {
         private HelpBrowserHistory history;
         public BackAction(HelpBrowserHistory history) {
@@ -419,5 +419,5 @@
     }
 
-    class ForwardAction extends AbstractAction implements Observer {
+    static class ForwardAction extends AbstractAction implements Observer {
         private HelpBrowserHistory history;
         public ForwardAction(HelpBrowserHistory history) {
Index: trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java	(revision 2626)
@@ -157,5 +157,5 @@
             ret += "/" + topic;
         }
-        ret.replaceAll("\\/+", "\\/"); // just in case, collapse sequences of //
+        ret = ret.replaceAll("\\/+", "\\/"); // just in case, collapse sequences of //
         return ret;
     }
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 2626)
@@ -881,5 +881,5 @@
      *
      */
-    class HistoryPrimitiveBuilder extends AbstractVisitor {
+    static class HistoryPrimitiveBuilder extends AbstractVisitor {
         private HistoryOsmPrimitive clone;
 
Index: trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java	(revision 2626)
@@ -169,5 +169,5 @@
     }
 
-    class NodeListPopupMenu extends JPopupMenu {
+    static class NodeListPopupMenu extends JPopupMenu {
         private ZoomToNodeAction zoomToNodeAction;
         private ShowHistoryAction showHistoryAction;
@@ -189,5 +189,5 @@
     }
 
-    class ZoomToNodeAction extends AbstractAction {
+    static class ZoomToNodeAction extends AbstractAction {
         private PrimitiveId primitiveId;
 
@@ -235,5 +235,5 @@
     }
 
-    class ShowHistoryAction extends AbstractAction {
+    static class ShowHistoryAction extends AbstractAction {
         private PrimitiveId primitiveId;
 
@@ -302,5 +302,5 @@
     }
 
-    class DoubleClickAdapter extends MouseAdapter {
+    static class DoubleClickAdapter extends MouseAdapter {
         private JTable table;
         private ShowHistoryAction showHistoryAction;
Index: trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java	(revision 2626)
@@ -9,5 +9,4 @@
 import java.util.Observable;
 import java.util.Observer;
-import java.util.logging.Logger;
 
 import javax.swing.DefaultListSelectionModel;
@@ -28,6 +27,6 @@
  */
 public class VersionTable extends JTable implements Observer{
+    //private static Logger logger = Logger.getLogger(VersionTable.class.getName());
 
-    private static Logger logger = Logger.getLogger(VersionTable.class.getName());
     private VersionTablePopupMenu popupMenu;
 
@@ -114,5 +113,5 @@
     }
 
-    class ChangesetInfoAction extends AbstractInfoAction {
+    static class ChangesetInfoAction extends AbstractInfoAction {
         private HistoryOsmPrimitive primitive;
 
@@ -143,5 +142,5 @@
     }
 
-    class VersionTablePopupMenu extends JPopupMenu {
+    static class VersionTablePopupMenu extends JPopupMenu {
 
         private ChangesetInfoAction changesetInfoAction;
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java	(revision 2626)
@@ -235,5 +235,5 @@
         if (strategy == null) return;
         rbStrategy.get(strategy.getStrategy()).setSelected(true);
-        tfChunkSize.setEnabled(strategy.equals(UploadStrategy.CHUNKED_DATASET_STRATEGY));
+        tfChunkSize.setEnabled(strategy.getStrategy() == UploadStrategy.CHUNKED_DATASET_STRATEGY);
         if (strategy.getStrategy().equals(UploadStrategy.CHUNKED_DATASET_STRATEGY)) {
             if (strategy.getChunkSize() != UploadStrategySpecification.UNSPECIFIED_CHUNK_SIZE) {
@@ -380,5 +380,5 @@
     }
 
-    class TextFieldFocusHandler implements FocusListener {
+    static class TextFieldFocusHandler implements FocusListener {
         public void focusGained(FocusEvent e) {
             Component c = e.getComponent();
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java	(revision 2626)
@@ -154,5 +154,5 @@
      *
      */
-    class PrimitiveListModel extends AbstractListModel{
+    static class PrimitiveListModel extends AbstractListModel{
         private List<OsmPrimitive> primitives;
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 2626)
@@ -85,5 +85,5 @@
     private boolean isLocalFile;
 
-    private class Markers {
+    private static class Markers {
         public boolean timedMarkersOmitted = false;
         public boolean untimedMarkersOmitted = false;
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 2626)
@@ -63,6 +63,6 @@
 import org.openstreetmap.josm.gui.layer.GpxLayer;
 import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.ImageEntry;
 import org.openstreetmap.josm.io.GpxReader;
-import org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.ImageEntry;
 import org.openstreetmap.josm.tools.ExifReader;
 import org.openstreetmap.josm.tools.GBC;
@@ -98,4 +98,5 @@
         }
 
+        @Override
         public String toString() {
             return name;
@@ -154,5 +155,5 @@
                                         tr("Error"),
                                         JOptionPane.ERROR_MESSAGE
-                                        );
+                                );
                             }
                             return;
@@ -178,5 +179,5 @@
                             tr("Error"),
                             JOptionPane.ERROR_MESSAGE
-                            );
+                    );
                     return;
                 } catch (IOException x) {
@@ -187,5 +188,5 @@
                             tr("Error"),
                             JOptionPane.ERROR_MESSAGE
-                            );
+                    );
                     return;
                 }
@@ -224,7 +225,7 @@
             panel.setLayout(new BorderLayout());
             panel.add(new JLabel(tr("<html>Take a photo of your GPS receiver while it displays the time.<br>"
-                                    + "Display that photo here.<br>"
-                                    + "And then, simply capture the time you read on the photo and select a timezone<hr></html>")),
-                                    BorderLayout.NORTH);
+                    + "Display that photo here.<br>"
+                    + "And then, simply capture the time you read on the photo and select a timezone<hr></html>")),
+                    BorderLayout.NORTH);
 
             imgDisp = new ImageDisplay();
@@ -285,6 +286,6 @@
 
                 String tzDesc = new StringBuffer(tzStr).append(" (")
-                                        .append(formatTimezone(tz.getRawOffset() / 3600000.0))
-                                        .append(')').toString();
+                .append(formatTimezone(tz.getRawOffset() / 3600000.0))
+                .append(')').toString();
                 vtTimezones.add(tzDesc);
             }
@@ -359,7 +360,6 @@
                     fc.showOpenDialog(Main.parent);
                     File sel = fc.getSelectedFile();
-                    if (sel == null) {
+                    if (sel == null)
                         return;
-                    }
 
                     imgDisp.setImage(sel);
@@ -392,8 +392,7 @@
                         JOptionPane.OK_CANCEL_OPTION,
                         JOptionPane.QUESTION_MESSAGE
-                        );
-                if (answer == JOptionPane.CANCEL_OPTION) {
+                );
+                if (answer == JOptionPane.CANCEL_OPTION)
                     return;
-                }
 
                 long delta;
@@ -401,5 +400,5 @@
                 try {
                     delta = dateFormat.parse(lbExifTime.getText()).getTime()
-                            - dateFormat.parse(tfGpsTime.getText()).getTime();
+                    - dateFormat.parse(tfGpsTime.getText()).getTime();
                 } catch(ParseException e) {
                     JOptionPane.showMessageDialog(Main.parent, tr("Error while parsing the date.\n"
@@ -437,12 +436,12 @@
             if (cur instanceof GpxLayer) {
                 gpxLst.add(new GpxDataWrapper(((GpxLayer) cur).getName(),
-                                              ((GpxLayer) cur).data,
-                                              ((GpxLayer) cur).data.storageFile));
+                        ((GpxLayer) cur).data,
+                        ((GpxLayer) cur).data.storageFile));
             }
         }
         for (GpxData data : loadedGpxData) {
             gpxLst.add(new GpxDataWrapper(data.storageFile.getName(),
-                                          data,
-                                          data.storageFile));
+                    data,
+                    data.storageFile));
         }
 
@@ -510,5 +509,5 @@
 
         JButton buttonViewGpsPhoto = new JButton(tr("<html>I can take a picture of my GPS receiver.<br>"
-                                                    + "Can this help?</html>"));
+                + "Can this help?</html>"));
         buttonViewGpsPhoto.addActionListener(new SetOffsetActionListener());
         gc.gridx = 2;
@@ -586,7 +585,7 @@
             ExtendedDialog dialog = new ExtendedDialog(
                     Main.parent,
-                tr("Correlate images with GPX track"),
-                new String[] { tr("Correlate"), tr("Auto-Guess"), tr("Cancel") }
-                    );
+                    tr("Correlate images with GPX track"),
+                    new String[] { tr("Correlate"), tr("Auto-Guess"), tr("Cancel") }
+            );
 
             dialog.setContent(panel);
@@ -602,5 +601,5 @@
             if (item == null || ! (item instanceof GpxDataWrapper)) {
                 JOptionPane.showMessageDialog(Main.parent, tr("You should select a GPX track"),
-                                              tr("No selected GPX track"), JOptionPane.ERROR_MESSAGE );
+                        tr("No selected GPX track"), JOptionPane.ERROR_MESSAGE );
                 continue;
             }
@@ -623,6 +622,7 @@
             if (deltaText.length() > 0) {
                 try {
-                    if(deltaText.startsWith("+"))
+                    if(deltaText.startsWith("+")) {
                         deltaText = deltaText.substring(1);
+                    }
                     delta = Long.parseLong(deltaText);
                 } catch(NumberFormatException nfe) {
@@ -681,5 +681,5 @@
                 tr("GPX Track loaded"),
                 ((dateImgLst.size() > 0 && matched == 0) ? JOptionPane.WARNING_MESSAGE
-                                                         : JOptionPane.INFORMATION_MESSAGE));
+                        : JOptionPane.INFORMATION_MESSAGE));
 
     }
@@ -714,6 +714,6 @@
         if(autoImgs.size() <= 0) {
             JOptionPane.showMessageDialog(Main.parent,
-                tr("The selected photos don't contain time information."),
-                tr("Photos don't contain time information"), JOptionPane.WARNING_MESSAGE);
+                    tr("The selected photos don't contain time information."),
+                    tr("Photos don't contain time information"), JOptionPane.WARNING_MESSAGE);
             return;
         }
@@ -722,8 +722,9 @@
         dialog.showDialog();
         // Will show first photo if none is selected yet
-        if(!dialog.hasImage())
+        if(!dialog.hasImage()) {
             yLayer.showNextPhoto();
-        // FIXME: If the dialog is minimized it will not be maximized. ToggleDialog is
-        // in need of a complete re-write to allow this in a reasonable way.
+            // FIXME: If the dialog is minimized it will not be maximized. ToggleDialog is
+            // in need of a complete re-write to allow this in a reasonable way.
+        }
 
         // Init variables
@@ -736,5 +737,7 @@
                 for (WayPoint curWp : segment) {
                     String curDateWpStr = (String) curWp.attr.get("time");
-                    if (curDateWpStr == null) continue;
+                    if (curDateWpStr == null) {
+                        continue;
+                    }
 
                     try {
@@ -749,6 +752,6 @@
         if(firstGPXDate < 0) {
             JOptionPane.showMessageDialog(Main.parent,
-                tr("The selected GPX track doesn't contain timestamps. Please select another one."),
-                tr("GPX Track has no time information"), JOptionPane.WARNING_MESSAGE);
+                    tr("The selected GPX track doesn't contain timestamps. Please select another one."),
+                    tr("GPX Track has no time information"), JOptionPane.WARNING_MESSAGE);
             return;
         }
@@ -756,6 +759,6 @@
         // seconds
         long diff = (yLayer.hasTimeoffset)
-            ? yLayer.timeoffset
-            : firstExifDate - firstGPXDate;
+        ? yLayer.timeoffset
+                : firstExifDate - firstGPXDate;
         yLayer.timeoffset = diff;
         yLayer.hasTimeoffset = true;
@@ -791,7 +794,9 @@
                 double tz = Math.abs(sldTimezone.getValue());
                 String zone = tz % 2 == 0
-                    ? (int)Math.floor(tz/2) + ":00"
-                    : (int)Math.floor(tz/2) + ":30";
-                if(sldTimezone.getValue() < 0) zone = "-" + zone;
+                ? (int)Math.floor(tz/2) + ":00"
+                        : (int)Math.floor(tz/2) + ":30";
+                if(sldTimezone.getValue() < 0) {
+                    zone = "-" + zone;
+                }
 
                 lblTimezone.setText(tr("Timezone: {0}", zone));
@@ -807,16 +812,16 @@
 
                 long timediff = (long) (gpstimezone * 3600)
-                        + dayOffset*24*60*60
-                        + sldMinutes.getValue()*60
-                        + sldSeconds.getValue();
+                + dayOffset*24*60*60
+                + sldMinutes.getValue()*60
+                + sldSeconds.getValue();
 
                 int matched = matchGpxTrack(autoImgs, autoGpx, timediff);
 
                 lblMatches.setText(
-                    tr("Matched {0} of {1} photos to GPX track.", matched, autoImgs.size())
-                    + ((Math.abs(dayOffset) == 0)
-                        ? ""
-                        : " " + tr("(Time difference of {0} days)", Math.abs(dayOffset))
-                      )
+                        tr("Matched {0} of {1} photos to GPX track.", matched, autoImgs.size())
+                        + ((Math.abs(dayOffset) == 0)
+                                ? ""
+                                        : " " + tr("(Time difference of {0} days)", Math.abs(dayOffset))
+                        )
                 );
 
@@ -824,8 +829,8 @@
                 int o = Math.abs(offset);
                 lblOffset.setText(
-                    tr("Offset between track and photos: {0}m {1}s",
-                          (offset < 0 ? "-" : "") + Long.toString(Math.round(o/60)),
-                          Long.toString(Math.round(o%60))
-                    )
+                        tr("Offset between track and photos: {0}m {1}s",
+                                (offset < 0 ? "-" : "") + Long.toString(o/60),
+                                Long.toString(o%60)
+                        )
                 );
 
@@ -886,8 +891,8 @@
         } catch(Exception e) {
             JOptionPane.showMessageDialog(Main.parent,
-                tr("An error occurred while trying to match the photos to the GPX track."
-                    +" You can adjust the sliders to manually match the photos."),
-                tr("Matching photos to track failed"),
-                JOptionPane.WARNING_MESSAGE);
+                    tr("An error occurred while trying to match the photos to the GPX track."
+                            +" You can adjust the sliders to manually match the photos."),
+                            tr("Matching photos to track failed"),
+                            JOptionPane.WARNING_MESSAGE);
         }
 
@@ -904,6 +909,6 @@
         // Settings are only saved temporarily to the layer.
         ExtendedDialog d = new ExtendedDialog(Main.parent,
-            tr("Adjust timezone and offset"),
-            new String[] { tr("Close"),  tr("Default Values") }
+                tr("Adjust timezone and offset"),
+                new String[] { tr("Close"),  tr("Default Values") }
         );
 
@@ -1001,5 +1006,5 @@
 
     private int matchPoints(ArrayList<ImageEntry> dateImgLst, WayPoint prevWp, long prevDateWp,
-                                                                   WayPoint curWp, long curDateWp) {
+            WayPoint curWp, long curDateWp) {
         // Time between the track point and the previous one, 5 sec if first point, i.e. photos take
         // 5 sec before the first track point can be assumed to be take at the starting position
@@ -1021,6 +1026,7 @@
             double distance = prevWp.getCoor().greatCircleDistance(curWp.getCoor());
             // This is in km/h, 3.6 * m/s
-            if (curDateWp > prevDateWp)
+            if (curDateWp > prevDateWp) {
                 speed = 3.6 * distance / (curDateWp - prevDateWp);
+            }
             try {
                 prevElevation = new Double((String) prevWp.attr.get("ele"));
@@ -1036,5 +1042,5 @@
         if(prevDateWp == 0 || curDateWp <= prevDateWp) {
             while(i >= 0 && (dateImgLst.get(i).time.getTime()/1000) <= curDateWp
-                        && (dateImgLst.get(i).time.getTime()/1000) >= (curDateWp - interval)) {
+                    && (dateImgLst.get(i).time.getTime()/1000) >= (curDateWp - interval)) {
                 if(dateImgLst.get(i).pos == null) {
                     dateImgLst.get(i).setCoor(curWp.getCoor());
@@ -1060,6 +1066,7 @@
                 dateImgLst.get(i).speed = speed;
 
-                if (curElevation != null && prevElevation != null)
+                if (curElevation != null && prevElevation != null) {
                     dateImgLst.get(i).elevation = prevElevation + (curElevation - prevElevation) * timeDiff;
+                }
 
                 ret++;
@@ -1087,8 +1094,9 @@
         while (endIndex - startIndex > 1) {
             curIndex= (int) Math.round((double)(endIndex + startIndex)/2);
-            if (searchedDate > dateImgLst.get(curIndex).time.getTime()/1000)
+            if (searchedDate > dateImgLst.get(curIndex).time.getTime()/1000) {
                 startIndex= curIndex;
-            else
+            } else {
                 endIndex= curIndex;
+            }
         }
         if (searchedDate < dateImgLst.get(endIndex).time.getTime()/1000)
@@ -1097,6 +1105,7 @@
         // This final loop is to check if photos with the exact same EXIF time follows
         while ((endIndex < (lstSize-1)) && (dateImgLst.get(endIndex).time.getTime()
-                                                == dateImgLst.get(endIndex + 1).time.getTime()))
+                == dateImgLst.get(endIndex + 1).time.getTime())) {
             endIndex++;
+        }
         return endIndex;
     }
@@ -1123,7 +1132,6 @@
 
     private Float parseTimezone(String timezone) {
-        if (timezone.length() == 0) {
+        if (timezone.length() == 0)
             return new Float(0);
-        }
 
         char sgnTimezone = '+';
@@ -1135,7 +1143,6 @@
             switch (c) {
             case ' ' :
-                if (state != 2 || hTimezone.length() != 0) {
+                if (state != 2 || hTimezone.length() != 0)
                     return null;
-                }
                 break;
             case '+' :
@@ -1144,7 +1151,6 @@
                     sgnTimezone = c;
                     state = 2;
-                } else {
+                } else
                     return null;
-                }
                 break;
             case ':' :
@@ -1152,7 +1158,6 @@
                 if (state == 2) {
                     state = 3;
-                } else {
+                } else
                     return null;
-                }
                 break;
             case '0' : case '1' : case '2' : case '3' : case '4' :
@@ -1188,9 +1193,8 @@
         }
 
-        if (h > 12 || m > 59 ) {
+        if (h > 12 || m > 59 )
             return null;
-        } else {
+        else
             return new Float((h + m / 60.0) * (sgnTimezone == '-' ? -1 : 1));
-        }
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 2626)
@@ -446,5 +446,5 @@
     }
 
-    public final  class ShowHideMarkerText extends AbstractAction {
+    public static final class ShowHideMarkerText extends AbstractAction {
         private final Layer layer;
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java	(revision 2626)
@@ -20,5 +20,5 @@
     RuleElem rule = new RuleElem();
 
-    class RuleElem {
+    static class RuleElem {
         Rule rule = new Rule();
         Collection<Rule> rules;
@@ -53,11 +53,12 @@
         int i = colString.indexOf("#");
         Color ret;
-        if(i < 0) // name only
+        if(i < 0) {
             ret = Main.pref.getColor("mappaint."+styleName+"."+colString, Color.red);
-        else if(i == 0) // value only
+        } else if(i == 0) {
             ret = ColorHelper.html2color(colString);
-        else // value and name
+        } else {
             ret = Main.pref.getColor("mappaint."+styleName+"."+colString.substring(0,i),
-            ColorHelper.html2color(colString.substring(i)));
+                    ColorHelper.html2color(colString.substring(i)));
+        }
         return ret;
     }
@@ -95,13 +96,13 @@
                     line.width = Integer.parseInt(val.substring(0, val.length()-1));
                     line.widthMode = LineElemStyle.WidthMode.PERCENT;
-                }
-                else
+                } else {
                     line.width = Integer.parseInt(val);
-            }
-            else if (atts.getQName(count).equals("colour"))
+                }
+            }
+            else if (atts.getQName(count).equals("colour")) {
                 line.color=convertColor(atts.getValue(count));
-            else if (atts.getQName(count).equals("realwidth"))
+            } else if (atts.getQName(count).equals("realwidth")) {
                 line.realWidth=Integer.parseInt(atts.getValue(count));
-            else if (atts.getQName(count).equals("dashed")) {
+            } else if (atts.getQName(count).equals("dashed")) {
                 try
                 {
@@ -109,5 +110,5 @@
                     line.dashed = new float[parts.length];
                     for (int i = 0; i < parts.length; i++) {
-                        line.dashed[i] = (float)(Integer.parseInt(parts[i]));
+                        line.dashed[i] = (Integer.parseInt(parts[i]));
                     }
                 } catch (NumberFormatException nfe) {
@@ -117,12 +118,13 @@
                     }
                 }
-            } else if (atts.getQName(count).equals("dashedcolour"))
+            } else if (atts.getQName(count).equals("dashedcolour")) {
                 line.dashedColor=convertColor(atts.getValue(count));
-            else if(atts.getQName(count).equals("priority"))
+            } else if(atts.getQName(count).equals("priority")) {
                 line.priority = Integer.parseInt(atts.getValue(count));
-            else if(atts.getQName(count).equals("mode"))
+            } else if(atts.getQName(count).equals("mode")) {
                 line.over = !atts.getValue(count).equals("under");
-            else
+            } else {
                 error("The element \"" + qName + "\" has unknown attribute \"" + atts.getQName(count) + "\"!");
+            }
         }
     }
@@ -131,20 +133,22 @@
         if (inDoc==true)
         {
-            if (qName.equals("rule"))
+            if (qName.equals("rule")) {
                 inRule=true;
-            else if (qName.equals("rules"))
+            } else if (qName.equals("rules"))
             {
                 if(styleName == null)
                 {
                     String n = atts.getValue("name");
-                    if(n == null) n = "standard";
+                    if(n == null) {
+                        n = "standard";
+                    }
                     styleName = n;
                 }
             }
-            else if (qName.equals("scale_max"))
+            else if (qName.equals("scale_max")) {
                 inScaleMax = true;
-            else if (qName.equals("scale_min"))
+            } else if (qName.equals("scale_min")) {
                 inScaleMin = true;
-            else if (qName.equals("condition") && inRule)
+            } else if (qName.equals("condition") && inRule)
             {
                 inCondition=true;
@@ -152,6 +156,7 @@
                 if(r.key != null)
                 {
-                    if(rule.rules == null)
+                    if(rule.rules == null) {
                         rule.rules = new LinkedList<Rule>();
+                    }
                     rule.rules.add(new Rule(rule.rule));
                     r = new Rule();
@@ -160,15 +165,17 @@
                 for (int count=0; count<atts.getLength(); count++)
                 {
-                    if(atts.getQName(count).equals("k"))
+                    if(atts.getQName(count).equals("k")) {
                         r.key = atts.getValue(count);
-                    else if(atts.getQName(count).equals("v"))
+                    } else if(atts.getQName(count).equals("v")) {
                         r.value = atts.getValue(count);
-                    else if(atts.getQName(count).equals("b"))
+                    } else if(atts.getQName(count).equals("b")) {
                         r.boolValue = atts.getValue(count);
-                    else
+                    } else {
                         error("The element \"" + qName + "\" has unknown attribute \"" + atts.getQName(count) + "\"!");
-                }
-                if(r.key == null)
+                    }
+                }
+                if(r.key == null) {
                     error("The condition has no key!");
+                }
             }
             else if (qName.equals("line"))
@@ -195,10 +202,11 @@
                         hadIcon = (icon != null);
                         rule.icon.icon = icon;
-                    } else if (atts.getQName(count).equals("annotate"))
+                    } else if (atts.getQName(count).equals("annotate")) {
                         rule.icon.annotate = Boolean.parseBoolean (atts.getValue(count));
-                    else if(atts.getQName(count).equals("priority"))
+                    } else if(atts.getQName(count).equals("priority")) {
                         rule.icon.priority = Integer.parseInt(atts.getValue(count));
-                    else
+                    } else {
                         error("The element \"" + qName + "\" has unknown attribute \"" + atts.getQName(count) + "\"!");
+                    }
                 }
             }
@@ -208,16 +216,17 @@
                 for (int count=0; count<atts.getLength(); count++)
                 {
-                    if (atts.getQName(count).equals("colour"))
+                    if (atts.getQName(count).equals("colour")) {
                         rule.area.color=convertColor(atts.getValue(count));
-                    else if (atts.getQName(count).equals("closed"))
+                    } else if (atts.getQName(count).equals("closed")) {
                         rule.area.closed=Boolean.parseBoolean(atts.getValue(count));
-                    else if(atts.getQName(count).equals("priority"))
+                    } else if(atts.getQName(count).equals("priority")) {
                         rule.area.priority = Integer.parseInt(atts.getValue(count));
-                    else
+                    } else {
                         error("The element \"" + qName + "\" has unknown attribute \"" + atts.getQName(count) + "\"!");
-                }
-            }
-            else
+                    }
+                }
+            } else {
                 error("The element \"" + qName + "\" is unknown!");
+            }
         }
     }
@@ -230,20 +239,20 @@
             {
                 styles.add(styleName, rule.rule, rule.rules,
-                new LineElemStyle(rule.line, rule.scaleMax, rule.scaleMin));
+                        new LineElemStyle(rule.line, rule.scaleMax, rule.scaleMin));
             }
             if(hadLineMod)
             {
                 styles.addModifier(styleName, rule.rule, rule.rules,
-                new LineElemStyle(rule.linemod, rule.scaleMax, rule.scaleMin));
+                        new LineElemStyle(rule.linemod, rule.scaleMax, rule.scaleMin));
             }
             if(hadIcon)
             {
                 styles.add(styleName, rule.rule, rule.rules,
-                new IconElemStyle(rule.icon, rule.scaleMax, rule.scaleMin));
+                        new IconElemStyle(rule.icon, rule.scaleMax, rule.scaleMin));
             }
             if(hadArea)
             {
                 styles.add(styleName, rule.rule, rule.rules,
-                new AreaElemStyle(rule.area, rule.scaleMax, rule.scaleMin));
+                        new AreaElemStyle(rule.area, rule.scaleMax, rule.scaleMin));
             }
             inRule = false;
@@ -251,26 +260,28 @@
             rule.init();
         }
-        else if (inCondition && qName.equals("condition"))
+        else if (inCondition && qName.equals("condition")) {
             inCondition = false;
-        else if (inLine && qName.equals("line"))
+        } else if (inLine && qName.equals("line")) {
             inLine = false;
-        else if (inLineMod && qName.equals("linemod"))
+        } else if (inLineMod && qName.equals("linemod")) {
             inLineMod = false;
-        else if (inIcon && qName.equals("icon"))
+        } else if (inIcon && qName.equals("icon")) {
             inIcon = false;
-        else if (inArea && qName.equals("area"))
+        } else if (inArea && qName.equals("area")) {
             inArea = false;
-        else if (qName.equals("scale_max"))
+        } else if (qName.equals("scale_max")) {
             inScaleMax = false;
-        else if (qName.equals("scale_min"))
+        } else if (qName.equals("scale_min")) {
             inScaleMin = false;
+        }
     }
 
     @Override public void characters(char ch[], int start, int length)
     {
-        if (inScaleMax == true)
+        if (inScaleMax == true) {
             rule.scaleMax = Long.parseLong(new String(ch, start, length));
-        else if (inScaleMin == true)
+        } else if (inScaleMin == true) {
             rule.scaleMin = Long.parseLong(new String(ch, start, length));
+        }
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 2626)
@@ -17,5 +17,5 @@
 public class ElemStyles
 {
-    public class StyleSet {
+    public static class StyleSet {
         private HashMap<String, IconElemStyle> icons;
         private HashMap<String, LineElemStyle> lines;
@@ -46,22 +46,26 @@
                 if((style = icons.get("n" + key + "=" + val)) != null)
                 {
-                    if(ret == null || style.priority > ret.priority)
+                    if(ret == null || style.priority > ret.priority) {
                         ret = style;
+                    }
                 }
                 if((style = icons.get("b" + key + "=" + OsmUtils.getNamedOsmBoolean(val))) != null)
                 {
-                    if(ret == null || style.priority > ret.priority)
+                    if(ret == null || style.priority > ret.priority) {
                         ret = style;
+                    }
                 }
                 if((style = icons.get("x" + key)) != null)
                 {
-                    if(ret == null || style.priority > ret.priority)
+                    if(ret == null || style.priority > ret.priority) {
                         ret = style;
+                    }
                 }
             }
             for(IconElemStyle s : iconsList)
             {
-                if((ret == null || s.priority > ret.priority) && s.check(primitive))
+                if((ret == null || s.priority > ret.priority) && s.check(primitive)) {
                     ret = s;
+                }
             }
             return ret;
@@ -80,58 +84,67 @@
                 String idx = "n" + key + "=" + val;
                 if((styleArea = areas.get(idx)) != null && (retArea == null
-                || styleArea.priority > retArea.priority) && (!noclosed
-                || !styleArea.closed))
+                        || styleArea.priority > retArea.priority) && (!noclosed
+                                || !styleArea.closed)) {
                     retArea = styleArea;
+                }
                 if((styleLine = lines.get(idx)) != null && (retLine == null
-                || styleLine.priority > retLine.priority))
+                        || styleLine.priority > retLine.priority))
                 {
                     retLine = styleLine;
                     linestring = idx;
                 }
-                if((styleLine = modifiers.get(idx)) != null)
+                if((styleLine = modifiers.get(idx)) != null) {
                     over.put(idx, styleLine);
+                }
                 idx = "b" + key + "=" + OsmUtils.getNamedOsmBoolean(val);
                 if((styleArea = areas.get(idx)) != null && (retArea == null
-                || styleArea.priority > retArea.priority) && (!noclosed
-                || !styleArea.closed))
+                        || styleArea.priority > retArea.priority) && (!noclosed
+                                || !styleArea.closed)) {
                     retArea = styleArea;
+                }
                 if((styleLine = lines.get(idx)) != null && (retLine == null
-                || styleLine.priority > retLine.priority))
+                        || styleLine.priority > retLine.priority))
                 {
                     retLine = styleLine;
                     linestring = idx;
                 }
-                if((styleLine = modifiers.get(idx)) != null)
+                if((styleLine = modifiers.get(idx)) != null) {
                     over.put(idx, styleLine);
+                }
                 idx = "x" + key;
                 if((styleArea = areas.get(idx)) != null && (retArea == null
-                || styleArea.priority > retArea.priority) && (!noclosed
-                || !styleArea.closed))
+                        || styleArea.priority > retArea.priority) && (!noclosed
+                                || !styleArea.closed)) {
                     retArea = styleArea;
+                }
                 if((styleLine = lines.get(idx)) != null && (retLine == null
-                || styleLine.priority > retLine.priority))
+                        || styleLine.priority > retLine.priority))
                 {
                     retLine = styleLine;
                     linestring = idx;
                 }
-                if((styleLine = modifiers.get(idx)) != null)
+                if((styleLine = modifiers.get(idx)) != null) {
                     over.put(idx, styleLine);
+                }
             }
             for(AreaElemStyle s : areasList)
             {
                 if((retArea == null || s.priority > retArea.priority)
-                && (!noclosed || !s.closed) && s.check(primitive))
+                        && (!noclosed || !s.closed) && s.check(primitive)) {
                     retArea = s;
+                }
             }
             for(LineElemStyle s : linesList)
             {
                 if((retLine == null || s.priority > retLine.priority)
-                && s.check(primitive))
+                        && s.check(primitive)) {
                     retLine = s;
+                }
             }
             for(LineElemStyle s : modifiersList)
             {
-                if(s.check(primitive))
+                if(s.check(primitive)) {
                     over.put(s.getCode(), s);
+                }
             }
             over.remove(linestring);
@@ -155,6 +168,6 @@
         {
             return (!osm.hasKeys()) ? null :
-            ((osm instanceof Node) ? getNode(osm) : get(osm,
-            osm instanceof Way && !((Way)osm).isClosed()));
+                ((osm instanceof Node) ? getNode(osm) : get(osm,
+                        osm instanceof Way && !((Way)osm).isClosed()));
         }
 
@@ -187,8 +200,10 @@
                     String val = o.get(key);
                     AreaElemStyle s = areas.get("n" + key + "=" + val);
-                    if(s == null || (s.closed && noclosed))
+                    if(s == null || (s.closed && noclosed)) {
                         s = areas.get("b" + key + "=" + OsmUtils.getNamedOsmBoolean(val));
-                    if(s == null || (s.closed && noclosed))
+                    }
+                    if(s == null || (s.closed && noclosed)) {
                         s = areas.get("x" + key);
+                    }
                     if(s != null && !(s.closed && noclosed))
                         return true;
@@ -277,6 +292,7 @@
     private StyleSet getStyleSet(String name, boolean create)
     {
-        if(name == null)
+        if(name == null) {
             name = Main.pref.get("mappaint.style", "standard");
+        }
 
         StyleSet s = styleSet.get(name);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/StyleSourceEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/StyleSourceEditor.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/StyleSourceEditor.java	(revision 2626)
@@ -217,5 +217,5 @@
     }
 
-    class AvailableStylesListModel extends DefaultListModel {
+    static class AvailableStylesListModel extends DefaultListModel {
         private ArrayList<StyleSourceInfo> data;
         private DefaultListSelectionModel selectionModel;
@@ -269,5 +269,5 @@
     }
 
-    class ActiveStylesModel extends AbstractTableModel {
+    static class ActiveStylesModel extends AbstractTableModel {
         private ArrayList<String> data;
         private DefaultListSelectionModel selectionModel;
@@ -385,5 +385,5 @@
     }
 
-    public class StyleSourceInfo {
+    public static class StyleSourceInfo {
         String version;
         String name;
@@ -522,5 +522,5 @@
     }
 
-    class IconPathTableModel extends AbstractTableModel {
+    static class IconPathTableModel extends AbstractTableModel {
         private ArrayList<String> data;
         private DefaultListSelectionModel selectionModel;
@@ -675,5 +675,5 @@
     }
 
-    class StyleSourceCellRenderer extends JLabel implements ListCellRenderer {
+    static class StyleSourceCellRenderer extends JLabel implements ListCellRenderer {
         public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                 boolean cellHasFocus) {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 2626)
@@ -30,5 +30,4 @@
 import javax.swing.table.DefaultTableColumnModel;
 import javax.swing.table.TableColumn;
-import javax.swing.table.TableColumnModel;
 import javax.swing.table.TableModel;
 
@@ -394,6 +393,7 @@
         if (editor == null) {
             logger.warning("editor is null. cannot register OK accelator listener.");
-        }
-        editor.getEditor().addKeyListener(l);
+        } else {
+            editor.getEditor().addKeyListener(l);
+        }
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 2626)
@@ -667,5 +667,5 @@
     }
 
-    private class PresetPanel extends JPanel {
+    private static class PresetPanel extends JPanel {
         boolean hasElements = false;
         PresetPanel()
Index: trunk/src/org/openstreetmap/josm/io/MultiPartFormOutputStream.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/MultiPartFormOutputStream.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/io/MultiPartFormOutputStream.java	(revision 2626)
@@ -8,8 +8,8 @@
 are permitted provided that the following conditions are met:
 
-    * Redistribution of source code must retain the above copyright notice, this list
+ * Redistribution of source code must retain the above copyright notice, this list
       of conditions and the following disclaimer.
 
-    * Redistribution in binary form must reproduce the above copyright notice, this
+ * Redistribution in binary form must reproduce the above copyright notice, this
       list of conditions and the following disclaimer in the documentation and/or other
       materials provided with the distribution.
@@ -31,5 +31,5 @@
 You acknowledge that this software is not designed, licensed or intended for use in the
 design, construction, operation or maintenance of any nuclear facility.
-*/
+ */
 
 package org.openstreetmap.josm.io;
@@ -86,10 +86,8 @@
      */
     public MultiPartFormOutputStream(OutputStream os, String boundary) {
-        if(os == null) {
+        if(os == null)
             throw new IllegalArgumentException("Output stream is required.");
-        }
-        if(boundary == null || boundary.length() == 0) {
+        if(boundary == null || boundary.length() == 0)
             throw new IllegalArgumentException("Boundary stream is required.");
-        }
         this.out = new DataOutputStream(os);
         this.boundary = boundary;
@@ -106,5 +104,5 @@
     public void writeField(String name, boolean value)
     throws java.io.IOException {
-        writeField(name, new Boolean(value).toString());
+        writeField(name, Boolean.valueOf(value).toString());
     }
 
@@ -178,5 +176,5 @@
     public void writeField(String name, char value)
     throws java.io.IOException {
-        writeField(name, new Character(value).toString());
+        writeField(name, Character.valueOf(value).toString());
     }
 
@@ -191,7 +189,6 @@
     public void writeField(String name, String value)
     throws java.io.IOException {
-        if(name == null) {
+        if(name == null)
             throw new IllegalArgumentException("Name cannot be null or empty.");
-        }
         if(value == null) {
             value = "";
@@ -229,13 +226,10 @@
     public void writeFile(String name, String mimeType, java.io.File file)
     throws java.io.IOException {
-        if(file == null) {
+        if(file == null)
             throw new IllegalArgumentException("File cannot be null.");
-        }
-        if(!file.exists()) {
+        if(!file.exists())
             throw new IllegalArgumentException("File does not exist.");
-        }
-        if(file.isDirectory()) {
+        if(file.isDirectory())
             throw new IllegalArgumentException("File cannot be a directory.");
-        }
         writeFile(name, mimeType, file.getCanonicalPath(), new FileInputStream(file));
     }
@@ -254,10 +248,8 @@
             String fileName, InputStream is)
     throws java.io.IOException {
-        if(is == null) {
+        if(is == null)
             throw new IllegalArgumentException("Input stream cannot be null.");
-        }
-        if(fileName == null || fileName.length() == 0) {
+        if(fileName == null || fileName.length() == 0)
             throw new IllegalArgumentException("File name cannot be null or empty.");
-        }
         /*
             --boundary\r\n
@@ -308,10 +300,8 @@
             String fileName, byte[] data)
     throws java.io.IOException {
-        if(data == null) {
+        if(data == null)
             throw new IllegalArgumentException("Data cannot be null.");
-        }
-        if(fileName == null || fileName.length() == 0) {
+        if(fileName == null || fileName.length() == 0)
             throw new IllegalArgumentException("File name cannot be null or empty.");
-        }
         /*
             --boundary\r\n
Index: trunk/src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 2626)
@@ -132,6 +132,6 @@
     public GpxData data;
 
-//  private final static SimpleDateFormat GGATIMEFMT =
-//      new SimpleDateFormat("HHmmss.SSS");
+    //  private final static SimpleDateFormat GGATIMEFMT =
+    //      new SimpleDateFormat("HHmmss.SSS");
     private final static SimpleDateFormat RMCTIMEFMT =
         new SimpleDateFormat("ddMMyyHHmmss.SSS");
@@ -142,7 +142,9 @@
     {
         Date d = RMCTIMEFMT.parse(p, new ParsePosition(0));
+        if (d == null) {
+            d = RMCTIMEFMTSTD.parse(p, new ParsePosition(0));
+        }
         if (d == null)
-            d = RMCTIMEFMTSTD.parse(p, new ParsePosition(0));
-        if (d == null) throw(null); // malformed
+            throw new RuntimeException("Date is malformed"); // malformed
         return d;
     }
@@ -181,13 +183,14 @@
             int loopstart_char = rd.read();
             ps = new NMEAParserState();
-            if(loopstart_char == -1) {// zero size file
+            if(loopstart_char == -1)
                 //TODO tell user about the problem?
                 return;
-            }
             sb.append((char)loopstart_char);
             ps.p_Date="010100"; // TODO date problem
             while(true) {
                 // don't load unparsable files completely to memory
-                if(sb.length()>=1020) sb.delete(0, sb.length()-1);
+                if(sb.length()>=1020) {
+                    sb.delete(0, sb.length()-1);
+                }
                 int c = rd.read();
                 if(c=='$') {
@@ -199,5 +202,7 @@
                     ParseNMEASentence(sb.toString(),ps);
                     break;
-                } else sb.append((char)c);
+                } else {
+                    sb.append((char)c);
+                }
             }
             rd.close();
@@ -209,5 +214,5 @@
         }
     }
-    private class NMEAParserState {
+    private static class NMEAParserState {
         protected Collection<WayPoint> waypoints = new ArrayList<WayPoint>();
         protected String p_Time;
@@ -239,5 +244,7 @@
                 byte[] chb = chkstrings[0].getBytes();
                 int chk=0;
-                for(int i = 1; i < chb.length; i++) chk ^= chb[i];
+                for(int i = 1; i < chb.length; i++) {
+                    chk ^= chb[i];
+                }
                 if(Integer.parseInt(chkstrings[1].substring(0,2),16) != chk) {
                     //System.out.println("Checksum error");
@@ -246,7 +253,7 @@
                     return false;
                 }
+            } else {
+                ps.no_checksum++;
             }
-            else
-                ps.no_checksum++;
             // now for the content
             String[] e = chkstrings[0].split(",");
@@ -264,5 +271,5 @@
                         e[GPGGA.LATITUDE.position],
                         e[GPGGA.LONGITUDE.position]
-                    );
+                );
                 if(latLon==null) throw(null); // malformed
 
@@ -291,11 +298,13 @@
                 accu=e[GPGGA.HEIGHT_UNTIS.position];
                 if(accu.equals("M")) {
-                        // Ignore heights that are not in meters for now
-                        accu=e[GPGGA.HEIGHT.position];
-                        if(!accu.equals("")) {
+                    // Ignore heights that are not in meters for now
+                    accu=e[GPGGA.HEIGHT.position];
+                    if(!accu.equals("")) {
                         Double.parseDouble(accu);
                         // if it throws it's malformed; this should only happen if the
                         // device sends nonstandard data.
-                        if(!accu.equals("")) currentwp.attr.put("ele", accu);
+                        if(!accu.equals("")) {
+                            currentwp.attr.put("ele", accu);
+                        }
                     }
                 }
@@ -309,6 +318,7 @@
                 // h-dilution
                 accu=e[GPGGA.HDOP.position];
-                if(!accu.equals(""))
+                if(!accu.equals("")) {
                     currentwp.attr.put("hdop", Float.parseFloat(accu));
+                }
                 // fix
                 accu=e[GPGGA.QUALITY.position];
@@ -320,6 +330,9 @@
                         break;
                     case 1:
-                        if(sat < 4) currentwp.attr.put("fix", "2d");
-                        else currentwp.attr.put("fix", "3d");
+                        if(sat < 4) {
+                            currentwp.attr.put("fix", "2d");
+                        } else {
+                            currentwp.attr.put("fix", "3d");
+                        }
                         break;
                     case 2:
@@ -354,14 +367,17 @@
                 // vdop
                 accu=e[GPGSA.VDOP.position];
-                if(!accu.equals(""))
+                if(!accu.equals("")) {
                     currentwp.attr.put("vdop", Float.parseFloat(accu));
+                }
                 // hdop
                 accu=e[GPGSA.HDOP.position];
-                if(!accu.equals(""))
+                if(!accu.equals("")) {
                     currentwp.attr.put("hdop", Float.parseFloat(accu));
+                }
                 // pdop
                 accu=e[GPGSA.PDOP.position];
-                if(!accu.equals(""))
+                if(!accu.equals("")) {
                     currentwp.attr.put("pdop", Float.parseFloat(accu));
+                }
             }
             else if(e[0].equals("$GPRMC")) {
@@ -372,6 +388,5 @@
                         e[GPRMC.WIDTH_NORTH.position],
                         e[GPRMC.LENGTH_EAST.position]
-                    );
-                if(latLon==null) throw(null);
+                );
                 if((latLon.lat()==0.0) && (latLon.lon()==0.0)) {
                     ps.zero_coord++;
@@ -439,5 +454,5 @@
 
     private LatLon parseLatLon(String ns, String ew, String dlat, String dlon)
-        throws NumberFormatException {
+    throws NumberFormatException {
         String widthNorth = dlat.trim();
         String lengthEast = dlon.trim();
@@ -456,6 +471,7 @@
         int latdeg = Integer.parseInt(widthNorth.substring(0, latdegsep));
         double latmin = Double.parseDouble(widthNorth.substring(latdegsep));
-        if(latdeg < 0) // strange data with '-' sign
+        if(latdeg < 0) {
             latmin *= -1.0;
+        }
         double lat = latdeg + latmin / 60;
         if ("S".equals(ns)) {
@@ -468,6 +484,7 @@
         int londeg = Integer.parseInt(lengthEast.substring(0, londegsep));
         double lonmin = Double.parseDouble(lengthEast.substring(londegsep));
-        if(londeg < 0) // strange data with '-' sign
+        if(londeg < 0) {
             lonmin *= -1.0;
+        }
         double lon = londeg + lonmin / 60;
         if ("W".equals(ew)) {
Index: trunk/src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 2626)
@@ -557,9 +557,9 @@
                     } else if (rm.type.equals("relation")) {
                         primitive = new Relation(rm.id);
-                    } else {
+                    } else
                         // can't happen, we've been testing for valid member types
                         // at the beginning of this method
                         //
-                    }
+                        throw new AssertionError();
                     ds.addPrimitive(primitive);
                     externalIdMap.put(new SimplePrimitiveId(rm.id, OsmPrimitiveType.fromApiTypeName(rm.type)), primitive);
Index: trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 2626)
@@ -31,6 +31,6 @@
                 String bbox[] = map.get("bbox").split(",");
                 b = new Bounds(
-                    new LatLon(Double.parseDouble(bbox[1]), Double.parseDouble(bbox[0])),
-                    new LatLon(Double.parseDouble(bbox[3]), Double.parseDouble(bbox[2])));
+                        new LatLon(Double.parseDouble(bbox[1]), Double.parseDouble(bbox[0])),
+                        new LatLon(Double.parseDouble(bbox[3]), Double.parseDouble(bbox[2])));
             } else if (map.containsKey("minlat")) {
                 String s = map.get("minlat");
@@ -45,6 +45,6 @@
             } else {
                 b = positionToBounds(parseDouble(map, "lat"),
-                                     parseDouble(map, "lon"),
-                                     Integer.parseInt(map.get("zoom")));
+                        parseDouble(map, "lon"),
+                        Integer.parseInt(map.get("zoom")));
             }
         } catch (NumberFormatException x) {
@@ -81,7 +81,6 @@
      */
     private static Bounds parseShortLink(final String url) {
-        if (!url.startsWith(SHORTLINK_PREFIX)) {
+        if (!url.startsWith(SHORTLINK_PREFIX))
             return null;
-        }
         final String shortLink = url.substring(SHORTLINK_PREFIX.length());
 
@@ -125,7 +124,7 @@
         // 2**32 == 4294967296
         return positionToBounds(y * 180.0 / 4294967296.0 - 90.0,
-                                x * 360.0 / 4294967296.0 - 180.0,
-                                // TODO: -2 was not in ruby code
-                                zoom - 8 - (zoomOffset % 3) - 2);
+                x * 360.0 / 4294967296.0 - 180.0,
+                // TODO: -2 was not in ruby code
+                zoom - 8 - (zoomOffset % 3) - 2);
     }
 
@@ -133,6 +132,6 @@
         final double size = 180.0 / Math.pow(2, zoom);
         return new Bounds(
-                          new LatLon(lat - size/2, lon - size),
-                          new LatLon(lat + size/2, lon + size));
+                new LatLon(lat - size/2, lon - size),
+                new LatLon(lat + size/2, lon + size));
     }
 
@@ -144,6 +143,7 @@
         int zoom = 0;
         while (zoom <= 20) {
-            if (size >= 180)
+            if (size >= 180) {
                 break;
+            }
             size *= 2;
             zoom++;
@@ -163,5 +163,5 @@
         double lon = (Math.round(pos.lon() * decimals));
         lon /= decimals;
-        return new String("http://www.openstreetmap.org/?lat="+lat+"&lon="+lon+"&zoom="+zoom);
+        return "http://www.openstreetmap.org/?lat="+lat+"&lon="+lon+"&zoom="+zoom;
     }
 }
Index: trunk/src/org/openstreetmap/josm/tools/Pair.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Pair.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/tools/Pair.java	(revision 2626)
@@ -18,7 +18,10 @@
     }
 
-    @Override public boolean equals(Object o) {
-        return o == null ? o == null : o instanceof Pair
-            && a.equals(((Pair<?,?>) o).a) && b.equals(((Pair<?,?>) o).b);
+    @Override public boolean equals(Object other) {
+        if (other instanceof Pair<?, ?>) {
+            Pair<?, ?> o = (Pair<?, ?>)other;
+            return a.equals(o.a) && b.equals(o.b);
+        } else
+            return false;
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/Shortcut.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 2625)
+++ trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 2626)
@@ -273,5 +273,5 @@
         // pull in the groups
         for (int i = GROUP_NONE; i < GROUP__MAX+GROUPS_ALT2*2; i++) { // fill more groups, so registering with e.g. ALT2+MNEMONIC won't NPE
-            groups.put(new Integer(i), new Integer(Main.pref.getInteger("shortcut.groups."+i, -1)));
+            groups.put(i, Main.pref.getInteger("shortcut.groups."+i, -1));
         }
         // (1) System reserved shortcuts
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java	(revision 2625)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java	(revision 2626)
@@ -11,4 +11,5 @@
 import java.beans.PropertyChangeListener;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
@@ -46,5 +47,5 @@
                 int rows[] = (int[])idx[i];
                 if (rows == null || rows.length != 2) {
-                    fail("illegal selection range. Either null or not length 2: " + rows);
+                    fail("illegal selection range. Either null or not length 2: " + Arrays.toString(rows));
                 }
                 if (rows[0] > rows[1]) {
