In the course of #35788, it turns out that ConcurrentReferenceHashMap does not provide dedicated implementations for the callback-based methods in ConcurrentMap yet: computeIfAbsent, computeIfPresent, compute, merge. This is very likely the reason for the race condition observed in #35788 where the calling code relies on uniqueness of the computed value from a computeIfAbsent call.

Since such dedicated implementations of the callback-based methods may also improve concurrent correctness for other scenarios and are necessary for consistent null support in ConcurrentReferenceHashMap, this qualifies as a bug to be fixed in the 6.2.x line still.

Comment From: github-actions[bot]

Fixed via 12dd75815867def5c6d29be656ae67a0bf493235