Closed motlin closed 7 months ago
additional things to do from the javadoc:
1) If the remapping function itself throws an (unchecked) exception, the exception is rethrown, and the current mapping is left unchanged. 2) In particular, all implementations of subinterface ConcurrentMap must document whether the remapping function is applied once atomically only if the value is not present.
for (2), we have to document that all these are possible:
Also I think the javadoc language for (2) is broken. "applied once atomically only if the value is not present. " is not sensible: if it's not present, it shouldn't have been applied, no?
for (1), we can't leave the map in an intermediate state. I don't see any such case, but a test or two would be good.
Just thinking this over:
oldValue
(i.e.newValue == oldValue
) a lot of processing can be skipped.