Index: /trunk/src/org/openstreetmap/josm/data/osm/DataSource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/DataSource.java	(revision 6228)
+++ /trunk/src/org/openstreetmap/josm/data/osm/DataSource.java	(revision 6229)
@@ -3,14 +3,30 @@
 
 import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
+/**
+ * A data source, defined by bounds and textual description for the origin.
+ * @since 247
+ */
 public class DataSource {
+    /**
+     * The bounds of this data source
+     */
     public final Bounds bounds;
+    /**
+     * The textual description of the origin (example: "OpenStreetMap Server")
+     */
     public final String origin;
 
+    /**
+     * Constructs a new {@code DataSource}.
+     * @param bounds The bounds of this data source
+     * @param origin The textual description of the origin (example: "OpenStreetMap Server")
+     * @throws IllegalArgumentException if bounds is {@code null}
+     */
     public DataSource(Bounds bounds, String origin) {
+        CheckParameterUtil.ensureParameterNotNull(bounds, "bounds");
         this.bounds = bounds;
         this.origin = origin;
-        if (bounds == null)
-            throw new NullPointerException();
     }
 }
Index: /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 6228)
+++ /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 6229)
@@ -173,7 +173,5 @@
 
         private void setValue(Entry entry, String fieldName, String value) throws SAXException {
-            if (entry == null) {
-                throw new NullPointerException("entry cannot be null");
-            }
+            CheckParameterUtil.ensureParameterNotNull(entry, "entry");
             if (fieldName.equals("class") || fieldName.equals("default") || fieldName.equals("throw") || fieldName.equals("new") || fieldName.equals("null")) {
                 fieldName += "_";
