Nevermind, sorry somehow I missed the previous emails in the thread.


On Friday, March 6, 2015 3:57 PM, Ben Manes <ben_ma...@yahoo.com> wrote:
I'd recommend that the exception thrown should be an IllegalStateException. 
This is documented in ConcurrentHashMap's computeIfAbsent as,

* @throws IllegalStateException if the computation detectably
*         attempts a recursive update to this map that would

*         otherwise never complete

The detection logic is in Doug's repository to be merged in for JDK-8062841.

It is also unexpected to have a concurrent data structure throw a 
ConcurrentModificationException, which is why I believe that 
IllegalStateException was chosen for ConcurrentHashMap.

Reply via email to