-
Bug
-
Resolution: Fixed
-
P4
-
8, 9
-
b17
-
Not verified
A DESCRIPTION OF THE PROBLEM :
The documentation says:
'The function is applied with the current value as its first argument, and the given update as the second argument."
This is not true, since the function may actually be called with two "update values".
E.g. if two values, u1 and u2, are added, then according to that description, the result could be f(f(identity, u1), u2) or it could be f(f(identity, u2), u1), given that order of applying values are not guaranteed.
However, it's been observed that result was calculated as f(identity, f(u1, u2)), which is in contradiction with the statement made in the documentation.
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAccumulator.html
The documentation says:
'The function is applied with the current value as its first argument, and the given update as the second argument."
This is not true, since the function may actually be called with two "update values".
E.g. if two values, u1 and u2, are added, then according to that description, the result could be f(f(identity, u1), u2) or it could be f(f(identity, u2), u1), given that order of applying values are not guaranteed.
However, it's been observed that result was calculated as f(identity, f(u1, u2)), which is in contradiction with the statement made in the documentation.
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAccumulator.html
- csr for
-
JDK-8181380 Misleading description of arguments to accumulator function called by LongAccumulator
-
- Closed
-