RFC: Adding ConcurrentModificationException for HashMap.computeIfAbsent(), and JDK-8071667
Paul Sandoz
paul.sandoz at oracle.com
Thu Feb 5 08:37:26 UTC 2015
On Feb 5, 2015, at 1:45 AM, Doug Lea <dl at cs.oswego.edu> wrote:
> On 02/04/2015 05:01 AM, Paul Sandoz wrote:
>
>> So i propose:
>>
>> - the functions should be side-effect free.
>>
>> ...
>> - concurrent map implementations should, on a best-effort basis, detect non-termination situations and fail with ISE.
>>
>
> We did this as part of changes to better detect recursive computIfAbsent in
> https://bugs.openjdk.java.net/browse/JDK-8062841
> The best-effort is pretty good and catches most usage errors along
> these lines. (In principle it cannot catch all possible errors though.)
>
Ah, thanks for the reminder, i forgot that was committed to 166:
http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java?r1=1.258&r2=1.259&sortby=date
Paul.
More information about the core-libs-dev
mailing list