Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 7083)
@@ -27,4 +27,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.StringTokenizer;
 import java.util.concurrent.Callable;
@@ -181,5 +182,5 @@
      * The commands undo/redo handler.
      */
-    public UndoRedoHandler undoRedo = new UndoRedoHandler();
+    public final UndoRedoHandler undoRedo = new UndoRedoHandler();
 
     /**
@@ -580,5 +581,4 @@
         toolbar.control.updateUI();
         contentPanePrivate.updateUI();
-
     }
 
@@ -1123,5 +1123,5 @@
                 final String EXIT = tr("Exit JOSM");
                 final String CONTINUE = tr("Continue, try anyway");
-                int ret = JOptionPane.showOptionDialog(null, panel, tr("Error"), JOptionPane.YES_NO_OPTION, 
+                int ret = JOptionPane.showOptionDialog(null, panel, tr("Error"), JOptionPane.YES_NO_OPTION,
                         JOptionPane.ERROR_MESSAGE, null, new String[] {EXIT, CONTINUE}, EXIT);
                 if (ret == 0) {
@@ -1178,5 +1178,5 @@
     private static void fireProjectionChanged(Projection oldValue, Projection newValue, Bounds oldBounds) {
         if (newValue == null ^ oldValue == null
-                || (newValue != null && oldValue != null && !Utils.equal(newValue.toCode(), oldValue.toCode()))) {
+                || (newValue != null && oldValue != null && !Objects.equals(newValue.toCode(), oldValue.toCode()))) {
 
             synchronized(Main.class) {
Index: trunk/src/org/openstreetmap/josm/actions/search/PushbackTokenizer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/PushbackTokenizer.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/actions/search/PushbackTokenizer.java	(revision 7083)
@@ -4,5 +4,4 @@
 import static org.openstreetmap.josm.tools.I18n.marktr;
 import static org.openstreetmap.josm.tools.I18n.tr;
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import java.io.IOException;
@@ -10,4 +9,5 @@
 import java.util.Arrays;
 import java.util.List;
+import java.util.Objects;
 
 import org.openstreetmap.josm.actions.search.SearchCompiler.ParseError;
@@ -207,5 +207,5 @@
     public boolean readIfEqual(Token token) {
         Token nextTok = nextToken();
-        if (equal(nextTok, token))
+        if (Objects.equals(nextTok, token))
             return true;
         currentToken = nextTok;
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 7083)
@@ -29,4 +29,5 @@
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Objects;
 import java.util.ResourceBundle;
 import java.util.SortedMap;
@@ -239,5 +240,5 @@
                 String aStr = itA.next();
                 String bStr = itB.next();
-                if (!Utils.equal(aStr,bStr)) return false;
+                if (!Objects.equals(aStr,bStr)) return false;
             }
             return true;
@@ -375,5 +376,5 @@
             if (a.size() != b.size()) return false;
             for (Entry<String, String> e : a.entrySet()) {
-                if (!Utils.equal(e.getValue(), b.get(e.getKey()))) return false;
+                if (!Objects.equals(e.getValue(), b.get(e.getKey()))) return false;
             }
             return true;
@@ -1210,5 +1211,5 @@
                 Object defaultFieldValue = f.get(structPrototype);
                 if (fieldValue != null) {
-                    if (f.getAnnotation(writeExplicitly.class) != null || !Utils.equal(fieldValue, defaultFieldValue)) {
+                    if (f.getAnnotation(writeExplicitly.class) != null || !Objects.equals(fieldValue, defaultFieldValue)) {
                         hash.put(f.getName().replace("_", "-"), fieldValue.toString());
                     }
Index: trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 7083)
@@ -8,4 +8,5 @@
 import java.util.Collections;
 import java.util.List;
+import java.util.Objects;
 
 import org.openstreetmap.josm.Main;
@@ -13,5 +14,4 @@
 import org.openstreetmap.josm.io.MirroredInputStream;
 import org.openstreetmap.josm.io.imagery.ImageryReader;
-import org.openstreetmap.josm.tools.Utils;
 import org.xml.sax.SAXException;
 
@@ -122,5 +122,5 @@
     // some additional checks to respect extended URLs in preferences (legacy workaround)
     private boolean isSimilar(String a, String b) {
-        return Utils.equal(a, b) || (a != null && b != null && !a.isEmpty() && !b.isEmpty() && (a.contains(b) || b.contains(a)));
+        return Objects.equals(a, b) || (a != null && b != null && !a.isEmpty() && !b.isEmpty() && (a.contains(b) || b.contains(a)));
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 7083)
@@ -14,8 +14,7 @@
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicLong;
-
-import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -730,5 +729,5 @@
      */
     public boolean hasTag(String key, String value) {
-        return Utils.equal(value, get(key));
+        return Objects.equals(value, get(key));
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/Filter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Filter.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/data/osm/Filter.java	(revision 7083)
@@ -1,6 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.data.osm;
-
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import org.openstreetmap.josm.actions.search.SearchAction.SearchMode;
@@ -26,5 +24,5 @@
         super("", SearchMode.add, false, false, false);
     }
-    
+
     public Filter(String text, SearchMode mode, boolean caseSensitive,
             boolean regexSearch, boolean allElements) {
@@ -34,11 +32,11 @@
     public Filter(FilterPreferenceEntry e) {
         super(e.text, SearchMode.add, false, false, false);
-        if (equal(e.mode, "replace")) {
+        if ("replace".equals(e.mode)) {
             mode = SearchMode.replace;
-        } else if (equal(e.mode, "add")) {
+        } else if ("add".equals(e.mode)) {
             mode = SearchMode.add;
-        } else if (equal(e.mode, "remove")) {
+        } else if ("remove".equals(e.mode)) {
             mode = SearchMode.remove;
-        } else  if (equal(e.mode, "in_selection")) {
+        } else  if ("in_selection".equals(e.mode)) {
             mode = SearchMode.in_selection;
         }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 7083)
@@ -11,4 +11,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 
@@ -25,5 +26,4 @@
 import org.openstreetmap.josm.data.validation.util.ValUtil;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
-import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -71,8 +71,8 @@
         @Override
         boolean ignoreWaySegmentCombination(Way w1, Way w2) {
-            if (!Utils.equal(getLayer(w1), getLayer(w2))) {
-                return true;
-            }
-            if (w1.hasKey(HIGHWAY) && w2.hasKey(HIGHWAY) && !Utils.equal(w1.get("level"), w2.get("level"))) {
+            if (!Objects.equals(getLayer(w1), getLayer(w2))) {
+                return true;
+            }
+            if (w1.hasKey(HIGHWAY) && w2.hasKey(HIGHWAY) && !Objects.equals(w1.get("level"), w2.get("level"))) {
                 return true;
             }
@@ -129,5 +129,5 @@
         @Override
         boolean ignoreWaySegmentCombination(Way w1, Way w2) {
-            return !Utils.equal(w1.get("boundary"), w2.get("boundary"));
+            return !Objects.equals(w1.get("boundary"), w2.get("boundary"));
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 7083)
@@ -18,4 +18,5 @@
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
+import java.util.Objects;
 
 import javax.swing.AbstractAction;
@@ -38,5 +39,4 @@
 import org.openstreetmap.josm.io.OsmApi;
 import org.openstreetmap.josm.tools.ImageProvider;
-import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.WindowGeometry;
 
@@ -45,5 +45,5 @@
     public static CredentialDialog getOsmApiCredentialDialog(String username, String password, String host, String saveUsernameAndPasswordCheckboxText) {
         CredentialDialog dialog = new CredentialDialog(saveUsernameAndPasswordCheckboxText);
-        if (Utils.equal(OsmApi.getOsmApi().getHost(), host)) {
+        if (Objects.equals(OsmApi.getOsmApi().getHost(), host)) {
             dialog.prepareForOsmApiCredentials(username, password);
         } else {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java	(revision 7083)
@@ -2,7 +2,6 @@
 package org.openstreetmap.josm.gui.mappaint;
 
-import static org.openstreetmap.josm.tools.Utils.equal;
-
 import java.awt.Color;
+import java.util.Objects;
 
 import org.openstreetmap.josm.Main;
@@ -11,6 +10,6 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
+import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
 import org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer;
-import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.IconReference;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
@@ -67,5 +66,5 @@
         TextElement text = null;
         Keyword textPos = c.get(TEXT_POSITION, null, Keyword.class);
-        if (textPos == null || Utils.equal(textPos.val, "center")) {
+        if (textPos == null || "center".equals(textPos.val)) {
             text = TextElement.create(c, PaintColors.AREA_TEXT.get(), true);
         }
@@ -102,9 +101,9 @@
         AreaElemStyle other = (AreaElemStyle) obj;
         // we should get the same image object due to caching
-        if (!equal(fillImage, other.fillImage))
+        if (!Objects.equals(fillImage, other.fillImage))
             return false;
-        if (!equal(color, other.color))
+        if (!Objects.equals(color, other.color))
             return false;
-        if (!equal(text, other.text))
+        if (!Objects.equals(text, other.text))
             return false;
         return true;
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(revision 7083)
@@ -1,6 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.mappaint;
-
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import java.awt.Color;
@@ -10,6 +8,6 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
+import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
 import org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer;
-import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
 
@@ -115,5 +113,5 @@
         TextElement text = TextElement.create(c, DEFAULT_TEXT_COLOR, false);
         if (text == null) return null;
-        // Skip any primtives that don't have text to draw. (Styles are recreated for any tag change.)
+        // Skip any primitives that don't have text to draw. (Styles are recreated for any tag change.)
         // The concrete text to render is not cached in this object, but computed for each
         // repaint. This way, one BoxTextElemStyle object can be used by multiple primitives (to save memory).
@@ -122,22 +120,22 @@
         HorizontalTextAlignment hAlign = HorizontalTextAlignment.RIGHT;
         Keyword hAlignKW = c.get("text-anchor-horizontal", Keyword.RIGHT, Keyword.class);
-        if (equal(hAlignKW.val, "left")) {
+        if ("left".equals(hAlignKW.val)) {
             hAlign = HorizontalTextAlignment.LEFT;
-        } else if (equal(hAlignKW.val, "center")) {
+        } else if ("center".equals(hAlignKW.val)) {
             hAlign = HorizontalTextAlignment.CENTER;
-        } else if (equal(hAlignKW.val, "right")) {
+        } else if ("right".equals(hAlignKW.val)) {
             hAlign = HorizontalTextAlignment.RIGHT;
         }
         VerticalTextAlignment vAlign = VerticalTextAlignment.BOTTOM;
         String vAlignStr = c.get("text-anchor-vertical", Keyword.BOTTOM, Keyword.class).val;
-        if (equal(vAlignStr, "above")) {
+        if ("above".equals(vAlignStr)) {
             vAlign = VerticalTextAlignment.ABOVE;
-        } else if (equal(vAlignStr, "top")) {
+        } else if ("top".equals(vAlignStr)) {
             vAlign = VerticalTextAlignment.TOP;
-        } else if (equal(vAlignStr, "center")) {
+        } else if ("center".equals(vAlignStr)) {
             vAlign = VerticalTextAlignment.CENTER;
-        } else if (equal(vAlignStr, "bottom")) {
+        } else if ("bottom".equals(vAlignStr)) {
             vAlign = VerticalTextAlignment.BOTTOM;
-        } else if (equal(vAlignStr, "below")) {
+        } else if ("below".equals(vAlignStr)) {
             vAlign = VerticalTextAlignment.BELOW;
         }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 7083)
@@ -1,6 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.mappaint;
-
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import java.awt.Color;
@@ -133,7 +131,7 @@
         if (o instanceof Keyword) {
             String s = ((Keyword) o).val;
-            if (equal(s, "true") || equal(s, "yes"))
+            if ("true".equals(s) || "yes".equals(s))
                 return true;
-            if (equal(s, "false") || equal(s, "no"))
+            if ("false".equals(s) || "no".equals(s))
                 return false;
         }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java	(revision 7083)
@@ -1,6 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.mappaint;
-
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import java.awt.Font;
@@ -67,7 +65,7 @@
         } else {
             Keyword widthKW = c.get(key, null, Keyword.class, true);
-            if (equal(widthKW, Keyword.THINNEST))
+            if (Keyword.THINNEST.equals(widthKW))
                 return 0f;
-            if (equal(widthKW, Keyword.DEFAULT))
+            if (Keyword.DEFAULT.equals(widthKW))
                 return (float) MapPaintSettings.INSTANCE.getDefaultSegmentWidth();
             if (relativeTo != null) {
@@ -93,5 +91,5 @@
     private static volatile Float DEFAULT_FONT_SIZE = null;
     private static final Object lock = new Object();
-    
+
     // thread save access (double-checked locking)
     private static Float getDefaultFontSize() {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/Keyword.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/Keyword.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/Keyword.java	(revision 7083)
@@ -2,5 +2,5 @@
 package org.openstreetmap.josm.gui.mappaint;
 
-import org.openstreetmap.josm.tools.Utils;
+import java.util.Objects;
 
 public class Keyword {
@@ -20,5 +20,5 @@
         if (obj == null || getClass() != obj.getClass())
             return false;
-        return Utils.equal(val, ((Keyword) obj).val);
+        return Objects.equals(val, ((Keyword) obj).val);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java	(revision 7083)
@@ -1,10 +1,9 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.mappaint;
-
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import java.awt.BasicStroke;
 import java.awt.Color;
 import java.util.Arrays;
+import java.util.Objects;
 
 import org.openstreetmap.josm.Main;
@@ -215,9 +214,9 @@
         Keyword capKW = c.get(type.prefix + "linecap", null, Keyword.class);
         if (capKW != null) {
-            if (equal(capKW.val, "none")) {
+            if ("none".equals(capKW.val)) {
                 cap = BasicStroke.CAP_BUTT;
-            } else if (equal(capKW.val, "round")) {
+            } else if ("round".equals(capKW.val)) {
                 cap = BasicStroke.CAP_ROUND;
-            } else if (equal(capKW.val, "square")) {
+            } else if ("square".equals(capKW.val)) {
                 cap = BasicStroke.CAP_SQUARE;
             }
@@ -230,9 +229,9 @@
         Keyword joinKW = c.get(type.prefix + "linejoin", null, Keyword.class);
         if (joinKW != null) {
-            if (equal(joinKW.val, "round")) {
+            if ("round".equals(joinKW.val)) {
                 join = BasicStroke.JOIN_ROUND;
-            } else if (equal(joinKW.val, "miter")) {
+            } else if ("miter".equals(joinKW.val)) {
                 join = BasicStroke.JOIN_MITER;
-            } else if (equal(joinKW.val, "bevel")) {
+            } else if ("bevel".equals(joinKW.val)) {
                 join = BasicStroke.JOIN_BEVEL;
             }
@@ -329,8 +328,8 @@
             return false;
         final LineElemStyle other = (LineElemStyle) obj;
-        return  equal(line, other.line) &&
-            equal(color, other.color) &&
-            equal(dashesLine, other.dashesLine) &&
-            equal(dashesBackground, other.dashesBackground) &&
+        return Objects.equals(line, other.line) &&
+            Objects.equals(color, other.color) &&
+            Objects.equals(dashesLine, other.dashesLine) &&
+            Objects.equals(dashesBackground, other.dashesBackground) &&
             offset == other.offset &&
             realWidth == other.realWidth;
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/LineTextElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/LineTextElemStyle.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/LineTextElemStyle.java	(revision 7083)
@@ -1,11 +1,12 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.mappaint;
+
+import java.util.Objects;
 
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
+import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
 import org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer;
-import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
-import org.openstreetmap.josm.tools.Utils;
 
 public class LineTextElemStyle extends ElemStyle {
@@ -21,5 +22,5 @@
 
         Keyword textPos = c.get(TEXT_POSITION, null, Keyword.class);
-        if (textPos != null && !Utils.equal(textPos.val, "line"))
+        if (textPos != null && !"line".equals(textPos.val))
             return null;
 
@@ -43,5 +44,5 @@
             return false;
         final LineTextElemStyle other = (LineTextElemStyle) obj;
-        return Utils.equal(text, other.text);
+        return Objects.equals(text, other.text);
     }
 
@@ -55,4 +56,3 @@
         return "LineTextElemStyle{" + super.toString() + "text=" + text + "}";
     }
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MapImage.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MapImage.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MapImage.java	(revision 7083)
@@ -1,10 +1,9 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.mappaint;
-
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import java.awt.Image;
 import java.awt.Rectangle;
 import java.awt.image.BufferedImage;
+import java.util.Objects;
 
 import javax.swing.ImageIcon;
@@ -19,7 +18,7 @@
 
 public class MapImage {
-    
+
     private static final int MAX_SIZE = 48;
-    
+
     /**
      * ImageIcon can change while the image is loading.
@@ -158,5 +157,5 @@
         return new MapImageBoxProvider();
     }
-    
+
     /**
      * Returns the really displayed node icon for this {@code MapImage}.
@@ -174,7 +173,7 @@
         }
     }
-    
+
     private boolean mustRescale(Image image) {
-        return ((width  == -1 && image.getWidth(null) > MAX_SIZE) 
+        return ((width  == -1 && image.getWidth(null) > MAX_SIZE)
              && (height == -1 && image.getHeight(null) > MAX_SIZE));
     }
@@ -187,6 +186,6 @@
         // img changes when image is fully loaded and can't be used for equality check.
         return  alpha == other.alpha &&
-                equal(name, other.name) &&
-                equal(source, other.source) &&
+                Objects.equals(name, other.name) &&
+                Objects.equals(source, other.source) &&
                 width == other.width &&
                 height == other.height;
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java	(revision 7083)
@@ -1,6 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.mappaint;
-
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import java.awt.BasicStroke;
@@ -9,4 +7,5 @@
 import java.awt.Rectangle;
 import java.awt.Stroke;
+import java.util.Objects;
 
 import org.openstreetmap.josm.Main;
@@ -28,5 +27,5 @@
     public final MapImage mapImage;
     public final Symbol symbol;
-    
+
     private Image enabledNodeIcon;
     private Image disabledNodeIcon;
@@ -63,7 +62,7 @@
             return  symbol == other.symbol &&
                     size == other.size &&
-                    equal(stroke, other.stroke) &&
-                    equal(strokeColor, other.strokeColor) &&
-                    equal(fillColor, other.fillColor);
+                    Objects.equals(stroke, other.stroke) &&
+                    Objects.equals(strokeColor, other.strokeColor) &&
+                    Objects.equals(fillColor, other.fillColor);
         }
 
@@ -170,21 +169,21 @@
         if (shapeKW == null)
             return null;
-        if (equal(shapeKW.val, "square")) {
+        if ("square".equals(shapeKW.val)) {
             shape = SymbolShape.SQUARE;
-        } else if (equal(shapeKW.val, "circle")) {
+        } else if ("circle".equals(shapeKW.val)) {
             shape = SymbolShape.CIRCLE;
-        } else if (equal(shapeKW.val, "triangle")) {
+        } else if ("triangle".equals(shapeKW.val)) {
             shape = SymbolShape.TRIANGLE;
-        } else if (equal(shapeKW.val, "pentagon")) {
+        } else if ("pentagon".equals(shapeKW.val)) {
             shape = SymbolShape.PENTAGON;
-        } else if (equal(shapeKW.val, "hexagon")) {
+        } else if ("hexagon".equals(shapeKW.val)) {
             shape = SymbolShape.HEXAGON;
-        } else if (equal(shapeKW.val, "heptagon")) {
+        } else if ("heptagon".equals(shapeKW.val)) {
             shape = SymbolShape.HEPTAGON;
-        } else if (equal(shapeKW.val, "octagon")) {
+        } else if ("octagon".equals(shapeKW.val)) {
             shape = SymbolShape.OCTAGON;
-        } else if (equal(shapeKW.val, "nonagon")) {
+        } else if ("nonagon".equals(shapeKW.val)) {
             shape = SymbolShape.NONAGON;
-        } else if (equal(shapeKW.val, "decagon")) {
+        } else if ("decagon".equals(shapeKW.val)) {
             shape = SymbolShape.DECAGON;
         } else
@@ -356,7 +355,7 @@
         final NodeElemStyle other = (NodeElemStyle) obj;
         // we should get the same image object due to caching
-        if (!equal(mapImage, other.mapImage))
+        if (!Objects.equals(mapImage, other.mapImage))
             return false;
-        if (!equal(symbol, other.symbol))
+        if (!Objects.equals(symbol, other.symbol))
             return false;
         return true;
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/RepeatImageElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/RepeatImageElemStyle.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/RepeatImageElemStyle.java	(revision 7083)
@@ -1,6 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.mappaint;
-
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -42,7 +40,7 @@
         LineImageAlignment align = LineImageAlignment.CENTER;
         Keyword alignKW = c.get(REPEAT_IMAGE_ALIGN, Keyword.CENTER, Keyword.class);
-        if (equal(alignKW.val, "top")) {
+        if ("top".equals(alignKW.val)) {
             align = LineImageAlignment.TOP;
-        } else if (equal(alignKW.val, "bottom")) {
+        } else if ("bottom".equals(alignKW.val)) {
             align = LineImageAlignment.BOTTOM;
         }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 7083)
@@ -7,8 +7,8 @@
 import java.util.Iterator;
 import java.util.List;
+import java.util.Objects;
 
 import org.openstreetmap.josm.data.osm.Storage;
 import org.openstreetmap.josm.tools.Pair;
-import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -91,5 +91,5 @@
                 return false;
             final StyleList other = (StyleList) obj;
-            return Utils.equal(lst, other.lst);
+            return Objects.equals(lst, other.lst);
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java	(revision 7083)
@@ -2,8 +2,7 @@
 package org.openstreetmap.josm.gui.mappaint;
 
-import static org.openstreetmap.josm.tools.Utils.equal;
-
 import java.awt.Color;
 import java.awt.Font;
+import java.util.Objects;
 
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -90,9 +89,8 @@
 
         /*
-         * Check whether the label composition strategy is given by
-         * a keyword
+         * Check whether the label composition strategy is given by a keyword
          */
         Keyword keyword = c.get(TEXT, null, Keyword.class, true);
-        if (equal(keyword, Keyword.AUTO))
+        if (Keyword.AUTO.equals(keyword))
             return AUTO_LABEL_COMPOSITION_STRATEGY;
 
@@ -212,11 +210,11 @@
             return false;
         final TextElement other = (TextElement) obj;
-        return  equal(labelCompositionStrategy, other.labelCompositionStrategy) &&
-        equal(font, other.font) &&
+        return Objects.equals(labelCompositionStrategy, other.labelCompositionStrategy) &&
+        Objects.equals(font, other.font) &&
         xOffset == other.xOffset &&
         yOffset == other.yOffset &&
-        equal(color, other.color) &&
-        equal(haloRadius, other.haloRadius) &&
-        equal(haloColor, other.haloColor);
+        Objects.equals(color, other.color) &&
+        Objects.equals(haloRadius, other.haloRadius) &&
+        Objects.equals(haloColor, other.haloColor);
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 7083)
@@ -2,8 +2,7 @@
 package org.openstreetmap.josm.gui.mappaint.mapcss;
 
-import static org.openstreetmap.josm.tools.Utils.equal;
-
 import java.text.MessageFormat;
 import java.util.EnumSet;
+import java.util.Objects;
 import java.util.Set;
 import java.util.regex.Pattern;
@@ -88,7 +87,7 @@
             switch (this) {
             case EQ:
-                return equal(testString, prototypeString);
+                return Objects.equals(testString, prototypeString);
             case NEQ:
-                return !equal(testString, prototypeString);
+                return !Objects.equals(testString, prototypeString);
             case REGEX:
             case NREGEX:
@@ -98,5 +97,5 @@
                 String[] parts = testString.split(";");
                 for (String part : parts) {
-                    if (equal(prototypeString, part.trim()))
+                    if (Objects.equals(prototypeString, part.trim()))
                         return true;
                 }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 7083)
@@ -1,6 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.mappaint.mapcss;
-
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import java.awt.Color;
@@ -594,11 +592,11 @@
      */
     public static Expression createFunctionExpression(String name, List<Expression> args) {
-        if (equal(name, "cond") && args.size() == 3)
+        if ("cond".equals(name) && args.size() == 3)
             return new CondOperator(args.get(0), args.get(1), args.get(2));
-        else if (equal(name, "and"))
+        else if ("and".equals(name))
             return new AndOperator(args);
-        else if (equal(name, "or"))
+        else if ("or".equals(name))
             return new OrOperator(args);
-        else if (equal(name, "length") && args.size() == 1)
+        else if ("length".equals(name) && args.size() == 1)
             return new LengthFunction(args.get(0));
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 7083)
@@ -276,5 +276,5 @@
                     for (Entry<String, Cascade> entry : mc.getLayers()) {
                         env.layer = entry.getKey();
-                        if (Utils.equal(env.layer, "*")) {
+                        if ("*".equals(env.layer)) {
                             continue;
                         }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 7083)
@@ -14,4 +14,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 import org.openstreetmap.josm.Main;
@@ -369,5 +370,5 @@
                 WayPrototypesRecord p2 = new WayPrototypesRecord();
                 get(multipolyOuterWay, true, p2, (useMinMaxScale ? scale : null), mc);
-                if (Utils.equal(p.area, p2.area)) {
+                if (Objects.equals(p.area, p2.area)) {
                     p.area = null;
                 }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 7083)
@@ -4,5 +4,4 @@
 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
 import static org.openstreetmap.josm.tools.I18n.tr;
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import java.awt.Component;
@@ -38,4 +37,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -417,5 +417,5 @@
             SourceEntry pe = p.next();
             SourceEntry ce = c.next();
-            if (!equal(pe.url, ce.url) || !equal(pe.name, ce.name) || pe.active != ce.active)
+            if (!Objects.equals(pe.url, ce.url) || !Objects.equals(pe.name, ce.name) || pe.active != ce.active)
                 return true;
         }
@@ -916,7 +916,7 @@
             editEntryDialog.showDialog();
             if (editEntryDialog.getValue() == 1) {
-                if (e.title != null || !equal(editEntryDialog.getTitle(), "")) {
+                if (e.title != null || !"".equals(editEntryDialog.getTitle())) {
                     e.title = editEntryDialog.getTitle();
-                    if (equal(e.title, "")) {
+                    if ("".equals(e.title)) {
                         e.title = null;
                     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java	(revision 7083)
@@ -2,7 +2,6 @@
 package org.openstreetmap.josm.gui.preferences;
 
-import static org.openstreetmap.josm.tools.Utils.equal;
-
 import java.io.File;
+import java.util.Objects;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -57,7 +56,7 @@
         this.url = url;
         this.isZip = isZip;
-        this.zipEntryPath = equal(zipEntryPath, "") ? null : zipEntryPath;
-        this.name = equal(name, "") ? null : name;
-        this.title = equal(title, "") ? null : title;
+        this.zipEntryPath = "".equals(zipEntryPath) ? null : zipEntryPath;
+        this.name = "".equals(name) ? null : name;
+        this.title = "".equals(title) ? null : title;
         this.active = active;
     }
@@ -81,9 +80,9 @@
             return false;
         final SourceEntry other = (SourceEntry) obj;
-        return equal(other.url, url) &&
+        return Objects.equals(other.url, url) &&
                 other.isZip == isZip &&
-                equal(other.zipEntryPath, zipEntryPath) &&
-                equal(other.name, name) &&
-                equal(other.title, title) &&
+                Objects.equals(other.zipEntryPath, zipEntryPath) &&
+                Objects.equals(other.name, name) &&
+                Objects.equals(other.title, title) &&
                 other.active == active;
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java	(revision 7083)
@@ -14,4 +14,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 import javax.swing.ButtonGroup;
@@ -35,5 +36,4 @@
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.tools.GBC;
-import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -192,5 +192,5 @@
                 if (sEditor.getValue() == 1) {
                     String data = sEditor.getData();
-                    if (!Utils.equal(sSetting.getValue(), data)) {
+                    if (!Objects.equals(sSetting.getValue(), data)) {
                         pe.setValue(new StringSetting(data));
                         ok = true;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 7083)
@@ -12,4 +12,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.TreeSet;
 
@@ -214,5 +215,5 @@
         private boolean insertNewDefaults(List<SourceEntry> list) {
             boolean changed = false;
-            
+
             boolean addedMapcssStyle = false; // Migration code can be removed ~ Nov. 2014
 
@@ -226,5 +227,5 @@
                     @Override
                     public boolean evaluate(SourceEntry se) {
-                        return Utils.equal(def.url, se.url);
+                        return Objects.equals(def.url, se.url);
                     }
                 });
@@ -234,5 +235,5 @@
                     changed = true;
                     /* Migration code can be removed ~ Nov. 2014 */
-                    if (Utils.equal(def.url, "resource://styles/standard/elemstyles.mapcss")) {
+                    if ("resource://styles/standard/elemstyles.mapcss".equals(def.url)) {
                         addedMapcssStyle = true;
                     }
@@ -257,5 +258,5 @@
                         @Override
                         public boolean evaluate(SourceEntry se) {
-                            return Utils.equal(se.url, "resource://styles/standard/elemstyles.xml");
+                            return "resource://styles/standard/elemstyles.xml".equals(se.url);
                         }
                     });
@@ -266,5 +267,5 @@
                 }
             }
-            
+
             return changed;
         }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java	(revision 7083)
@@ -9,4 +9,5 @@
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
+import java.util.Objects;
 
 import javax.swing.BorderFactory;
@@ -18,5 +19,4 @@
 
 import org.openstreetmap.josm.tools.CheckParameterUtil;
-import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -45,5 +45,5 @@
 
     protected void feedbackInvalid(String msg) {
-        if (valid == null || valid || !Utils.equal(msg, this.msg)) {
+        if (valid == null || valid || !Objects.equals(msg, this.msg)) {
             // only provide feedback if the validity has changed. This avoids
             // unnecessary UI updates.
@@ -61,5 +61,5 @@
 
     protected void feedbackValid(String msg) {
-        if (valid == null || !valid || !Utils.equal(msg, this.msg)) {
+        if (valid == null || !valid || !Objects.equals(msg, this.msg)) {
             // only provide feedback if the validity has changed. This avoids
             // unnecessary UI updates.
Index: trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java	(revision 7083)
@@ -5,4 +5,5 @@
 import java.net.Authenticator.RequestorType;
 import java.net.PasswordAuthentication;
+import java.util.Objects;
 
 import org.openstreetmap.josm.data.oauth.OAuthToken;
@@ -10,5 +11,4 @@
 import org.openstreetmap.josm.io.OsmApi;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
-import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -72,5 +72,5 @@
         this.delegate = delegate;
     }
-    
+
     /**
      * Returns type of credentials agent backing this credentials manager.
@@ -106,5 +106,5 @@
         if (username == null) return null;
         username = username.trim();
-        return Utils.equal(username, "") ? null : username;
+        return username.isEmpty() ? null : username;
     }
 
@@ -116,5 +116,5 @@
     @Override
     public void store(RequestorType requestorType, String host, PasswordAuthentication credentials) throws CredentialsAgentException {
-        if (requestorType == RequestorType.SERVER && Utils.equal(OsmApi.getOsmApi().getHost(), host)) {
+        if (requestorType == RequestorType.SERVER && Objects.equals(OsmApi.getOsmApi().getHost(), host)) {
             String username = credentials.getUserName();
             if(username != null && !username.trim().isEmpty()) {
Index: trunk/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialAgent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialAgent.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialAgent.java	(revision 7083)
@@ -5,6 +5,7 @@
 
 import java.awt.Component;
+import java.net.Authenticator.RequestorType;
 import java.net.PasswordAuthentication;
-import java.net.Authenticator.RequestorType;
+import java.util.Objects;
 
 import javax.swing.text.html.HTMLEditorKit;
@@ -15,5 +16,4 @@
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
 import org.openstreetmap.josm.io.OsmApi;
-import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -35,5 +35,5 @@
         switch(requestorType) {
         case SERVER:
-            if (Utils.equal(OsmApi.getOsmApi().getHost(), host)) {
+            if (Objects.equals(OsmApi.getOsmApi().getHost(), host)) {
                 user = Main.pref.get("osm-server.username", null);
                 password = Main.pref.get("osm-server.password", null);
@@ -67,5 +67,5 @@
         switch(requestorType) {
         case SERVER:
-            if (Utils.equal(OsmApi.getOsmApi().getHost(), host)) {
+            if (Objects.equals(OsmApi.getOsmApi().getHost(), host)) {
                 Main.pref.put("osm-server.username", credentials.getUserName());
                 if (credentials.getPassword() == null) {
Index: trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 7083)
@@ -1,6 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.io.imagery;
-
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import java.io.IOException;
@@ -9,4 +7,5 @@
 import java.util.Arrays;
 import java.util.List;
+import java.util.Objects;
 import java.util.Stack;
 
@@ -176,5 +175,5 @@
             }
             states.push(newState);
-            if (newState == State.UNKNOWN && equal(atts.getValue("mandatory"), "true")) {
+            if (newState == State.UNKNOWN && "true".equals(atts.getValue("mandatory"))) {
                 skipEntry = true;
             }
@@ -208,5 +207,5 @@
                     boolean found = false;
                     for (ImageryType type : ImageryType.values()) {
-                        if (equal(accumulator.toString(), type.getTypeString())) {
+                        if (Objects.equals(accumulator.toString(), type.getTypeString())) {
                             entry.setImageryType(type);
                             found = true;
Index: trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 7083)
@@ -3,5 +3,4 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
-import static org.openstreetmap.josm.tools.Utils.equal;
 
 import java.io.BufferedInputStream;
@@ -292,5 +291,5 @@
     private void parseJos(Document doc, ProgressMonitor progressMonitor) throws IllegalDataException {
         Element root = doc.getDocumentElement();
-        if (!equal(root.getTagName(), "josm-session")) {
+        if (!"josm-session".equals(root.getTagName())) {
             error(tr("Unexpected root element ''{0}'' in session file", root.getTagName()));
         }
@@ -355,6 +354,5 @@
             if (node.getNodeType() == Node.ELEMENT_NODE) {
                 Element e = (Element) node;
-                if (equal(e.getTagName(), "layer")) {
-
+                if ("layer".equals(e.getTagName())) {
                     if (!e.hasAttribute("index")) {
                         error(tr("missing mandatory attribute ''index'' for element ''layer''"));
Index: trunk/src/org/openstreetmap/josm/tools/Predicates.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Predicates.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/tools/Predicates.java	(revision 7083)
@@ -1,8 +1,9 @@
 package org.openstreetmap.josm.tools;
 
+import java.util.Collection;
+import java.util.Objects;
+import java.util.regex.Pattern;
+
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
-
-import java.util.Collection;
-import java.util.regex.Pattern;
 
 /**
@@ -33,5 +34,5 @@
             @Override
             public boolean evaluate(T obj) {
-                return Utils.equal(obj, ref);
+                return Objects.equals(obj, ref);
             }
         };
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 7082)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 7083)
@@ -174,13 +174,4 @@
     }
 
-    /**
-     * for convenience: test whether 2 objects are either both null or a.equals(b)
-     */
-    public static <T> boolean equal(T a, T b) {
-        if (a == b)
-            return true;
-        return (a != null && a.equals(b));
-    }
-
     public static void ensure(boolean condition, String message, Object...data) {
         if (!condition)
