Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 4869)
@@ -125,5 +125,5 @@
      * The global paste buffer.
      */
-    public static PrimitiveDeepCopy pasteBuffer = new PrimitiveDeepCopy();
+    public static final PrimitiveDeepCopy pasteBuffer = new PrimitiveDeepCopy();
     public static Layer pasteSource;
 
@@ -376,5 +376,5 @@
     }
 
-    protected static JPanel contentPanePrivate = new JPanel(new BorderLayout());
+    protected static final JPanel contentPanePrivate = new JPanel(new BorderLayout());
 
     /**
@@ -420,5 +420,5 @@
     ///////////////////////////////////////////////////////////////////////////
 
-    public static JPanel panel = new JPanel(new BorderLayout());
+    public static final JPanel panel = new JPanel(new BorderLayout());
 
     protected static Rectangle bounds;
Index: trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 4869)
@@ -26,7 +26,7 @@
      * list of supported formats
      */
-    public static ArrayList<FileImporter> importers;
-
-    public static ArrayList<FileExporter> exporters;
+    public static final ArrayList<FileImporter> importers;
+
+    public static final ArrayList<FileExporter> exporters;
 
     // add some file types only if the relevant classes are there;
@@ -88,5 +88,5 @@
                     }
                 }
-        );
+                );
     }
 
@@ -198,5 +198,5 @@
             if (name.endsWith("."+ext))
                 return true;
-        return false;
+                return false;
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 4869)
@@ -51,5 +51,5 @@
                 JOptionPane.WARNING_MESSAGE,
                 HelpUtil.ht("/Action/SimplifyWay#SelectAWayToSimplify")
-        );
+                );
     }
 
@@ -61,11 +61,11 @@
                         tr("Simplify all selected ways"),
                         null
-                ),
-                new ButtonSpec(
-                        tr("Cancel"),
-                        ImageProvider.get("cancel"),
-                        tr("Cancel operation"),
-                        null
-                )
+                        ),
+                        new ButtonSpec(
+                                tr("Cancel"),
+                                ImageProvider.get("cancel"),
+                                tr("Cancel operation"),
+                                null
+                                )
         };
         int ret = HelpAwareOptionPane.showOptionDialog(
@@ -74,12 +74,12 @@
                         "The selection contains {0} ways. Are you sure you want to simplify them all?",
                         numWays
-                ),
-                tr("Simplify ways?"),
-                JOptionPane.WARNING_MESSAGE,
-                null, // no special icon
-                options,
-                options[0],
-                HelpUtil.ht("/Action/SimplifyWay#ConfirmSimplifyAll")
-        );
+                        ),
+                        tr("Simplify ways?"),
+                        JOptionPane.WARNING_MESSAGE,
+                        null, // no special icon
+                        options,
+                        options[0],
+                        HelpUtil.ht("/Action/SimplifyWay#ConfirmSimplifyAll")
+                );
         return ret == 0;
     }
@@ -94,8 +94,7 @@
                 alertSelectAtLeastOneWay();
                 return;
-            } else if (!confirmWayWithNodesOutsideBoundingBox(ways)) {
+            } else if (!confirmWayWithNodesOutsideBoundingBox(ways))
                 return;
-            }
-             else if (ways.size() > 10) {
+            else if (ways.size() > 10) {
                 if (!confirmSimplifyManyWays(ways.size()))
                     return;
@@ -114,5 +113,5 @@
                     trn("Simplify {0} way", "Simplify {0} ways", allCommands.size(), allCommands.size()),
                     allCommands
-            );
+                    );
             Main.main.undoRedo.add(rootCommand);
         } finally {
@@ -235,5 +234,5 @@
     }
 
-    public static double EARTH_RAD = 6378137.0;
+    public static final double EARTH_RAD = 6378137.0;
 
     /* From Aviaton Formulary v1.3
Index: trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 4869)
@@ -1,6 +1,4 @@
 // License: GPL. Copyright 2007 by Immanuel Scholz and others
 package org.openstreetmap.josm.data.coor;
-
-import static org.openstreetmap.josm.tools.I18n.trc;
 
 import static java.lang.Math.PI;
@@ -11,4 +9,5 @@
 import static java.lang.Math.sqrt;
 import static java.lang.Math.toRadians;
+import static org.openstreetmap.josm.tools.I18n.trc;
 
 import java.math.BigDecimal;
@@ -30,5 +29,5 @@
 public class LatLon extends Coordinate {
 
-    
+
     /**
      * Minimum difference in location to not be represented as the same position.
@@ -41,5 +40,5 @@
     private static DecimalFormat cDmsSecondFormatter = new DecimalFormat("00.0");
     private static DecimalFormat cDmMinuteFormatter = new DecimalFormat("00.000");
-    public static DecimalFormat cDdFormatter;
+    public static final DecimalFormat cDdFormatter;
     static {
         // Don't use the localized decimal separator. This way we can present
@@ -68,14 +67,14 @@
         return lon >= -180d && lon <= 180d;
     }
- 		     
-	/**
-	 * Replies true if lat is in the range [-90,90] and lon is in the range [-180,180]
-	 * 
-	 * @return true if lat is in the range [-90,90] and lon is in the range [-180,180]
-	 */
-	public boolean isValid() {
-		return isValidLat(lat()) && isValidLon(lon());
-	}
-	
+
+    /**
+     * Replies true if lat is in the range [-90,90] and lon is in the range [-180,180]
+     *
+     * @return true if lat is in the range [-90,90] and lon is in the range [-180,180]
+     */
+    public boolean isValid() {
+        return isValidLat(lat()) && isValidLon(lon());
+    }
+
     public static double toIntervalLat(double value) {
         if (value < -90)
@@ -88,16 +87,16 @@
     /**
      * Returns a valid OSM longitude [-180,+180] for the given extended longitude value.
-     * For example, a value of -181 will return +179, a value of +181 will return -179. 
+     * For example, a value of -181 will return +179, a value of +181 will return -179.
      * @param lon A longitude value not restricted to the [-180,+180] range.
      */
     public static double toIntervalLon(double value) {
-        if (isValidLon(value)) {
+        if (isValidLon(value))
             return value;
-        } else {
+        else {
             int n = (int) (value + Math.signum(value)*180.0) / 360;
             return value - n*360.0;
         }
     }
- 	
+
     /**
      * Replies the coordinate in degrees/minutes/seconds format
@@ -180,5 +179,5 @@
         Bounds b = Main.getProjection().getWorldBoundsLatLon();
         return lat() < b.getMin().lat() || lat() > b.getMax().lat() ||
-        lon() < b.getMin().lon() || lon() > b.getMax().lon();
+                lon() < b.getMin().lon() || lon() > b.getMax().lon();
     }
 
@@ -220,5 +219,5 @@
      * http://math.stackexchange.com/questions/720/how-to-calculate-a-heading-on-the-earths-surface
      * for some hints how it is derived.)
-     * 
+     *
      * @param other the "destination" position
      * @return heading in the range 0 <= hd < 2*PI
@@ -233,5 +232,5 @@
         }
         return hd;
-     }
+    }
 
     /**
@@ -258,5 +257,5 @@
         return "LatLon[lat="+lat()+",lon="+lon()+"]";
     }
-    
+
     /**
      * Returns the value rounded to OSM precisions, i.e. to
@@ -278,5 +277,5 @@
     public static double roundToOsmPrecisionStrict(double value) {
         double absV = Math.abs(value);
-        int numOfDigits = MAX_SERVER_DIGITS + (absV < 1 ? 0 : (absV < 10 ? 1 : (absV < 100 ? 2 : 3))); 
+        int numOfDigits = MAX_SERVER_DIGITS + (absV < 1 ? 0 : (absV < 10 ? 1 : (absV < 100 ? 2 : 3)));
         return BigDecimal.valueOf(value).round(new MathContext(numOfDigits)).doubleValue();
     }
@@ -292,5 +291,5 @@
                 roundToOsmPrecision(lat()),
                 roundToOsmPrecision(lon())
-        );
+                );
     }
 
@@ -305,5 +304,5 @@
                 roundToOsmPrecisionStrict(lat()),
                 roundToOsmPrecisionStrict(lon())
-        );
+                );
     }
 
Index: trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java	(revision 4869)
@@ -20,5 +20,5 @@
 
 public class OffsetBookmark {
-    public static List<OffsetBookmark> allBookmarks = new ArrayList<OffsetBookmark>();
+    public static final List<OffsetBookmark> allBookmarks = new ArrayList<OffsetBookmark>();
 
     public Projection proj;
Index: trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 4869)
@@ -57,5 +57,5 @@
     }
 
-    public static int MAX_OBJECTS_PER_LEVEL = 16;
+    public static final int MAX_OBJECTS_PER_LEVEL = 16;
     class QBLevel
     {
@@ -312,13 +312,9 @@
                     continue;
                 }
-                if (found_me) {
+                if (found_me)
                     /*if (debug) {
                         out("[" + this.level + "] next sibling was child nr: " + nr);
                     }*/
                     return sibling;
-                }
-                /*if (debug) {
-                    out("[" + this.level + "] nr: " + nr + " is before me, ignoring...");
-                }*/
             }
             return null;
@@ -405,5 +401,5 @@
                 System.out.print("[" + level + "] qb bbox: " + this.bbox() + " ");
             }*/
-            if (!this.bbox().intersects(search_bbox)) {
+            if (!this.bbox().intersects(search_bbox))
                 /*if (debug) {
                     out("miss " + Long.toHexString(this.quad));
@@ -411,5 +407,5 @@
                 }*/
                 return;
-            } else if (bbox().bounds(search_bbox)) {
+            else if (bbox().bounds(search_bbox)) {
                 search_cache = this;
             }
@@ -632,20 +628,18 @@
         public boolean hasNext()
         {
-            if (this.peek() == null) {
+            if (this.peek() == null)
                 /*if (debug) {
                     out(this + " no hasNext(), but iterated over so far: " + iterated_over);
                 }*/
                 return false;
-            }
             return true;
         }
         T peek()
         {
-            if (current_node == null) {
+            if (current_node == null)
                 /*if (debug) {
                     out("null current leaf, nowhere to go");
                 }*/
                 return null;
-            }
             while((current_node.content == null) ||
                     (content_index >= current_node.content.size())) {
@@ -659,10 +653,9 @@
                 }
             }
-            if (current_node == null || current_node.content == null) {
+            if (current_node == null || current_node.content == null)
                 /*if (debug) {
                     out("late nowhere to go " + current_node);
                 }*/
                 return null;
-            }
             return current_node.content.get(content_index);
         }
Index: trunk/src/org/openstreetmap/josm/data/projection/GaussKrueger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/GaussKrueger.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/projection/GaussKrueger.java	(revision 4869)
@@ -22,8 +22,8 @@
 public class GaussKrueger extends AbstractProjection implements ProjectionSubPrefs {
 
-    public static int DEFAULT_ZONE = 2;
+    public static final int DEFAULT_ZONE = 2;
     private int zone;
-    
-    private static Bounds[] bounds = { 
+
+    private static Bounds[] bounds = {
         new Bounds(new LatLon(-5, 3.5), new LatLon(85, 8.5)),
         new Bounds(new LatLon(-5, 6.5), new LatLon(85, 11.5)),
@@ -33,5 +33,5 @@
 
     private static NTV2GridShiftFile BETA2007 = null;
-    
+
     private static String[] zones = { "2", "3", "4", "5" };
 
@@ -45,7 +45,6 @@
                 String gridFileName = "BETA2007.gsb";
                 InputStream is = Main.class.getResourceAsStream("/data/"+gridFileName);
-                if (is == null) {
+                if (is == null)
                     throw new RuntimeException(tr("Error: failed to open input stream for resource ''/data/{0}''.", gridFileName));
-                }
                 BETA2007 = new NTV2GridShiftFile();
                 BETA2007.loadGridShiftFile(is, false);
@@ -70,9 +69,9 @@
     }
 
-    @Override 
+    @Override
     public String toString() {
         return tr("Gau\u00DF-Kr\u00FCger");
     }
-    
+
     @Override
     public Integer getEpsgCode() {
@@ -89,5 +88,5 @@
         return bounds[zone-2];
     }
-    
+
     @Override
     public void setupPreferencePanel(JPanel p, ActionListener listener) {
@@ -106,5 +105,5 @@
         }
     }
-    
+
     @Override
     public Collection<String> getPreferences(JPanel p) {
@@ -115,5 +114,5 @@
         return Collections.singleton(Integer.toString(zone+2));
     }
-    
+
     @Override
     public void setPreferences(Collection<String> args) {
@@ -133,5 +132,5 @@
         updateParameters(zone);
     }
-    
+
     @Override
     public String[] allCodes() {
@@ -154,4 +153,4 @@
         return null;
     }
-    
+
 }
Index: trunk/src/org/openstreetmap/josm/data/projection/datum/GRS80Datum.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/datum/GRS80Datum.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/projection/datum/GRS80Datum.java	(revision 4869)
@@ -13,10 +13,10 @@
 public class GRS80Datum extends AbstractDatum {
 
-    public static GRS80Datum INSTANCE = new GRS80Datum();
-    
+    public final static GRS80Datum INSTANCE = new GRS80Datum();
+
     private GRS80Datum() {
         super(tr("GRS80"), null, Ellipsoid.GRS80);
     }
-    
+
     @Override
     public LatLon fromWGS84(LatLon ll) {
Index: trunk/src/org/openstreetmap/josm/data/projection/datum/WGS84Datum.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/datum/WGS84Datum.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/projection/datum/WGS84Datum.java	(revision 4869)
@@ -12,5 +12,5 @@
 public class WGS84Datum extends AbstractDatum {
 
-    public static WGS84Datum INSTANCE = new WGS84Datum();
+    public static final WGS84Datum INSTANCE = new WGS84Datum();
 
     private WGS84Datum() {
Index: trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 4869)
@@ -72,5 +72,5 @@
     public static double griddetail;
 
-    public static Collection<String> ignoredErrors = new TreeSet<String>();
+    public static final Collection<String> ignoredErrors = new TreeSet<String>();
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/BuildingInBuilding.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/BuildingInBuilding.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/BuildingInBuilding.java	(revision 4869)
@@ -24,5 +24,5 @@
 public class BuildingInBuilding extends Test {
 
-    protected static int BUILDING_INSIDE_BUILDING = 2001;
+    protected static final int BUILDING_INSIDE_BUILDING = 2001;
     protected List<OsmPrimitive> primitivesToCheck = new LinkedList<OsmPrimitive>();
     protected QuadBuckets<Way> index = new QuadBuckets<Way>();
@@ -57,7 +57,6 @@
         // Check that all nodes of w are in polygon
         for (Node n : w.getNodes()) {
-            if (!isInPolygon(n, polygon)) {
+            if (!isInPolygon(n, polygon))
                 return false;
-            }
         }
         // All nodes can be inside polygon and still, w outside:
@@ -73,7 +72,6 @@
         for (int i=1; i<w.getNodesCount(); i++) {
             LatLon center = w.getNode(i).getCoor().getCenter(w.getNode(i-1).getCoor());
-            if (center != null && !isInPolygon(new Node(center), polygon)) {
+            if (center != null && !isInPolygon(new Node(center), polygon))
                 return false;
-            }
         }
         return true;
@@ -86,13 +84,12 @@
                 @Override
                 public boolean evaluate(Way object) {
-                    if (p.equals(object)) {
+                    if (p.equals(object))
                         return false;
-                    } else if (p instanceof Node) {
+                    else if (p instanceof Node)
                         return isInPolygon((Node) p, object.getNodes()) || object.getNodes().contains(p);
-                    } else if (p instanceof Way) {
+                    else if (p instanceof Way)
                         return isInPolygon((Way) p, object.getNodes()) && !isInInnerWay((Way)p, object);
-                    } else {
+                    else
                         return false;
-                    }
                 }
             });
@@ -103,5 +100,5 @@
         }
     }
-    
+
     private boolean isInInnerWay(Way w, Way outer) {
         for (OsmPrimitive r : outer.getReferrers()) {
@@ -113,7 +110,6 @@
                         if (isInPolygon(inner, outer.getNodes())) {
                             // If the tested way is inside this inner, outer is a false positive
-                            if (isInPolygon(w, inner.getNodes())) {
+                            if (isInPolygon(w, inner.getNodes()))
                                 return true;
-                            }
                         }
                     }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java	(revision 4869)
@@ -31,7 +31,7 @@
 public class Coastlines extends Test {
 
-    protected static int UNORDERED_COASTLINE = 901;
-    protected static int REVERSED_COASTLINE = 902;
-    protected static int UNCONNECTED_COASTLINE = 903;
+    protected static final int UNORDERED_COASTLINE = 901;
+    protected static final int REVERSED_COASTLINE = 902;
+    protected static final int UNCONNECTED_COASTLINE = 903;
 
     private List<Way> coastlines;
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 4869)
@@ -29,5 +29,5 @@
  */
 public class CrossingWays extends Test {
-    protected static int CROSSING_WAYS = 601;
+    protected static final int CROSSING_WAYS = 601;
 
     /** All way segments, grouped by cells */
@@ -43,5 +43,5 @@
     public CrossingWays() {
         super(tr("Crossing ways"),
-              tr("This test checks if two roads, railways, waterways or buildings crosses in the same layer, but are not connected by a node."));
+                tr("This test checks if two roads, railways, waterways or buildings crosses in the same layer, but are not connected by a node."));
     }
 
@@ -82,5 +82,7 @@
 
         String layer1 = w.get("layer");
-        if ("0".equals(layer1)) layer1 = null; //0 is default value
+        if ("0".equals(layer1)) {
+            layer1 = null; //0 is default value
+        }
 
         int nodesSize = w.getNodesCount();
@@ -94,23 +96,37 @@
                     List<WaySegment> highlight;
 
-                    if (errorSegments.contains(ws) && errorSegments.contains(es2.ws))
-                        continue;
+                    if (errorSegments.contains(ws) && errorSegments.contains(es2.ws)) {
+                        continue;
+                    }
 
                     String layer2 = es2.layer;
                     String railway2 = es2.railway;
                     boolean isCoastline2 = es2.coastline;
-                    if (layer1 == null ? layer2 != null : !layer1.equals(layer2))
-                        continue;
-
-                    if (!es1.intersects(es2) ) continue;
-                    if (isSubway1 && "subway".equals(railway2)) continue;
-                    if (isTram1 && "tram".equals(railway2)) continue;
-
-                    if (isCoastline1 != isCoastline2) continue;
+                    if (layer1 == null ? layer2 != null : !layer1.equals(layer2)) {
+                        continue;
+                    }
+
+                    if (!es1.intersects(es2) ) {
+                        continue;
+                    }
+                    if (isSubway1 && "subway".equals(railway2)) {
+                        continue;
+                    }
+                    if (isTram1 && "tram".equals(railway2)) {
+                        continue;
+                    }
+
+                    if (isCoastline1 != isCoastline2) {
+                        continue;
+                    }
                     if (("river".equals(waterway1) && "riverbank".equals(es2.waterway))
-                            || ("riverbank".equals(waterway1) && "river".equals(es2.waterway))) continue;
+                            || ("riverbank".equals(waterway1) && "river".equals(es2.waterway))) {
+                        continue;
+                    }
 
                     if ((es1.railway != null && es1.railway.equals("abandoned"))
-                            || (railway2 != null && railway2.equals("abandoned"))) continue;
+                            || (railway2 != null && railway2.equals("abandoned"))) {
+                        continue;
+                    }
 
                     prims = Arrays.asList(es1.ws.way, es2.ws.way);
@@ -131,8 +147,8 @@
 
                         errors.add(new TestError(this, Severity.WARNING,
-                            message,
-                            CROSSING_WAYS,
-                            prims,
-                            highlight));
+                                message,
+                                CROSSING_WAYS,
+                                prims,
+                                highlight));
                         ways_seen.put(prims, highlight);
                     } else {
@@ -147,11 +163,11 @@
 
     /**
-    * Returns all the cells this segment crosses.  Each cell contains the list
-    * of segments already processed
-    *
-    * @param n1 The first node
-    * @param n2 The second node
-    * @return A list with all the cells the segment crosses
-    */
+     * Returns all the cells this segment crosses.  Each cell contains the list
+     * of segments already processed
+     *
+     * @param n1 The first node
+     * @param n2 The second node
+     * @return A list with all the cells the segment crosses
+     */
     public List<List<ExtendedSegment>> getSegments(Node n1, Node n2) {
 
@@ -218,8 +234,8 @@
 
             return Line2D.linesIntersect(
-                n1.getEastNorth().east(), n1.getEastNorth().north(),
-                n2.getEastNorth().east(), n2.getEastNorth().north(),
-                s2.n1.getEastNorth().east(), s2.n1.getEastNorth().north(),
-                s2.n2.getEastNorth().east(), s2.n2.getEastNorth().north());
+                    n1.getEastNorth().east(), n1.getEastNorth().north(),
+                    n2.getEastNorth().east(), n2.getEastNorth().north(),
+                    s2.n1.getEastNorth().east(), s2.n1.getEastNorth().north(),
+                    s2.n2.getEastNorth().east(), s2.n2.getEastNorth().north());
         }
     }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 4869)
@@ -5,6 +5,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.awt.GridBagLayout;
-import java.awt.geom.Area;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -16,8 +14,4 @@
 import java.util.Map;
 import java.util.Set;
-
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
 
 import org.openstreetmap.josm.Main;
@@ -35,5 +29,4 @@
 import org.openstreetmap.josm.data.validation.Test;
 import org.openstreetmap.josm.data.validation.TestError;
-import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.tools.MultiMap;
@@ -54,5 +47,5 @@
                     Math.round(o.getCoor().lat() / precision) * precision,
                     Math.round(o.getCoor().lon() / precision) * precision
-            );
+                    );
         }
 
@@ -82,16 +75,16 @@
     }
 
-    protected static int DUPLICATE_NODE = 1;
-    protected static int DUPLICATE_NODE_MIXED = 2;
-    protected static int DUPLICATE_NODE_OTHER = 3;
-    protected static int DUPLICATE_NODE_UNCLOSED = 4;
-    protected static int DUPLICATE_NODE_BUILDING = 10;
-    protected static int DUPLICATE_NODE_BOUNDARY = 11;
-    protected static int DUPLICATE_NODE_HIGHWAY = 12;
-    protected static int DUPLICATE_NODE_LANDUSE = 13;
-    protected static int DUPLICATE_NODE_NATURAL = 14;
-    protected static int DUPLICATE_NODE_POWER = 15;
-    protected static int DUPLICATE_NODE_RAILWAY = 16;
-    protected static int DUPLICATE_NODE_WATERWAY = 17;
+    protected final static int DUPLICATE_NODE = 1;
+    protected final static int DUPLICATE_NODE_MIXED = 2;
+    protected final static int DUPLICATE_NODE_OTHER = 3;
+    protected final static int DUPLICATE_NODE_UNCLOSED = 4;
+    protected final static int DUPLICATE_NODE_BUILDING = 10;
+    protected final static int DUPLICATE_NODE_BOUNDARY = 11;
+    protected final static int DUPLICATE_NODE_HIGHWAY = 12;
+    protected final static int DUPLICATE_NODE_LANDUSE = 13;
+    protected final static int DUPLICATE_NODE_NATURAL = 14;
+    protected final static int DUPLICATE_NODE_POWER = 15;
+    protected final static int DUPLICATE_NODE_RAILWAY = 16;
+    protected final static int DUPLICATE_NODE_WATERWAY = 17;
 
     /** The map of potential duplicates.
@@ -204,5 +197,5 @@
                             DUPLICATE_NODE_UNCLOSED,
                             mm.get(tagSet)
-                    ));
+                            ));
                 } else if (nbType>1) {
                     String msg = marktr("Mixed type duplicated nodes");
@@ -215,5 +208,5 @@
                             DUPLICATE_NODE_MIXED,
                             mm.get(tagSet)
-                    ));
+                            ));
                 } else if (typeMap.get("highway")) {
                     String msg = marktr("Highway duplicated nodes");
@@ -226,5 +219,5 @@
                             DUPLICATE_NODE_HIGHWAY,
                             mm.get(tagSet)
-                    ));
+                            ));
                 } else if (typeMap.get("railway")) {
                     String msg = marktr("Railway duplicated nodes");
@@ -237,5 +230,5 @@
                             DUPLICATE_NODE_RAILWAY,
                             mm.get(tagSet)
-                    ));
+                            ));
                 } else if (typeMap.get("waterway")) {
                     String msg = marktr("Waterway duplicated nodes");
@@ -248,5 +241,5 @@
                             DUPLICATE_NODE_WATERWAY,
                             mm.get(tagSet)
-                    ));
+                            ));
                 } else if (typeMap.get("boundary")) {
                     String msg = marktr("Boundary duplicated nodes");
@@ -259,5 +252,5 @@
                             DUPLICATE_NODE_BOUNDARY,
                             mm.get(tagSet)
-                    ));
+                            ));
                 } else if (typeMap.get("power")) {
                     String msg = marktr("Power duplicated nodes");
@@ -270,5 +263,5 @@
                             DUPLICATE_NODE_POWER,
                             mm.get(tagSet)
-                    ));
+                            ));
                 } else if (typeMap.get("natural")) {
                     String msg = marktr("Natural duplicated nodes");
@@ -281,5 +274,5 @@
                             DUPLICATE_NODE_NATURAL,
                             mm.get(tagSet)
-                    ));
+                            ));
                 } else if (typeMap.get("building")) {
                     String msg = marktr("Building duplicated nodes");
@@ -292,5 +285,5 @@
                             DUPLICATE_NODE_BUILDING,
                             mm.get(tagSet)
-                    ));
+                            ));
                 } else if (typeMap.get("landuse")) {
                     String msg = marktr("Landuse duplicated nodes");
@@ -303,5 +296,5 @@
                             DUPLICATE_NODE_LANDUSE,
                             mm.get(tagSet)
-                    ));
+                            ));
                 } else {
                     String msg = marktr("Other duplicated nodes");
@@ -314,5 +307,5 @@
                             DUPLICATE_NODE_OTHER,
                             mm.get(tagSet)
-                    ));
+                            ));
 
                 }
@@ -336,5 +329,5 @@
                         DUPLICATE_NODE,
                         duplicates
-                ));
+                        ));
             }
         }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 4869)
@@ -122,6 +122,6 @@
     }
 
-    protected static int DUPLICATE_RELATION = 1901;
-    protected static int SAME_RELATION = 1902;
+    protected static final int DUPLICATE_RELATION = 1901;
+    protected static final int SAME_RELATION = 1902;
 
     /** MultiMap of all relations */
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java	(revision 4869)
@@ -73,6 +73,6 @@
     }
 
-    protected static int DUPLICATE_WAY = 1401;
-    protected static int SAME_WAY = 1402;
+    protected static final int DUPLICATE_WAY = 1401;
+    protected static final int SAME_WAY = 1402;
 
     /** Bag of all ways */
@@ -87,5 +87,5 @@
     public DuplicateWay() {
         super(tr("Duplicated ways"),
-              tr("This test checks that there are no ways with same node coordinates and optionally also same tags."));
+                tr("This test checks that there are no ways with same node coordinates and optionally also same tags."));
     }
 
@@ -127,5 +127,7 @@
                     }
                 }
-                if (skip) continue;
+                if (skip) {
+                    continue;
+                }
                 TestError testError = new TestError(this, Severity.WARNING, tr("Ways with same position"), SAME_WAY, sameway);
                 errors.add(testError);
@@ -137,5 +139,5 @@
 
     /**
-     * Remove uninteresting keys, like created_by to normalize the tags 
+     * Remove uninteresting keys, like created_by to normalize the tags
      */
     public void removeUninterestingKeys(Map<String, String> wkeys) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicatedWayNodes.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicatedWayNodes.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicatedWayNodes.java	(revision 4869)
@@ -18,9 +18,9 @@
 
 public class DuplicatedWayNodes extends Test {
-    protected static int DUPLICATE_WAY_NODE = 501;
+    protected static final int DUPLICATE_WAY_NODE = 501;
 
     public DuplicatedWayNodes() {
         super(tr("Duplicated way nodes"),
-            tr("Checks for ways with identical consecutive nodes."));
+                tr("Checks for ways with identical consecutive nodes."));
     }
 
@@ -37,5 +37,5 @@
             if (lastN == n) {
                 errors.add(new TestError(this, Severity.ERROR, tr("Duplicated way nodes"), DUPLICATE_WAY_NODE,
-                    Arrays.asList(w), Arrays.asList(n)));
+                        Arrays.asList(w), Arrays.asList(n)));
                 break;
             }
@@ -59,10 +59,9 @@
             lastN = n;
         }
-        if (wnew.getNodesCount() < 2) {
+        if (wnew.getNodesCount() < 2)
             // Empty way, delete
             return DeleteCommand.delete(Main.map.mapView.getEditLayer(), Collections.singleton(w));
-        } else {
+        else
             return new ChangeCommand(w, wnew);
-        }
     }
 
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/NodesWithSameName.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/NodesWithSameName.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/NodesWithSameName.java	(revision 4869)
@@ -4,9 +4,9 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.util.Map;
-import java.util.List;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 
 import org.openstreetmap.josm.data.osm.Node;
@@ -17,5 +17,5 @@
 
 public class NodesWithSameName extends Test {
-    protected static int SAME_NAME = 801;
+    protected static final int SAME_NAME = 801;
 
     private Map<String, List<Node>> namesToNodes;
@@ -23,5 +23,5 @@
     public NodesWithSameName() {
         super(tr("Nodes with same name"),
-            tr("This test finds nodes that have the same name (might be duplicates)."));
+                tr("This test finds nodes that have the same name (might be duplicates)."));
     }
 
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingAreas.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingAreas.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingAreas.java	(revision 4869)
@@ -5,4 +5,5 @@
 import java.util.Collection;
 import java.util.Collections;
+
 import org.openstreetmap.josm.data.osm.QuadBuckets;
 import org.openstreetmap.josm.data.osm.Way;
@@ -17,5 +18,5 @@
 public class OverlappingAreas extends Test {
 
-    protected static int OVERLAPPING_AREAS = 2201;
+    protected static final int OVERLAPPING_AREAS = 2201;
     protected QuadBuckets<Way> index = new QuadBuckets<Way>();
 
@@ -40,10 +41,9 @@
                         @Override
                         public boolean evaluate(Way wi) {
-                            if (w.equals(wi)) {
+                            if (w.equals(wi))
                                 return false;
-                            } else {
+                            else
                                 return Geometry.polygonIntersection(w.getNodes(), wi.getNodes())
                                         == Geometry.PolygonIntersection.CROSSING;
-                            }
                         }
                     });
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java	(revision 4869)
@@ -29,21 +29,21 @@
  */
 public class OverlappingWays extends Test {
-    
+
     /** Bag of all way segments */
     MultiMap<Pair<Node,Node>, WaySegment> nodePairs;
 
-    protected static int OVERLAPPING_HIGHWAY = 101;
-    protected static int OVERLAPPING_RAILWAY = 102;
-    protected static int OVERLAPPING_WAY = 103;
-    protected static int OVERLAPPING_HIGHWAY_AREA = 111;
-    protected static int OVERLAPPING_RAILWAY_AREA = 112;
-    protected static int OVERLAPPING_WAY_AREA = 113;
-    protected static int OVERLAPPING_AREA = 120;
+    protected static final int OVERLAPPING_HIGHWAY = 101;
+    protected static final int OVERLAPPING_RAILWAY = 102;
+    protected static final int OVERLAPPING_WAY = 103;
+    protected static final int OVERLAPPING_HIGHWAY_AREA = 111;
+    protected static final int OVERLAPPING_RAILWAY_AREA = 112;
+    protected static final int OVERLAPPING_WAY_AREA = 113;
+    protected static final int OVERLAPPING_AREA = 120;
 
     /** Constructor */
     public OverlappingWays() {
         super(tr("Overlapping ways"),
-              tr("This test checks that a connection between two nodes "
-                + "is not used by more than one way."));
+                tr("This test checks that a connection between two nodes "
+                        + "is not used by more than one way."));
     }
 
@@ -125,7 +125,7 @@
                     }
 
-                    errors.add(new TestError(this, 
+                    errors.add(new TestError(this,
                             type < OVERLAPPING_HIGHWAY_AREA ? Severity.WARNING : Severity.OTHER,
-                            errortype, type, prims, duplicated));
+                                    errortype, type, prims, duplicated));
                     ways_seen.put(current_ways, duplicated);
                 } else { /* way seen, mark highlight layer only */
@@ -151,5 +151,5 @@
             }
             nodePairs.put(Pair.sort(new Pair<Node,Node>(lastN, n)),
-                new WaySegment(w, i));
+                    new WaySegment(w, i));
             lastN = n;
         }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 4869)
@@ -28,12 +28,12 @@
 public class RelationChecker extends Test {
 
-    protected static int ROLE_UNKNOWN      = 1701;
-    protected static int ROLE_EMPTY        = 1702;
-    protected static int WRONG_TYPE        = 1703;
-    protected static int HIGH_COUNT        = 1704;
-    protected static int LOW_COUNT         = 1705;
-    protected static int ROLE_MISSING      = 1706;
-    protected static int RELATION_UNKNOWN  = 1707;
-    protected static int RELATION_EMPTY    = 1708;
+    protected static final int ROLE_UNKNOWN      = 1701;
+    protected static final int ROLE_EMPTY        = 1702;
+    protected static final int WRONG_TYPE        = 1703;
+    protected static final int HIGH_COUNT        = 1704;
+    protected static final int LOW_COUNT         = 1705;
+    protected static final int ROLE_MISSING      = 1706;
+    protected static final int RELATION_UNKNOWN  = 1707;
+    protected static final int RELATION_EMPTY    = 1708;
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWay.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWay.java	(revision 4869)
@@ -4,9 +4,9 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.util.Arrays;
 import java.util.HashSet;
-import java.util.Arrays;
 
+import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.validation.Severity;
 import org.openstreetmap.josm.data.validation.Test;
@@ -17,11 +17,11 @@
  */
 public class SelfIntersectingWay extends Test {
-    
-    protected static int SELF_INTERSECT = 401;
+
+    protected static final int SELF_INTERSECT = 401;
 
     public SelfIntersectingWay() {
         super(tr("Self-intersecting ways"),
-              tr("This test checks for ways " +
-                "that contain some of their nodes more than once."));
+                tr("This test checks for ways " +
+                        "that contain some of their nodes more than once."));
     }
 
@@ -33,6 +33,6 @@
             if (nodes.contains(n)) {
                 errors.add(new TestError(this,
-                    Severity.WARNING, tr("Self-intersecting ways"), SELF_INTERSECT,
-                    Arrays.asList(w), Arrays.asList(n)));
+                        Severity.WARNING, tr("Self-intersecting ways"), SELF_INTERSECT,
+                        Arrays.asList(w), Arrays.asList(n)));
                 break;
             } else {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java	(revision 4869)
@@ -28,5 +28,5 @@
 public class SimilarNamedWays extends Test {
 
-    protected static int SIMILAR_NAMED = 701;
+    protected static final int SIMILAR_NAMED = 701;
 
     /** All ways, grouped by cells */
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 4869)
@@ -49,11 +49,10 @@
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.data.validation.OsmValidator;
 import org.openstreetmap.josm.data.validation.Severity;
 import org.openstreetmap.josm.data.validation.Test;
 import org.openstreetmap.josm.data.validation.TestError;
 import org.openstreetmap.josm.data.validation.util.Entities;
+import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference;
 import org.openstreetmap.josm.gui.preferences.ValidatorPreference;
-import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.gui.tagging.TaggingPreset;
@@ -79,10 +78,10 @@
     protected static MultiMap<String, String> presetsValueData;
     /** The TagChecker data */
-    protected static List<CheckerData> checkerData = new ArrayList<CheckerData>();
-    protected static List<String> ignoreDataStartsWith = new ArrayList<String>();
-    protected static List<String> ignoreDataEquals = new ArrayList<String>();
-    protected static List<String> ignoreDataEndsWith = new ArrayList<String>();
-    protected static List<IgnoreKeyPair> ignoreDataKeyPair = new ArrayList<IgnoreKeyPair>();
-    protected static List<IgnoreTwoKeyPair> ignoreDataTwoKeyPair = new ArrayList<IgnoreTwoKeyPair>();
+    protected static final List<CheckerData> checkerData = new ArrayList<CheckerData>();
+    protected static final List<String> ignoreDataStartsWith = new ArrayList<String>();
+    protected static final List<String> ignoreDataEquals = new ArrayList<String>();
+    protected static final List<String> ignoreDataEndsWith = new ArrayList<String>();
+    protected static final List<IgnoreKeyPair> ignoreDataKeyPair = new ArrayList<IgnoreKeyPair>();
+    protected static final List<IgnoreTwoKeyPair> ignoreDataTwoKeyPair = new ArrayList<IgnoreTwoKeyPair>();
 
     /** The preferences prefix */
@@ -129,15 +128,15 @@
     protected JButton deleteSrcButton;
 
-    protected static int EMPTY_VALUES      = 1200;
-    protected static int INVALID_KEY       = 1201;
-    protected static int INVALID_VALUE     = 1202;
-    protected static int FIXME             = 1203;
-    protected static int INVALID_SPACE     = 1204;
-    protected static int INVALID_KEY_SPACE = 1205;
-    protected static int INVALID_HTML      = 1206; /* 1207 was PAINT */
-    protected static int LONG_VALUE        = 1208;
-    protected static int LONG_KEY          = 1209;
-    protected static int LOW_CHAR_VALUE    = 1210;
-    protected static int LOW_CHAR_KEY      = 1211;
+    protected static final int EMPTY_VALUES      = 1200;
+    protected static final int INVALID_KEY       = 1201;
+    protected static final int INVALID_VALUE     = 1202;
+    protected static final int FIXME             = 1203;
+    protected static final int INVALID_SPACE     = 1204;
+    protected static final int INVALID_KEY_SPACE = 1205;
+    protected static final int INVALID_HTML      = 1206; /* 1207 was PAINT */
+    protected static final int LONG_VALUE        = 1208;
+    protected static final int LONG_KEY          = 1209;
+    protected static final int LOW_CHAR_VALUE    = 1210;
+    protected static final int LOW_CHAR_KEY      = 1211;
     /** 1250 and up is used by tagcheck */
 
@@ -145,5 +144,5 @@
     protected JList sourcesList;
 
-    protected static Entities entities = new Entities();
+    protected static final Entities entities = new Entities();
 
     /**
@@ -626,5 +625,5 @@
                                 tr("Information"),
                                 JOptionPane.INFORMATION_MESSAGE
-                        );
+                                );
                     }
                 } else {
@@ -713,5 +712,5 @@
     public void handlePrefEnable() {
         boolean selected = prefCheckKeys.isSelected() || prefCheckKeysBeforeUpload.isSelected()
-                    || prefCheckComplex.isSelected() || prefCheckComplexBeforeUpload.isSelected();
+                || prefCheckComplex.isSelected() || prefCheckComplexBeforeUpload.isSelected();
         sourcesList.setEnabled( selected );
         addSrcButton.setEnabled(selected);
@@ -792,5 +791,5 @@
         if (commands.size() == 1)
             return commands.get(0);
-        
+
         return new SequenceCommand(tr("Fix properties"), commands);
     }
@@ -825,7 +824,7 @@
         private int code;
         protected Severity severity;
-        protected static int TAG_CHECK_ERROR  = 1250;
-        protected static int TAG_CHECK_WARN   = 1260;
-        protected static int TAG_CHECK_INFO   = 1270;
+        protected static final int TAG_CHECK_ERROR  = 1250;
+        protected static final int TAG_CHECK_WARN   = 1260;
+        protected static final int TAG_CHECK_INFO   = 1270;
 
         private static class CheckerElement {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 4869)
@@ -39,5 +39,5 @@
 public class UnconnectedWays extends Test {
 
-    protected static int UNCONNECTED_WAYS = 1301;
+    protected static final int UNCONNECTED_WAYS = 1301;
     protected static final String PREFIX = ValidatorPreference.PREFIX + "." + UnconnectedWays.class.getSimpleName();
 
@@ -314,7 +314,7 @@
         public boolean isArea() {
             return w.hasKey("landuse")
-            || w.hasKey("leisure")
-            || w.hasKey("amenity")
-            || w.hasKey("building");
+                    || w.hasKey("leisure")
+                    || w.hasKey("amenity")
+                    || w.hasKey("building");
         }
     }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java	(revision 4869)
@@ -19,7 +19,7 @@
 public class WronglyOrderedWays extends Test {
 
-    protected static int WRONGLY_ORDERED_COAST = 1001;
+    protected static final int WRONGLY_ORDERED_COAST = 1001;
     //protected static int WRONGLY_ORDERED_WATER = 1002;
-    protected static int WRONGLY_ORDERED_LAND  = 1003;
+    protected static final int WRONGLY_ORDERED_LAND  = 1003;
 
     /**
@@ -28,5 +28,5 @@
     public WronglyOrderedWays() {
         super(tr("Wrongly Ordered Ways"),
-              tr("This test checks the direction of water, land and coastline ways."));
+                tr("This test checks the direction of water, land and coastline ways."));
     }
 
@@ -38,15 +38,14 @@
 
         String natural = w.get("natural");
-        if (natural == null) {
+        if (natural == null)
             return;
-        } else if ("coastline".equals(natural) && Geometry.isClockwise(w)) {
+        else if ("coastline".equals(natural) && Geometry.isClockwise(w)) {
             reportError(w, tr("Reversed coastline: land not on left side"), WRONGLY_ORDERED_COAST);
-        /*} else if ("water".equals(natural) && !Geometry.isClockwise(w)) {
+            /*} else if ("water".equals(natural) && !Geometry.isClockwise(w)) {
             reportError(w, tr("Reversed water: land not on left side"), WRONGLY_ORDERED_WATER);*/
         } else if ("land".equals(natural) && Geometry.isClockwise(w)) {
             reportError(w, tr("Reversed land: land not on left side"), WRONGLY_ORDERED_LAND);
-        } else {
+        } else
             return;
-        }
 
     }
Index: trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 4869)
@@ -64,5 +64,5 @@
     public static final String PROPNAME_CENTER = "center";
     public static final String PROPNAME_SCALE  = "scale";
-    
+
     /**
      * the zoom listeners
@@ -237,5 +237,5 @@
                 1.0/scale, 0.0, 0.0, -1.0/scale, getWidth()/2.0 - center.east()/scale, getHeight()/2.0 + center.north()/scale);
     }
-    
+
     /**
      * Return the point on the screen where this Coordinate would be.
@@ -394,5 +394,5 @@
                         }
                     }
-            ).start();
+                    ).start();
         }
     }
@@ -1161,5 +1161,5 @@
     public int getViewID() {
         String x = center.east() + "_" + center.north() + "_" + scale + "_" +
-        getWidth() + "_" + getHeight() + "_" + getProjection().toString();
+                getWidth() + "_" + getHeight() + "_" + getProjection().toString();
         java.util.zip.CRC32 id = new java.util.zip.CRC32();
         id.update(x.getBytes());
@@ -1209,5 +1209,5 @@
     public static final SystemOfMeasurement IMPERIAL_SOM = new SystemOfMeasurement(0.3048, "ft", 1609.344, "mi");
 
-    public static Map<String, SystemOfMeasurement> SYSTEMS_OF_MEASUREMENT;
+    public static final Map<String, SystemOfMeasurement> SYSTEMS_OF_MEASUREMENT;
     static {
         SYSTEMS_OF_MEASUREMENT = new LinkedHashMap<String, SystemOfMeasurement>();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 4869)
@@ -171,5 +171,5 @@
     // hook for roadsigns plugin to display a small
     // button in the upper right corner of this dialog
-    public static JPanel pluginHook = new JPanel();
+    public static final JPanel pluginHook = new JPanel();
 
     private JPopupMenu propertyMenu;
@@ -279,11 +279,10 @@
                 boolean c1 = m.containsKey(o1.getValue());
                 boolean c2 = m.containsKey(o2.getValue());
-                if (c1 == c2) {
+                if (c1 == c2)
                     return String.CASE_INSENSITIVE_ORDER.compare(o1.getValue(), o2.getValue());
-                } else if (c1) {
+                else if (c1)
                     return -1;
-                } else {
+                else
                     return +1;
-                }
             }
         };
@@ -1051,6 +1050,7 @@
             for (int row : rows) {
                 String key = propertyData.getValueAt(row, 0).toString();
-                if (row == nextKeyIndex + 1)
+                if (row == nextKeyIndex + 1) {
                     nextKeyIndex = row; // no gap yet
+                }
                 tags.put(key, null);
             }
@@ -1060,10 +1060,11 @@
             int rowCount = propertyData.getRowCount();
             if (rowCount > rows.length) {
-                if (nextKeyIndex == rows[rows.length-1])
+                if (nextKeyIndex == rows[rows.length-1]) {
                     // no gap found, pick next or previous key in list
                     nextKeyIndex = (nextKeyIndex + 1 < rowCount ? nextKeyIndex + 1 : rows[0] - 1);
-                else
+                } else {
                     // gap found
                     nextKeyIndex++;
+                }
                 nextKey = (String)propertyData.getValueAt(nextKeyIndex, 0);
             }
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 4869)
@@ -167,5 +167,5 @@
      * stuff).
      */
-    public static List<MarkerProducers> markerProducers = new LinkedList<MarkerProducers>();
+    public static final List<MarkerProducers> markerProducers = new LinkedList<MarkerProducers>();
 
     // Add one Maker specifying the default behaviour.
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(revision 4869)
@@ -2,8 +2,9 @@
 package org.openstreetmap.josm.gui.mappaint;
 
-import java.awt.Color;
 import static org.openstreetmap.josm.tools.Utils.equal;
 
+import java.awt.Color;
 import java.awt.Rectangle;
+
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -11,5 +12,4 @@
 import org.openstreetmap.josm.data.osm.visitor.paint.MapPainter;
 import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
-
 import org.openstreetmap.josm.tools.CheckParameterUtil;
 
@@ -21,7 +21,7 @@
     public enum HorizontalTextAlignment { LEFT, CENTER, RIGHT }
     public enum VerticalTextAlignment { ABOVE, TOP, CENTER, BOTTOM, BELOW }
-    
-    public static Rectangle ZERO_BOX = new Rectangle(0, 0, 0, 0);
-    
+
+    public static final Rectangle ZERO_BOX = new Rectangle(0, 0, 0, 0);
+
     public TextElement text;
     public Rectangle box;
@@ -39,5 +39,5 @@
         this.vAlign = vAlign;
     }
-    
+
     public static BoxTextElemStyle create(Environment env, Rectangle box) {
         initDefaultParameters();
@@ -73,8 +73,8 @@
             vAlign = VerticalTextAlignment.BELOW;
         }
-        
+
         return new BoxTextElemStyle(c, text, box, hAlign, vAlign);
     }
-    
+
     public static final BoxTextElemStyle SIMPLE_NODE_TEXT_ELEMSTYLE;
     static {
@@ -108,14 +108,12 @@
     @Override
     public boolean equals(Object obj) {
-        if (!super.equals(obj)) {
+        if (!super.equals(obj))
             return false;
-        }
-        if (obj == null || getClass() != obj.getClass()) {
+        if (obj == null || getClass() != obj.getClass())
             return false;
-        }
         final BoxTextElemStyle other = (BoxTextElemStyle) obj;
         return text.equals(other.text) &&
-                box.equals(other.box) && 
-                hAlign == other.hAlign && 
+                box.equals(other.box) &&
+                hAlign == other.hAlign &&
                 vAlign == other.vAlign;
     }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPritority.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPritority.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPritority.java	(revision 4869)
@@ -15,5 +15,5 @@
      * usually not used by the user.
      */
-    public static AutoCompletionItemPritority IS_IN_STANDARD_AND_IN_DATASET = new AutoCompletionItemPritority(true, true, false);
+    public static final AutoCompletionItemPritority IS_IN_STANDARD_AND_IN_DATASET = new AutoCompletionItemPritority(true, true, false);
 
     /**
@@ -21,5 +21,5 @@
      * the value of a tag name=*.
      */
-    public static AutoCompletionItemPritority IS_IN_DATASET = new AutoCompletionItemPritority(true, false, false);
+    public static final AutoCompletionItemPritority IS_IN_DATASET = new AutoCompletionItemPritority(true, false, false);
 
     /**
@@ -27,13 +27,13 @@
      * or a standard value for a given tag name (from the presets).
      */
-    public static AutoCompletionItemPritority IS_IN_STANDARD = new AutoCompletionItemPritority(false, true, false);
+    public static final AutoCompletionItemPritority IS_IN_STANDARD = new AutoCompletionItemPritority(false, true, false);
 
     /**
      * Indicates that this is a value from a selected object.
      */
-    public static AutoCompletionItemPritority  IS_IN_SELECTION  = new AutoCompletionItemPritority(false, false, true);
+    public static final AutoCompletionItemPritority  IS_IN_SELECTION  = new AutoCompletionItemPritority(false, false, true);
 
     /** Unknown priority. This is the lowest priority. */
-    public static AutoCompletionItemPritority UNKNOWN = new AutoCompletionItemPritority(false, false, false);
+    public static final AutoCompletionItemPritority UNKNOWN = new AutoCompletionItemPritority(false, false, false);
 
     private final boolean inDataSet;
Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java	(revision 4869)
@@ -9,6 +9,6 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Set;
-import java.util.Map.Entry;
 
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -64,5 +64,5 @@
      * can be accessed directly
      */
-    protected static MultiMap<String, String> presetTagCache = new MultiMap<String, String>();
+    protected static final MultiMap<String, String> presetTagCache = new MultiMap<String, String>();
     /**
      * the cached list of member roles
@@ -75,5 +75,5 @@
      * can be accessed directly
      */
-    protected static Set<String> presetRoleCache = new HashSet<String>();
+    protected static final Set<String> presetRoleCache = new HashSet<String>();
 
     public AutoCompletionManager(DataSet ds) {
Index: trunk/src/org/openstreetmap/josm/io/imagery/OsmosnimkiOffsetServer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/OsmosnimkiOffsetServer.java	(revision 4868)
+++ trunk/src/org/openstreetmap/josm/io/imagery/OsmosnimkiOffsetServer.java	(revision 4869)
@@ -16,5 +16,5 @@
 
 public class OsmosnimkiOffsetServer implements OffsetServer {
-    public static StringProperty PROP_SERVER_URL = new StringProperty("imagery.offsetserver.url","http://offset.osmosnimki.ru/offset/v0?");
+    public static final StringProperty PROP_SERVER_URL = new StringProperty("imagery.offsetserver.url","http://offset.osmosnimki.ru/offset/v0?");
     private String url;
 
