Index: trunk/src/org/openstreetmap/josm/data/Bounds.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Bounds.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/Bounds.java	(revision 2845)
@@ -6,6 +6,8 @@
 import java.awt.geom.Rectangle2D;
 import java.text.DecimalFormat;
+import java.text.MessageFormat;
 
 import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -48,8 +50,7 @@
 
     public Bounds(double [] coords) {
-        if (coords == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "coords"));
+        CheckParameterUtil.ensureParameterNotNull(coords, "coords");
         if (coords.length != 4)
-            throw new IllegalArgumentException(tr("Expected array of length 4, got {0}", coords.length));
+            throw new IllegalArgumentException(MessageFormat.format("Expected array of length 4, got {0}", coords.length));
         this.minLat = coords[0];
         this.minLon = coords[1];
@@ -59,9 +60,8 @@
 
     public Bounds(String asString, String separator) throws IllegalArgumentException {
-        if (asString == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "asString"));
+        CheckParameterUtil.ensureParameterNotNull(asString, "asString");
         String[] components = asString.split(separator);
         if (components.length != 4)
-            throw new IllegalArgumentException(tr("Exactly four doubles excpected in string, got {0}", components.length));
+            throw new IllegalArgumentException(MessageFormat.format("Exactly four doubles excpected in string, got {0}", components.length));
         double[] values = new double[4];
         for (int i=0; i<4; i++) {
@@ -69,5 +69,5 @@
                 values[i] = Double.parseDouble(components[i]);
             } catch(NumberFormatException e) {
-                throw new IllegalArgumentException(tr("Illegal double value ''{0}''", components[i]));
+                throw new IllegalArgumentException(MessageFormat.format("Illegal double value ''{0}''", components[i]));
             }
         }
@@ -108,10 +108,9 @@
      */
     public Bounds(LatLon center, double latExtent, double lonExtent) {
-        if (center == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "center"));
+        CheckParameterUtil.ensureParameterNotNull(center, "center");
         if (latExtent <= 0.0)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0.0 exptected, got {1}", "latExtent", latExtent));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0.0 exptected, got {1}", "latExtent", latExtent));
         if (lonExtent <= 0.0)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0.0 exptected, got {1}", "lonExtent", lonExtent));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0.0 exptected, got {1}", "lonExtent", lonExtent));
 
         this.minLat = center.lat() - latExtent / 2;
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 2845)
@@ -447,8 +447,8 @@
         if (prefDir.exists()) {
             if(!prefDir.isDirectory()) {
-                System.err.println(tr("Warning: Failed to initialize preferences. Preference directory ''{0}'' isn't a directory.", prefDir.getAbsoluteFile()));
+                System.err.println(tr("Warning: Failed to initialize preferences. Preference directory ''{0}'' is not a directory.", prefDir.getAbsoluteFile()));
                 JOptionPane.showMessageDialog(
                         Main.parent,
-                        tr("<html>Failed to initialize preferences.<br>Preference directory ''{0}'' isn't a directory.</html>", prefDir.getAbsoluteFile()),
+                        tr("<html>Failed to initialize preferences.<br>Preference directory ''{0}'' is not a directory.</html>", prefDir.getAbsoluteFile()),
                         tr("Error"),
                         JOptionPane.ERROR_MESSAGE
Index: trunk/src/org/openstreetmap/josm/data/Version.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Version.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/Version.java	(revision 2845)
@@ -138,5 +138,5 @@
         URL u = Main.class.getResource("/REVISION");
         if (u == null) {
-            System.err.println(tr("Warning: the revision file '/REVISION' is missing."));
+            System.err.println(tr("Warning: the revision file ''/REVISION'' is missing."));
             version = 0;
             revision = "";
Index: trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java	(revision 2845)
@@ -13,4 +13,5 @@
 
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -87,7 +88,6 @@
      *
      */
-    public void add(Conflict<?> conflict) throws IllegalStateException, IllegalArgumentException {
-        if (conflict == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "conflict"));
+    public void add(Conflict<?> conflict) throws IllegalStateException {
+        CheckParameterUtil.ensureParameterNotNull(conflict, "conflict");
         addConflict(conflict);
         fireConflictAdded();
Index: trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 2845)
@@ -9,4 +9,5 @@
 import static java.lang.Math.toRadians;
 import static org.openstreetmap.josm.tools.I18n.tr;
+import static org.openstreetmap.josm.tools.I18n.trc;
 
 import java.text.DecimalFormat;
@@ -83,6 +84,6 @@
         case DECIMAL_DEGREES: return cDdFormatter.format(y);
         case DEGREES_MINUTES_SECONDS: return dms(y) + ((y < 0) ?
-                /* short symbol for South */ tr("S") :
-                    /* short symbol for North */ tr("N"));
+                /* short symbol for South */ trc("compass", "S") :
+                    /* short symbol for North */ trc("compass", "N"));
         default: return "ERR";
         }
@@ -97,6 +98,6 @@
         case DECIMAL_DEGREES: return cDdFormatter.format(x);
         case DEGREES_MINUTES_SECONDS: return dms(x) + ((x < 0) ?
-                /* short symbol for West */ tr("W") :
-                    /* short symbol for East */ tr("E"));
+                /* short symbol for West */ trc("compass", "W") :
+                    /* short symbol for East */ trc("compass", "E"));
         default: return "ERR";
         }
Index: trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 2845)
@@ -205,5 +205,5 @@
         if (getPrimitiveById(primitive) != null)
             throw new DataIntegrityProblemException(
-                    tr("Unable to add primitive {0} to the dataset because it's already included", primitive.toString()));
+                    tr("Unable to add primitive {0} to the dataset because it is already included", primitive.toString()));
 
         if (primitive instanceof Node) {
@@ -647,5 +647,5 @@
         OsmPrimitive result = getPrimitiveById(primitiveId);
         if (result == null) {
-            System.out.println(tr("JOSM expected to find primitive [{0} {1}] in dataset but it's not there. Please report this "
+            System.out.println(tr("JOSM expected to find primitive [{0} {1}] in dataset but it is not there. Please report this "
                     + " at http://josm.openstreetmap.de . This is not a critical error, it should be safe to continue in your work.",
                     primitiveId.getType(), Long.toString(primitiveId.getUniqueId())));
Index: trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 2845)
@@ -13,4 +13,5 @@
 
 import org.openstreetmap.josm.data.conflict.ConflictCollection;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -51,6 +52,5 @@
      */
     public DataSetMerger(DataSet targetDataSet, DataSet sourceDataSet) throws IllegalArgumentException {
-        if (targetDataSet == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "targetDataSet"));
+        CheckParameterUtil.ensureParameterNotNull(targetDataSet, "targetDataSet");
         this.targetDataSet = targetDataSet;
         this.sourceDataSet = sourceDataSet;
@@ -278,5 +278,5 @@
             logger.warning(tr("Target object with id {0} and version {1} is visible although "
                     + "source object with lower version {2} is not visible. "
-                    + "Can''t deal with this inconsistency. Keeping target object. ",
+                    + "Cannot deal with this inconsistency. Keeping target object. ",
                     Long.toString(target.getId()),Long.toString(target.getVersion()), Long.toString(source.getVersion())
             ));
Index: trunk/src/org/openstreetmap/josm/data/osm/Filters.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Filters.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/Filters.java	(revision 2845)
@@ -140,10 +140,10 @@
     public String getColumnName(int column){
         String[] names = { /* translators notes must be in front */
-                /* column header: enable filter */             trc("filter","E"),
-                /* column header: hide filter */               tr("H"),
-                /* column header: filter text */               tr("Text"),
-                /* column header: apply filter for children */ tr("C"),
-                /* column header: inverted filter */           tr("I"),
-                /* column header: filter mode */               tr("M")
+                /* column header: enable filter */             trc("enable filter","E"),
+                /* column header: hide filter */               trc("hide filter", "H"),
+                /* column header: filter text */               trc("filter", "Text"),
+                /* column header: apply filter for children */ trc("filter children", "C"),
+                /* column header: inverted filter */           trc("invert filter", "I"),
+                /* column header: filter mode */               trc("filter mode", "M")
         };
         return names[column];
@@ -208,8 +208,8 @@
         case 5:
             switch(f.mode){ /* translators notes must be in front */
-            case replace:      /* filter mode: replace */      return tr("R");
-            case add:          /* filter mode: add */          return tr("A");
-            case remove:       /* filter mode: remove */       return tr("D");
-            case in_selection: /* filter mode: in selection */ return tr("F");
+            case replace:      /* filter mode: replace */      return trc("filter mode replace", "R");
+            case add:          /* filter mode: add */          return trc("filter mode add", "A");
+            case remove:       /* filter mode: remove */       return trc("filter mode remove", "D");
+            case in_selection: /* filter mode: in selection */ return trc("filter mode in selection", "F");
             }
         }
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 2845)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -26,4 +27,5 @@
 import org.openstreetmap.josm.data.osm.visitor.Visitor;
 import org.openstreetmap.josm.gui.mappaint.ElemStyle;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -262,5 +264,5 @@
         } else {
             if (id < 0)
-                throw new IllegalArgumentException(tr("Expected ID >= 0. Got {0}.", id));
+                throw new IllegalArgumentException(MessageFormat.format("Expected ID >= 0. Got {0}.", id));
             else if (id == 0) {
                 this.id = generateUniqueId();
@@ -399,5 +401,5 @@
     public void setVisible(boolean visible) throws IllegalStateException{
         if (isNew() && visible == false)
-            throw new IllegalStateException(tr("A primitive with ID = 0 can't be invisible."));
+            throw new IllegalStateException(tr("A primitive with ID = 0 cannot be invisible."));
         if (visible) {
             flags |= FLAG_VISIBLE;
@@ -650,7 +652,7 @@
             return;
         if (changesetId < 0)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' >= 0 expected, got {1}", "changesetId", changesetId));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' >= 0 expected, got {1}", "changesetId", changesetId));
         if (isNew() && changesetId > 0)
-            throw new IllegalStateException(tr("Can''t assign a changesetId > 0 to a new primitive. Value of changesetId is {0}", changesetId));
+            throw new IllegalStateException(tr("Cannot assign a changesetId > 0 to a new primitive. Value of changesetId is {0}", changesetId));
         int old = this.changesetId;
         this.changesetId = changesetId;
@@ -1035,10 +1037,9 @@
      */
     public void mergeFrom(OsmPrimitive other) {
-        if (other == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "other"));
+        CheckParameterUtil.ensureParameterNotNull(other, "other");
         if (other.isNew() ^ isNew())
-            throw new DataIntegrityProblemException(tr("Can't merge because either of the participating primitives is new and the other is not"));
+            throw new DataIntegrityProblemException(tr("Cannot merge because either of the participating primitives is new and the other is not"));
         if (! other.isNew() && other.getId() != id)
-            throw new DataIntegrityProblemException(tr("Can''t merge primitives with different ids. This id is {0}, the other is {1}", id, other.getId()));
+            throw new DataIntegrityProblemException(tr("Cannot merge primitives with different ids. This id is {0}, the other is {1}", id, other.getId()));
 
         setKeys(other.getKeys());
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveType.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveType.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveType.java	(revision 2845)
@@ -2,4 +2,6 @@
 package org.openstreetmap.josm.data.osm;
 import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.text.MessageFormat;
 
 public enum OsmPrimitiveType {
@@ -35,5 +37,5 @@
             if (type.getAPIName().equals(typeName)) return type;
         }
-        throw new IllegalArgumentException(tr("Parameter ''{0}'' is not a valid type name. Got ''{1}''.", "typeName", typeName));
+        throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' is not a valid type name. Got ''{1}''.", "typeName", typeName));
     }
 
@@ -46,5 +48,5 @@
         if (cls.equals(Way.class)) return WAY;
         if (cls.equals(Relation.class)) return RELATION;
-        throw new IllegalArgumentException(tr("Parameter ''{0}'' is not an acceptable class. Got ''{1}''.", "cls", cls.toString()));
+        throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' is not an acceptable class. Got ''{1}''.", "cls", cls.toString()));
     }
 
@@ -53,5 +55,5 @@
         if (cls.equals(WayData.class)) return WAY;
         if (cls.equals(RelationData.class)) return RELATION;
-        throw new IllegalArgumentException(tr("Parameter ''{0}'' is not an acceptable class. Got ''{1}''.", "cls", cls.toString()));
+        throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' is not an acceptable class. Got ''{1}''.", "cls", cls.toString()));
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 2845)
@@ -570,5 +570,5 @@
         if (primitive == null) return;
         if (! isApplicableToPrimitive())
-            throw new IllegalStateException(tr("Tag collection can't be applied to a primitive because there are keys with multiple values."));
+            throw new IllegalStateException(tr("Tag collection cannot be applied to a primitive because there are keys with multiple values."));
         for (Tag tag: tags) {
             if (tag.getValue() == null || tag.getValue().equals("")) {
@@ -591,5 +591,5 @@
         if (primitives == null) return;
         if (! isApplicableToPrimitive())
-            throw new IllegalStateException(tr("Tag collection can't be applied to a primitive because there are keys with multiple values."));
+            throw new IllegalStateException(tr("Tag collection cannot be applied to a primitive because there are keys with multiple values."));
         for (Tagged primitive: primitives) {
             applyTo(primitive);
@@ -608,5 +608,5 @@
         if (primitive == null) return;
         if (! isApplicableToPrimitive())
-            throw new IllegalStateException(tr("Tag collection can't be applied to a primitive because there are keys with multiple values."));
+            throw new IllegalStateException(tr("Tag collection cannot be applied to a primitive because there are keys with multiple values."));
         primitive.removeAll();
         for (Tag tag: tags) {
@@ -626,5 +626,5 @@
         if (primitives == null) return;
         if (! isApplicableToPrimitive())
-            throw new IllegalStateException(tr("Tag collection can't be applied to a primitive because there are keys with multiple values."));
+            throw new IllegalStateException(tr("Tag collection cannot be applied to a primitive because there are keys with multiple values."));
         for (Tagged primitive: primitives) {
             replaceTagsOf(primitive);
Index: trunk/src/org/openstreetmap/josm/data/osm/history/History.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/History.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/History.java	(revision 2845)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -13,4 +14,5 @@
 import org.openstreetmap.josm.data.osm.PrimitiveId;
 import org.openstreetmap.josm.data.osm.SimplePrimitiveId;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -52,7 +54,6 @@
     protected History(long id, OsmPrimitiveType type, List<HistoryOsmPrimitive> versions) {
         if (id <= 0)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected, got {1}", "id", id));
-        if (type == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "type"));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected, got {1}", "id", id));
+        CheckParameterUtil.ensureParameterNotNull(type, "type");
         this.id = id;
         this.type = type;
@@ -216,5 +217,5 @@
     public HistoryOsmPrimitive get(int idx) {
         if (idx < 0 || idx >= versions.size())
-            throw new IndexOutOfBoundsException(tr("Parameter ''{0}'' in range 0..{1} expected. Got ''{2}''.", "idx", versions.size()-1, idx));
+            throw new IndexOutOfBoundsException(MessageFormat.format("Parameter ''{0}'' in range 0..{1} expected. Got ''{2}''.", "idx", versions.size()-1, idx));
         return versions.get(idx);
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java	(revision 2845)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -11,4 +12,5 @@
 import org.openstreetmap.josm.data.osm.PrimitiveId;
 import org.openstreetmap.josm.data.osm.SimplePrimitiveId;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -72,9 +74,8 @@
     public HistoryOsmPrimitive get(long id, OsmPrimitiveType type, long version){
         if (id <= 0)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected, got {1}", "id", id));
-        if (type == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "type"));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected, got {1}", "id", id));
+        CheckParameterUtil.ensureParameterNotNull(type, "type");
         if (version <= 0)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected, got {1}", "version", version));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected, got {1}", "version", version));
 
         SimplePrimitiveId pid = new SimplePrimitiveId(id, type);
@@ -116,7 +117,6 @@
     public History getHistory(long id, OsmPrimitiveType type) throws IllegalArgumentException{
         if (id <= 0)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected, got {1}", "id", id));
-        if (type == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "type"));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected, got {1}", "id", id));
+        CheckParameterUtil.ensureParameterNotNull(type, "type");
         SimplePrimitiveId pid = new SimplePrimitiveId(id, type);
         return getHistory(pid);
@@ -133,6 +133,5 @@
      */
     public History getHistory(PrimitiveId pid) throws IllegalArgumentException{
-        if (pid == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "pid"));
+        CheckParameterUtil.ensureParameterNotNull(pid, "pid");
         ArrayList<HistoryOsmPrimitive> versions = data.get(pid);
         if (versions == null)
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java	(revision 2845)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.text.MessageFormat;
 import java.util.Collections;
 import java.util.Date;
@@ -13,4 +14,5 @@
 import org.openstreetmap.josm.data.osm.PrimitiveId;
 import org.openstreetmap.josm.data.osm.SimplePrimitiveId;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -32,10 +34,5 @@
     protected void ensurePositiveLong(long value, String name) {
         if (value <= 0)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got ''{1}''.", name, value));
-    }
-
-    protected void ensureNotNull(Object obj, String name) {
-        if (obj == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", name));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected. Got ''{1}''.", name, value));
     }
 
@@ -59,6 +56,6 @@
             ensurePositiveLong(uid, "uid");
         }
-        ensureNotNull(user, "user");
-        ensureNotNull(timestamp, "timestamp");
+        CheckParameterUtil.ensureParameterNotNull(user, "user");
+        CheckParameterUtil.ensureParameterNotNull(timestamp, "timestamp");
         this.id = id;
         this.version = version;
@@ -113,5 +110,5 @@
     public int compareTo(HistoryOsmPrimitive o) {
         if (this.id != o.id)
-            throw new ClassCastException(tr("Can''t compare primitive with ID ''{0}'' to primitive with ID ''{1}''.", o.id, this.id));
+            throw new ClassCastException(tr("Cannot compare primitive with ID ''{0}'' to primitive with ID ''{1}''.", o.id, this.id));
         return Long.valueOf(this.version).compareTo(o.version);
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java	(revision 2845)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -10,4 +11,5 @@
 
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -87,5 +89,5 @@
     public RelationMember getRelationMember(int idx) throws IndexOutOfBoundsException  {
         if (idx < 0 || idx >= members.size())
-            throw new IndexOutOfBoundsException(tr("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", members.size(),idx));
+            throw new IndexOutOfBoundsException(MessageFormat.format("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", members.size(),idx));
         return members.get(idx);
     }
@@ -107,6 +109,5 @@
      */
     public void addMember(RelationMember member) throws IllegalArgumentException {
-        if (member == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "member"));
+        CheckParameterUtil.ensureParameterNotNull(member, "member");
         members.add(member);
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/history/RelationMember.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/RelationMember.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/RelationMember.java	(revision 2845)
@@ -2,7 +2,6 @@
 package org.openstreetmap.josm.data.osm.history;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
-
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -27,6 +26,5 @@
     public RelationMember(String role, OsmPrimitiveType primitiveType, long primitiveId) {
         this.role = (role == null ? "" : role);
-        if (primitiveType == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitiveType"));
+        CheckParameterUtil.ensureParameterNotNull(primitiveType, "primitiveType");
         this.primitiveType = primitiveType;
         this.primitiveId = primitiveId;
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java	(revision 2845)
@@ -14,4 +14,5 @@
 import org.openstreetmap.josm.data.osm.RelationMember;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -41,6 +42,5 @@
      */
     public MergeSourceBuildingVisitor(DataSet selectionBase) throws IllegalArgumentException {
-        if (selectionBase == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "selectionBase"));
+        CheckParameterUtil.ensureParameterNotNull(selectionBase, "selectionBase");
         this.selectionBase = selectionBase;
         this.hull = new DataSet();
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java	(revision 2844)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java	(revision 2845)
@@ -321,9 +321,9 @@
             viaNode = (Node) via;
             if(!fromWay.isFirstLastNode(viaNode)) {
-                putError(r, tr("The \"from\" way doesn't start or end at a \"via\" node."), true);
+                putError(r, tr("The \"from\" way does not start or end at a \"via\" node."), true);
                 return;
             }
             if(!toWay.isFirstLastNode(viaNode)) {
-                putError(r, tr("The \"to\" way doesn't start or end at a \"via\" node."), true);
+                putError(r, tr("The \"to\" way does not start or end at a \"via\" node."), true);
             }
         }
@@ -353,9 +353,9 @@
                 viaNode = lastNode;
             } else {
-                putError(r, tr("The \"from\" way doesn't start or end at the \"via\" way."), true);
+                putError(r, tr("The \"from\" way does not start or end at the \"via\" way."), true);
                 return;
             }
             if(!toWay.isFirstLastNode(viaNode == firstNode ? lastNode : firstNode)) {
-                putError(r, tr("The \"to\" way doesn't start or end at the \"via\" way."), true);
+                putError(r, tr("The \"to\" way does not start or end at the \"via\" way."), true);
             }
         }
