diff a/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java b/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java
@@ -46,10 +46,11 @@
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.NoSuchElementException;
+import java.util.Objects;
 import java.util.Set;
 import java.util.Spliterator;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.concurrent.locks.LockSupport;
 import java.util.concurrent.locks.ReentrantLock;
@@ -663,12 +664,12 @@
         public final boolean equals(Object o) {
             Object k, v, u; Map.Entry<?,?> e;
             return ((o instanceof Map.Entry) &&
                     (k = (e = (Map.Entry<?,?>)o).getKey()) != null &&
                     (v = e.getValue()) != null &&
-                    (k == key || k.equals(key)) &&
-                    (v == (u = val) || v.equals(u)));
+                    (Objects.equals(k, key)) &&
+                    v.equals(val));
         }
 
         /**
          * Virtualized support for map.get(); overridden in subclasses.
          */
@@ -676,11 +677,11 @@
             Node<K,V> e = this;
             if (k != null) {
                 do {
                     K ek;
                     if (e.hash == h &&
-                        ((ek = e.key) == k || (ek != null && k.equals(ek))))
+                        (ek = e.key) != null && Objects.equals(k, ek))
                         return e;
                 } while ((e = e.next) != null);
             }
             return null;
         }
@@ -947,18 +948,18 @@
         Node<K,V>[] tab; Node<K,V> e, p; int n, eh; K ek;
         int h = spread(key.hashCode());
         if ((tab = table) != null && (n = tab.length) > 0 &&
             (e = tabAt(tab, (n - 1) & h)) != null) {
             if ((eh = e.hash) == h) {
-                if ((ek = e.key) == key || (ek != null && key.equals(ek)))
+                if ((ek = e.key) != null && Objects.equals(key, ek))
                     return e.val;
             }
             else if (eh < 0)
                 return (p = e.find(h, key)) != null ? p.val : null;
             while ((e = e.next) != null) {
                 if (e.hash == h &&
-                    ((ek = e.key) == key || (ek != null && key.equals(ek))))
+                    ((ek = e.key) != null && Objects.equals(key, ek)))
                     return e.val;
             }
         }
         return null;
     }
@@ -992,11 +993,11 @@
         Node<K,V>[] t;
         if ((t = table) != null) {
             Traverser<K,V> it = new Traverser<K,V>(t, t.length, 0, t.length);
             for (Node<K,V> p; (p = it.advance()) != null; ) {
                 V v;
-                if ((v = p.val) == value || (v != null && value.equals(v)))
+                if ((v = p.val) != null && Objects.equals(value, v))
                     return true;
             }
         }
         return false;
     }
@@ -1033,11 +1034,11 @@
             }
             else if ((fh = f.hash) == MOVED)
                 tab = helpTransfer(tab, f);
             else if (onlyIfAbsent // check first node without acquiring lock
                      && fh == hash
-                     && ((fk = f.key) == key || (fk != null && key.equals(fk)))
+                     && (fk = f.key) != null && Objects.equals(key, fk)
                      && (fv = f.val) != null)
                 return fv;
             else {
                 V oldVal = null;
                 synchronized (f) {
@@ -1045,12 +1046,11 @@
                         if (fh >= 0) {
                             binCount = 1;
                             for (Node<K,V> e = f;; ++binCount) {
                                 K ek;
                                 if (e.hash == hash &&
-                                    ((ek = e.key) == key ||
-                                     (ek != null && key.equals(ek)))) {
+                                    (ek = e.key) != null && Objects.equals(key, ek)) {
                                     oldVal = e.val;
                                     if (!onlyIfAbsent)
                                         e.val = value;
                                     break;
                                 }
@@ -1138,15 +1138,14 @@
                         if (fh >= 0) {
                             validated = true;
                             for (Node<K,V> e = f, pred = null;;) {
                                 K ek;
                                 if (e.hash == hash &&
-                                    ((ek = e.key) == key ||
-                                     (ek != null && key.equals(ek)))) {
+                                    ((ek = e.key) != null && Objects.equals(key, ek))) {
                                     V ev = e.val;
-                                    if (cv == null || cv == ev ||
-                                        (ev != null && cv.equals(ev))) {
+                                    if (cv == null ||
+                                        (ev != null && Objects.equals(cv, ev))) {
                                         oldVal = ev;
                                         if (value != null)
                                             e.val = value;
                                         else if (pred != null)
                                             pred.next = e.next;
@@ -1165,12 +1164,12 @@
                             TreeBin<K,V> t = (TreeBin<K,V>)f;
                             TreeNode<K,V> r, p;
                             if ((r = t.root) != null &&
                                 (p = r.findTreeNode(hash, key, null)) != null) {
                                 V pv = p.val;
-                                if (cv == null || cv == pv ||
-                                    (pv != null && cv.equals(pv))) {
+                                if (cv == null ||
+                                    (pv != null && Objects.equals(cv, pv))) {
                                     oldVal = pv;
                                     if (value != null)
                                         p.val = value;
                                     else if (t.removeTreeNode(p))
                                         setTabAt(tab, i, untreeify(t.first));
@@ -1370,19 +1369,19 @@
             int f = (t = table) == null ? 0 : t.length;
             Traverser<K,V> it = new Traverser<K,V>(t, f, 0, f);
             for (Node<K,V> p; (p = it.advance()) != null; ) {
                 V val = p.val;
                 Object v = m.get(p.key);
-                if (v == null || (v != val && !v.equals(val)))
+                if (!Objects.equals(val, v))
                     return false;
             }
             for (Map.Entry<?,?> e : m.entrySet()) {
                 Object mk, mv, v;
                 if ((mk = e.getKey()) == null ||
                     (mv = e.getValue()) == null ||
                     (v = get(mk)) == null ||
-                    (mv != v && !mv.equals(v)))
+                    !Objects.equals(mv, v))
                     return false;
             }
         }
         return true;
     }
@@ -1502,12 +1501,11 @@
                         int binCount = 0;
                         insertAtFront = true;
                         Node<K,V> q; K qk;
                         for (q = first; q != null; q = q.next) {
                             if (q.hash == h &&
-                                ((qk = q.key) == k ||
-                                 (qk != null && k.equals(qk)))) {
+                                ((qk = q.key) != null && Objects.equals(k, qk))) {
                                 insertAtFront = false;
                                 break;
                             }
                             ++binCount;
                         }
@@ -1732,11 +1730,11 @@
                     break;
             }
             else if ((fh = f.hash) == MOVED)
                 tab = helpTransfer(tab, f);
             else if (fh == h    // check first node without acquiring lock
-                     && ((fk = f.key) == key || (fk != null && key.equals(fk)))
+                     && ((fk = f.key) != null && Objects.equals(key, fk))
                      && (fv = f.val) != null)
                 return fv;
             else {
                 boolean added = false;
                 synchronized (f) {
@@ -1837,12 +1835,11 @@
                         if (fh >= 0) {
                             binCount = 1;
                             for (Node<K,V> e = f, pred = null;; ++binCount) {
                                 K ek;
                                 if (e.hash == h &&
-                                    ((ek = e.key) == key ||
-                                     (ek != null && key.equals(ek)))) {
+                                    ((ek = e.key) != null && Objects.equals(key, ek))) {
                                     val = remappingFunction.apply(key, e.val);
                                     if (val != null)
                                         e.val = val;
                                     else {
                                         delta = -1;
@@ -1949,12 +1946,11 @@
                         if (fh >= 0) {
                             binCount = 1;
                             for (Node<K,V> e = f, pred = null;; ++binCount) {
                                 K ek;
                                 if (e.hash == h &&
-                                    ((ek = e.key) == key ||
-                                     (ek != null && key.equals(ek)))) {
+                                    ((ek = e.key) != null && Objects.equals(key, ek))) {
                                     val = remappingFunction.apply(key, e.val);
                                     if (val != null)
                                         e.val = val;
                                     else {
                                         delta = -1;
@@ -2065,12 +2061,11 @@
                         if (fh >= 0) {
                             binCount = 1;
                             for (Node<K,V> e = f, pred = null;; ++binCount) {
                                 K ek;
                                 if (e.hash == h &&
-                                    ((ek = e.key) == key ||
-                                     (ek != null && key.equals(ek)))) {
+                                    ((ek = e.key) != null && Objects.equals(key, ek))) {
                                     val = remappingFunction.apply(e.val, value);
                                     if (val != null)
                                         e.val = val;
                                     else {
                                         delta = -1;
@@ -2259,11 +2254,11 @@
                     (e = tabAt(tab, (n - 1) & h)) == null)
                     return null;
                 for (;;) {
                     int eh; K ek;
                     if ((eh = e.hash) == h &&
-                        ((ek = e.key) == k || (ek != null && k.equals(ek))))
+                        ((ek = e.key) != null && Objects.equals(k, ek)))
                         return e;
                     if (eh < 0) {
                         if (e instanceof ForwardingNode) {
                             tab = ((ForwardingNode<K,V>)e).nextTable;
                             continue outer;
@@ -2754,11 +2749,11 @@
                     TreeNode<K,V> pl = p.left, pr = p.right;
                     if ((ph = p.hash) > h)
                         p = pl;
                     else if (ph < h)
                         p = pr;
-                    else if ((pk = p.key) == k || (pk != null && k.equals(pk)))
+                    else if ((pk = p.key) != null && Objects.equals(k, pk))
                         return p;
                     else if (pl == null)
                         p = pr;
                     else if (pr == null)
                         p = pl;
@@ -2905,11 +2900,11 @@
             if (k != null) {
                 for (Node<K,V> e = first; e != null; ) {
                     int s; K ek;
                     if (((s = lockState) & (WAITER|WRITER)) != 0) {
                         if (e.hash == h &&
-                            ((ek = e.key) == k || (ek != null && k.equals(ek))))
+                            ((ek = e.key) != null && Objects.equals(k, ek)))
                             return e;
                         e = e.next;
                     }
                     else if (U.compareAndSetInt(this, LOCKSTATE, s,
                                                  s + READER)) {
@@ -2945,11 +2940,11 @@
                 }
                 else if ((ph = p.hash) > h)
                     dir = -1;
                 else if (ph < h)
                     dir = 1;
-                else if ((pk = p.key) == k || (pk != null && k.equals(pk)))
+                else if ((pk = p.key) != null && Objects.equals(k, pk))
                     return p;
                 else if ((kc == null &&
                           (kc = comparableClassFor(k)) == null) ||
                          (dir = compareComparables(kc, k, pk)) == 0) {
                     if (!searched) {
@@ -3544,12 +3539,12 @@
         public boolean equals(Object o) {
             Object k, v; Map.Entry<?,?> e;
             return ((o instanceof Map.Entry) &&
                     (k = (e = (Map.Entry<?,?>)o).getKey()) != null &&
                     (v = e.getValue()) != null &&
-                    (k == key || k.equals(key)) &&
-                    (v == val || v.equals(val)));
+                    Objects.equals(k, key) &&
+                    Objects.equals(v, val));
         }
 
         /**
          * Sets our entry's value and writes through to the map. The
          * value to return is somewhat arbitrary here. Since we do not
