Index: applications/editors/josm/plugins/validator/build.xml
===================================================================
--- applications/editors/josm/plugins/validator/build.xml	(revision 19071)
+++ applications/editors/josm/plugins/validator/build.xml	(revision 19072)
@@ -26,6 +26,6 @@
 	  ** update before publishing 
 	-->
-	<property name="commit.message" value="Made build file more robust" />
-	<property name="plugin.main.version" value="2578" />
+	<property name="commit.message" value="Updated to JOSM 2621" />
+	<property name="plugin.main.version" value="2621" />
 
 
Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java	(revision 19071)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java	(revision 19072)
@@ -18,9 +18,9 @@
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
 import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
 import org.openstreetmap.josm.gui.dialogs.LayerListPopup;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
 import org.openstreetmap.josm.plugins.validator.util.Bag;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -37,5 +37,5 @@
         super(tr("Validation errors"));
         this.plugin = plugin;
-        Layer.listeners.add(this);
+        MapView.addLayerChangeListener(this);
     }
 
@@ -138,4 +138,5 @@
             Main.map.mapView.removeLayer(this);
         } else if (oldLayer == this) {
+            MapView.removeLayerChangeListener(this);
             OSMValidatorPlugin.errorLayer = null;
         }
Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java	(revision 19071)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java	(revision 19072)
@@ -30,7 +30,8 @@
 import org.openstreetmap.josm.data.projection.Mercator;
 import org.openstreetmap.josm.gui.MapFrame;
+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;
-import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
 import org.openstreetmap.josm.plugins.Plugin;
@@ -167,8 +168,7 @@
             if (Main.pref.hasKey(PreferenceEditor.PREF_DEBUG + ".grid"))
                 Main.main.addLayer(new GridLayer(tr("Grid")));
-            Layer.listeners.add(this);
+            MapView.addLayerChangeListener(this);            
         } else
-            Layer.listeners.remove(this);
-
+        	MapView.removeLayerChangeListener(this);
         if (newFrame != null) {
         	UploadAction.registerUploadHook(uploadHook = new ValidateUploadHook(this));
