Index: trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 16488)
@@ -1000,13 +1000,13 @@
     @Override
     public synchronized int hashCode() {
-        final int prime = 31;
-        int result = prime + super.hashCode();
-        result = prime * result + ((namespaces == null) ? 0 : namespaces.hashCode());
-        result = prime * result + ((layerPrefs == null) ? 0 : layerPrefs.hashCode());
-        result = prime * result + ((dataSources == null) ? 0 : dataSources.hashCode());
-        result = prime * result + ((privateRoutes == null) ? 0 : privateRoutes.hashCode());
-        result = prime * result + ((privateTracks == null) ? 0 : privateTracks.hashCode());
-        result = prime * result + ((privateWaypoints == null) ? 0 : privateWaypoints.hashCode());
-        return result;
+        return Objects.hash(
+                super.hashCode(),
+                namespaces,
+                layerPrefs,
+                dataSources,
+                privateRoutes,
+                privateTracks,
+                privateWaypoints
+        );
     }
 
Index: trunk/src/org/openstreetmap/josm/data/gpx/GpxTrackSegment.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/GpxTrackSegment.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/data/gpx/GpxTrackSegment.java	(revision 16488)
@@ -6,4 +6,5 @@
 import java.util.Collections;
 import java.util.List;
+import java.util.Objects;
 
 import org.openstreetmap.josm.data.Bounds;
@@ -78,8 +79,5 @@
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = prime + super.hashCode();
-        result = prime * result + ((wayPoints == null) ? 0 : wayPoints.hashCode());
-        return result;
+        return Objects.hash(super.hashCode(), wayPoints);
     }
 
Index: trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 16488)
@@ -288,13 +288,5 @@
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = super.hashCode();
-        long temp = Double.doubleToLongBits(lat);
-        result = prime * result + (int) (temp ^ (temp >>> 32));
-        temp = Double.doubleToLongBits(lon);
-        result = prime * result + (int) (temp ^ (temp >>> 32));
-        temp = getTimeInMillis();
-        result = prime * result + (int) (temp ^ (temp >>> 32));
-        return result;
+        return Objects.hash(super.hashCode(), lat, lon, getTimeInMillis());
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java	(revision 16488)
@@ -422,9 +422,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + ((lhs == null) ? 0 : lhs.hashCode());
-            result = prime * result + ((rhs == null) ? 0 : rhs.hashCode());
-            return result;
+            return Objects.hash(lhs, lhs);
         }
 
@@ -530,9 +526,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + (defaultValue ? 1231 : 1237);
-            result = prime * result + ((key == null) ? 0 : key.hashCode());
-            return result;
+            return Objects.hash(defaultValue, key);
         }
 
@@ -853,11 +845,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + compareMode;
-            result = prime * result + ((key == null) ? 0 : key.hashCode());
-            result = prime * result + ((referenceNumber == null) ? 0 : referenceNumber.hashCode());
-            result = prime * result + ((referenceValue == null) ? 0 : referenceValue.hashCode());
-            return result;
+            return Objects.hash(compareMode, key, referenceNumber, referenceValue);
         }
 
@@ -1010,12 +996,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + ((key == null) ? 0 : key.hashCode());
-            result = prime * result + ((keyPattern == null) ? 0 : keyPattern.hashCode());
-            result = prime * result + ((mode == null) ? 0 : mode.hashCode());
-            result = prime * result + ((value == null) ? 0 : value.hashCode());
-            result = prime * result + ((valuePattern == null) ? 0 : valuePattern.hashCode());
-            return result;
+            return Objects.hash(key, keyPattern, mode, value, valuePattern);
         }
 
@@ -1117,10 +1096,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + (caseSensitive ? 1231 : 1237);
-            result = prime * result + ((search == null) ? 0 : search.hashCode());
-            result = prime * result + ((searchRegex == null) ? 0 : searchRegex.hashCode());
-            return result;
+            return Objects.hash(caseSensitive, search, searchRegex);
         }
 
@@ -1336,9 +1310,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + (modulo ? 1231 : 1237);
-            result = prime * result + nth;
-            return result;
+            return Objects.hash(modulo, nth);
         }
 
@@ -1392,9 +1362,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + (int) (max ^ (max >>> 32));
-            result = prime * result + (int) (min ^ (min >>> 32));
-            return result;
+            return Objects.hash(max, min);
         }
 
Index: trunk/src/org/openstreetmap/josm/data/preferences/AbstractProperty.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/preferences/AbstractProperty.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/data/preferences/AbstractProperty.java	(revision 16488)
@@ -9,4 +9,6 @@
 import org.openstreetmap.josm.tools.bugreport.BugReport;
 
+import java.util.Objects;
+
 /**
  * Captures the common functionality of preference properties
@@ -29,9 +31,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + getOuterType().hashCode();
-            result = prime * result + ((listener == null) ? 0 : listener.hashCode());
-            return result;
+            return Objects.hash(getOuterType(), listener);
         }
 
@@ -318,9 +316,5 @@
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((key == null) ? 0 : key.hashCode());
-        result = prime * result + ((preferences == null) ? 0 : preferences.hashCode());
-        return result;
+        return Objects.hash(key, preferences);
     }
 
Index: trunk/src/org/openstreetmap/josm/data/tagging/ac/AutoCompletionItem.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/tagging/ac/AutoCompletionItem.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/data/tagging/ac/AutoCompletionItem.java	(revision 16488)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.data.tagging.ac;
+
+import java.util.Objects;
 
 /**
@@ -86,10 +88,5 @@
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result
-                + ((priority == null) ? 0 : priority.hashCode());
-        result = prime * result + ((value == null) ? 0 : value.hashCode());
-        return result;
+        return Objects.hash(priority, value);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/download/UserQueryList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/UserQueryList.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/gui/download/UserQueryList.java	(revision 16488)
@@ -625,9 +625,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + ((itemKey == null) ? 0 : itemKey.hashCode());
-            result = prime * result + ((query == null) ? 0 : query.hashCode());
-            return result;
+            return Objects.hash(itemKey, query);
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java	(revision 16488)
@@ -77,5 +77,5 @@
     @Override
     public int hashCode() {
-        return 31 * super.hashCode() + ((thumbnail == null) ? 0 : thumbnail.hashCode());
+        return Objects.hash(super.hashCode(), thumbnail);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileSourceDisplaySettings.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileSourceDisplaySettings.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileSourceDisplaySettings.java	(revision 16488)
@@ -5,4 +5,5 @@
 import java.util.Locale;
 import java.util.Map;
+import java.util.Objects;
 import java.util.concurrent.CopyOnWriteArrayList;
 
@@ -323,10 +324,5 @@
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + (autoLoad ? 1231 : 1237);
-        result = prime * result + (autoZoom ? 1231 : 1237);
-        result = prime * result + (showErrors ? 1231 : 1237);
-        return result;
+        return Objects.hash(autoLoad, autoZoom, showErrors);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaIconElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaIconElement.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaIconElement.java	(revision 16488)
@@ -72,10 +72,5 @@
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = super.hashCode();
-        result = prime * result + ((iconImage == null) ? 0 : iconImage.hashCode());
-        result = prime * result + ((iconImageAngle == null) ? 0 : iconImageAngle.hashCode());
-        result = prime * result + ((iconPosition == null) ? 0 : iconPosition.hashCode());
-        return result;
+        return Objects.hash(super.hashCode(), iconImage, iconImageAngle, iconPosition);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/CompletelyInsideAreaStrategy.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/CompletelyInsideAreaStrategy.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/CompletelyInsideAreaStrategy.java	(revision 16488)
@@ -5,4 +5,5 @@
 import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
+import java.util.Objects;
 
 import org.openstreetmap.josm.gui.MapViewState;
@@ -122,12 +123,5 @@
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        long temp;
-        temp = Double.doubleToLongBits(offsetX);
-        result = prime * result + (int) (temp ^ (temp >>> 32));
-        temp = Double.doubleToLongBits(offsetY);
-        result = prime * result + (int) (temp ^ (temp >>> 32));
-        return result;
+        return Objects.hash(offsetX, offsetY);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/OnLineStrategy.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/OnLineStrategy.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/OnLineStrategy.java	(revision 16488)
@@ -354,10 +354,5 @@
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        long temp;
-        temp = Double.doubleToLongBits(yOffset);
-        result = prime * result + (int) (temp ^ (temp >>> 32));
-        return result;
+        return Double.hashCode(yOffset);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/util/WindowGeometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/WindowGeometry.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/gui/util/WindowGeometry.java	(revision 16488)
@@ -14,4 +14,5 @@
 import java.awt.Rectangle;
 import java.awt.Window;
+import java.util.Objects;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -491,9 +492,5 @@
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((extent == null) ? 0 : extent.hashCode());
-        result = prime * result + ((topLeft == null) ? 0 : topLeft.hashCode());
-        return result;
+        return Objects.hash(extent, topLeft);
     }
 
Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 16488)
@@ -33,4 +33,5 @@
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Objects;
 import java.util.Set;
 import java.util.TreeSet;
@@ -222,7 +223,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = prime + ((name == null) ? 0 : name.hashCode());
-            return prime * result + ((reason == null) ? 0 : reason.hashCode());
+            return Objects.hash(name, reason);
         }
 
Index: trunk/src/org/openstreetmap/josm/tools/RotationAngle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/RotationAngle.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/tools/RotationAngle.java	(revision 16488)
@@ -82,9 +82,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            long temp = Double.doubleToLongBits(angle);
-            result = prime * result + (int) (temp ^ (temp >>> 32));
-            return result;
+            return Double.hashCode(angle);
         }
 
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java	(revision 16488)
@@ -8,4 +8,5 @@
 import java.util.Collections;
 import java.util.List;
+import java.util.Objects;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
@@ -54,5 +55,5 @@
         @Override
         public int hashCode() {
-            return 31 + ((condition == null) ? 0 : condition.hashCode());
+            return Objects.hash(condition);
         }
 
@@ -104,5 +105,5 @@
         @Override
         public int hashCode() {
-            return 31 * super.hashCode() + ((childCondition == null) ? 0 : childCondition.hashCode());
+            return Objects.hash(super.hashCode(), childCondition);
         }
 
@@ -167,5 +168,5 @@
         @Override
         public int hashCode() {
-            return 31 * super.hashCode() + ((parentCondition == null) ? 0 : parentCondition.hashCode());
+            return Objects.hash(super.hashCode(), parentCondition);
         }
 
@@ -210,9 +211,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = super.hashCode();
-            result = prime * result + ((lhs == null) ? 0 : lhs.hashCode());
-            result = prime * result + ((rhs == null) ? 0 : rhs.hashCode());
-            return result;
+            return Objects.hash(super.hashCode(), lhs, rhs);
         }
 
@@ -263,9 +260,5 @@
         @Override
         public int hashCode() {
-            final int prime = 31;
-            int result = super.hashCode();
-            result = prime * result + ((lhs == null) ? 0 : lhs.hashCode());
-            result = prime * result + ((rhs == null) ? 0 : rhs.hashCode());
-            return result;
+            return Objects.hash(lhs, rhs);
         }
 
@@ -396,9 +389,5 @@
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((context == null) ? 0 : context.hashCode());
-        result = prime * result + ((template == null) ? 0 : template.hashCode());
-        return result;
+        return Objects.hash(context, template);
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/SearchExpressionCondition.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/SearchExpressionCondition.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/SearchExpressionCondition.java	(revision 16488)
@@ -3,4 +3,6 @@
 
 import org.openstreetmap.josm.data.osm.search.SearchCompiler.Match;
+
+import java.util.Objects;
 
 /**
@@ -40,9 +42,5 @@
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((condition == null) ? 0 : condition.hashCode());
-        result = prime * result + ((text == null) ? 0 : text.hashCode());
-        return result;
+        return Objects.hash(condition, text);
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/StaticText.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/StaticText.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/StaticText.java	(revision 16488)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.tools.template_engine;
+
+import java.util.Objects;
 
 /**
@@ -36,5 +38,5 @@
     @Override
     public int hashCode() {
-        return 31 + ((staticText == null) ? 0 : staticText.hashCode());
+        return Objects.hash(staticText);
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/Variable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/Variable.java	(revision 16486)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/Variable.java	(revision 16488)
@@ -4,4 +4,5 @@
 import java.util.Collection;
 import java.util.Locale;
+import java.util.Objects;
 
 /**
@@ -83,9 +84,5 @@
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + (special ? 1231 : 1237);
-        result = prime * result + ((variableName == null) ? 0 : variableName.hashCode());
-        return result;
+        return Objects.hash(special, variableName);
     }
 
