Index: trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 11851)
+++ trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 11852)
@@ -75,5 +75,5 @@
     }
 
-    public static volatile ValidatorLayer errorLayer;
+    private static volatile ValidatorLayer errorLayer;
 
     /** The validate action */
@@ -81,5 +81,5 @@
 
     /** Grid detail, multiplier of east,north values for valuable cell sizing */
-    public static double griddetail;
+    private static double griddetail;
 
     private static final Collection<String> ignoredErrors = new TreeSet<>();
@@ -215,4 +215,7 @@
     }
 
+    /**
+     * Initializes error layer.
+     */
     public static synchronized void initializeErrorLayer() {
         if (!ValidatorPreference.PREF_LAYER.get())
@@ -222,4 +225,12 @@
             Main.getLayerManager().addLayer(errorLayer);
         }
+    }
+
+    /**
+     * Resets error layer.
+     * @since 11852
+     */
+    public static synchronized void resetErrorLayer() {
+        errorLayer = null;
     }
 
@@ -303,4 +314,13 @@
             OsmValidator.griddetail = 1.0;
         }
+    }
+
+    /**
+     * Returns grid detail, multiplier of east,north values for valuable cell sizing
+     * @return grid detail
+     * @since 11852
+     */
+    public static double getGridDetail() {
+        return griddetail;
     }
 
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 11851)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 11852)
@@ -323,5 +323,5 @@
 
         List<List<WaySegment>> cells = new ArrayList<>();
-        for (Point2D cell : ValUtil.getSegmentCells(n1, n2, OsmValidator.griddetail)) {
+        for (Point2D cell : ValUtil.getSegmentCells(n1, n2, OsmValidator.getGridDetail())) {
             List<WaySegment> segments = cellSegments.get(cell);
             if (segments == null) {
Index: trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java	(revision 11851)
+++ trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java	(revision 11852)
@@ -43,11 +43,12 @@
         Set<Point2D> cellNodes = new HashSet<>();
         Point2D cell;
+        double griddetail = OsmValidator.getGridDetail();
 
         // First, round coordinates
         // CHECKSTYLE.OFF: SingleSpaceSeparator
-        long x0 = Math.round(n1.getEastNorth().east()  * OsmValidator.griddetail);
-        long y0 = Math.round(n1.getEastNorth().north() * OsmValidator.griddetail);
-        long x1 = Math.round(n2.getEastNorth().east()  * OsmValidator.griddetail);
-        long y1 = Math.round(n2.getEastNorth().north() * OsmValidator.griddetail);
+        long x0 = Math.round(n1.getEastNorth().east()  * griddetail);
+        long y0 = Math.round(n1.getEastNorth().north() * griddetail);
+        long x1 = Math.round(n2.getEastNorth().east()  * griddetail);
+        long y1 = Math.round(n2.getEastNorth().north() * griddetail);
         // CHECKSTYLE.ON: SingleSpaceSeparator
 
@@ -76,8 +77,8 @@
         // Then floor coordinates, in case the way is in the border of the cell.
         // CHECKSTYLE.OFF: SingleSpaceSeparator
-        x0 = (long) Math.floor(n1.getEastNorth().east()  * OsmValidator.griddetail);
-        y0 = (long) Math.floor(n1.getEastNorth().north() * OsmValidator.griddetail);
-        x1 = (long) Math.floor(n2.getEastNorth().east()  * OsmValidator.griddetail);
-        y1 = (long) Math.floor(n2.getEastNorth().north() * OsmValidator.griddetail);
+        x0 = (long) Math.floor(n1.getEastNorth().east()  * griddetail);
+        y0 = (long) Math.floor(n1.getEastNorth().north() * griddetail);
+        x1 = (long) Math.floor(n2.getEastNorth().east()  * griddetail);
+        y1 = (long) Math.floor(n2.getEastNorth().north() * griddetail);
         // CHECKSTYLE.ON: SingleSpaceSeparator
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java	(revision 11851)
+++ trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java	(revision 11852)
@@ -162,5 +162,5 @@
             e.scheduleRemoval(Collections.singleton(this));
         } else if (e.getRemovedLayer() == this) {
-            OsmValidator.errorLayer = null;
+            OsmValidator.resetErrorLayer();
         }
     }
