-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8u121
A DESCRIPTION OF THE REQUEST :
The example in the documentation of java.util.concurrent.atomic.LongAdder:
freqs.computeIfAbsent(k -> new LongAdder()).increment();
should be:
freqs.computeIfAbsent(key, k -> new LongAdder()).increment();
JUSTIFICATION :
computeIfAbsent is a newer method that programmers may find confusing. Let's not confuse them more.
The example in the documentation of java.util.concurrent.atomic.LongAdder:
freqs.computeIfAbsent(k -> new LongAdder()).increment();
should be:
freqs.computeIfAbsent(key, k -> new LongAdder()).increment();
JUSTIFICATION :
computeIfAbsent is a newer method that programmers may find confusing. Let's not confuse them more.
- duplicates
-
JDK-8044730 small errors in ConcurrentHashMap and LongAdder docs
-
- Closed
-