RFC: Adding ConcurrentModificationException for HashMap.computeIfAbsent(), and JDK-8071667
Doug Lea
dl at cs.oswego.edu
Thu Feb 5 00:45:33 UTC 2015
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.)
-Doug
More information about the core-libs-dev
mailing list