The documentation for java.util.HashMap clearly states: "If multiple threads access a hash map concurrently, and at least one of the threads modifies the map structurally, it must be synchronized externally."
However, consider the use case where you using the map as a cache to reduce immutable object creation, where only computeIfAbsent is called on the HashMap (no removal/eviction). And the only thing you care about is that computeIfAbsent return a valid object; you don't care if computeIfAbsent occasionally produces extra objects or overwrites an existing entry.
What is the worst that could happen? In my casual testing there are no negative consequences. (I'd use ConcurrentHashMap, but it is relatively slow in this use case.)
if absentpart can be unpredictable (i.e., your cached object may be computed multiple times). Not too sure what the behavior is when multiple keys are involved (it would surely be worse if concurrent manipulation on different keys led to inconsistencies) - ernest_k