8378354: Faulty assertion in checkInvariants method of ConcurrentHashMap

Reviewed-by: alanb, vklang
This commit is contained in:
cdw200806 2026-02-24 10:50:59 +00:00 committed by Viktor Klang
parent 32a619715e
commit b99d1f0a17

View File

@ -3310,7 +3310,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
return false;
if (tr != null && (tr.parent != t || tr.hash < t.hash))
return false;
if (t.red && tl != null && tl.red && tr != null && tr.red)
if (t.red && (tl != null && tl.red || tr != null && tr.red))
return false;
if (tl != null && !checkInvariants(tl))
return false;