-
Bug
-
Resolution: Duplicate
-
P4
-
8u66
-
x86_64
-
windows_7
A DESCRIPTION OF THE PROBLEM :
Wrong parameters in document: freqs.computeIfAbsent(k -> new LongAdder())
It should write like this : freqs.computeIfAbsent(key, k -> new LongAdder())
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
For example, to add a count to a ConcurrentHashMap<String,LongAdder> freqs, you can use freqs.computeIfAbsent(key, k -> new LongAdder()).increment();
ACTUAL -
For example, to add a count to a ConcurrentHashMap<String,LongAdder> freqs, you can use freqs.computeIfAbsent(k -> new LongAdder()).increment();
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html
Wrong parameters in document: freqs.computeIfAbsent(k -> new LongAdder())
It should write like this : freqs.computeIfAbsent(key, k -> new LongAdder())
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
For example, to add a count to a ConcurrentHashMap<String,LongAdder> freqs, you can use freqs.computeIfAbsent(key, k -> new LongAdder()).increment();
ACTUAL -
For example, to add a count to a ConcurrentHashMap<String,LongAdder> freqs, you can use freqs.computeIfAbsent(k -> new LongAdder()).increment();
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html
- duplicates
-
JDK-8044730 small errors in ConcurrentHashMap and LongAdder docs
-
- Closed
-