Index: trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 2471)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 2472)
@@ -886,6 +886,18 @@
     }
 
+    /**
+     * Replies the list of errors registered for this primitive.
+     * 
+     * @param primitive the primitive for which errors are queried
+     * @return the list of errors. Never null.
+     * @deprecated should be moved to the validator plugin
+     */
+    @Deprecated
     public List<String> getErrors(OsmPrimitive primitive) {
-        return errors.get(primitive);
+        List<String> ret = errors.get(primitive);
+        if (ret == null) {
+            ret = Collections.emptyList();
+        }
+        return ret;
     }
 
