[concurrency-interest] Bug in ConcurrentHashMap
Fri, 21 Nov 2003 12:59:11 -0500
A better way to do this was to apply the tactics we used in
IdentityHashMap of making EntrySet entries mere forwarders (but still
more efficiently handling the more common keySet and Values
iterators). As is now checked in.
Eric: Is it OK fow us to add your test case to JSR166 tests?
I didn't answer before:
> Which leads me to another comment. It would be useful to have a "putIfPresent"
> method on ConcurrentMap in addition to the putIfAbsent that is already there,
> for the case where you require the entry to already exist when replacing a
Can you give a good use case? I can't think of any.