Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 7139)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 7140)
@@ -175,9 +175,34 @@
             this.value = value;
         }
-        @Override public T getValue() {
+        @Override
+        public T getValue() {
             return value;
         }
-        @Override public String toString() {
+        @Override
+        public String toString() {
             return value != null ? value.toString() : "null";
+        }
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = prime * result + ((value == null) ? 0 : value.hashCode());
+            return result;
+        }
+        @Override
+        public boolean equals(Object obj) {
+            if (this == obj)
+                return true;
+            if (obj == null)
+                return false;
+            if (!(obj instanceof AbstractSetting))
+                return false;
+            AbstractSetting<?> other = (AbstractSetting<?>) obj;
+            if (value == null) {
+                if (other.value != null)
+                    return false;
+            } else if (!value.equals(other.value))
+                return false;
+            return true;
         }
     }
Index: trunk/src/org/openstreetmap/josm/data/validation/Test.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/Test.java	(revision 7139)
+++ trunk/src/org/openstreetmap/josm/data/validation/Test.java	(revision 7140)
@@ -65,8 +65,8 @@
     /** the progress monitor to use */
     protected ProgressMonitor progressMonitor;
-    
+
     /** the start time to compute elapsed time when test finishes */
     protected long startTime;
-    
+
     /**
      * Constructor
@@ -329,3 +329,34 @@
         return v != null && !"no".equals(v) && !"entrance".equals(v);
     }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((description == null) ? 0 : description.hashCode());
+        result = prime * result + ((name == null) ? 0 : name.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (!(obj instanceof Test))
+            return false;
+        Test other = (Test) obj;
+        if (description == null) {
+            if (other.description != null)
+                return false;
+        } else if (!description.equals(other.description))
+            return false;
+        if (name == null) {
+            if (other.name != null)
+                return false;
+        } else if (!name.equals(other.name))
+            return false;
+        return true;
+    }
 }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 7139)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 7140)
@@ -65,5 +65,37 @@
             this.declaration = declaration;
         }
-    }
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = prime * result + ((declaration == null) ? 0 : declaration.hashCode());
+            result = prime * result + ((selectors == null) ? 0 : selectors.hashCode());
+            return result;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (this == obj)
+                return true;
+            if (obj == null)
+                return false;
+            if (!(obj instanceof GroupedMapCSSRule))
+                return false;
+            GroupedMapCSSRule other = (GroupedMapCSSRule) obj;
+            if (declaration == null) {
+                if (other.declaration != null)
+                    return false;
+            } else if (!declaration.equals(other.declaration))
+                return false;
+            if (selectors == null) {
+                if (other.selectors != null)
+                    return false;
+            } else if (!selectors.equals(other.selectors))
+                return false;
+            return true;
+        }
+    }
+
     /**
      * The preference key for tag checker source entries.
@@ -419,4 +451,12 @@
                     || (obj instanceof GroupedMapCSSRule && rule.equals(obj));
         }
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = super.hashCode();
+            result = prime * result + ((rule == null) ? 0 : rule.hashCode());
+            return result;
+        }
     }
 
@@ -485,3 +525,28 @@
         }
     }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((checks == null) ? 0 : checks.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (!super.equals(obj))
+            return false;
+        if (!(obj instanceof MapCSSTagChecker))
+            return false;
+        MapCSSTagChecker other = (MapCSSTagChecker) obj;
+        if (checks == null) {
+            if (other.checks != null)
+                return false;
+        } else if (!checks.equals(other.checks))
+            return false;
+        return true;
+    }
 }
Index: trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 7139)
+++ trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 7140)
@@ -771,9 +771,4 @@
             return new JMenuItem(this);
         }
-
-        @Override
-        public boolean equals(Object obj) {
-            return obj instanceof ChangeResolutionAction;
-        }
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java	(revision 7139)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java	(revision 7140)
@@ -9,5 +9,5 @@
 /**
  * A MapCSS rule.
- * 
+ *
  * A MapCSS style is simply a list of MapCSS rules. Each rule has a selector
  * and a declaration. Whenever the selector matches the primitive, the
@@ -28,5 +28,5 @@
             this.idx = idx;
         }
-        
+
         /**
          * <p>Executes the instructions against the environment {@code env}</p>
@@ -39,6 +39,34 @@
             }
         }
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = prime * result + idx;
+            result = prime * result + ((instructions == null) ? 0 : instructions.hashCode());
+            return result;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (this == obj)
+                return true;
+            if (obj == null)
+                return false;
+            if (!(obj instanceof Declaration))
+                return false;
+            Declaration other = (Declaration) obj;
+            if (idx != other.idx)
+                return false;
+            if (instructions == null) {
+                if (other.instructions != null)
+                    return false;
+            } else if (!instructions.equals(other.instructions))
+                return false;
+            return true;
+        }
     }
-    
+
     public MapCSSRule(Selector selector, Declaration declaration) {
         this.selector = selector;
