-
Bug
-
Resolution: Fixed
-
P4
-
8
-
b22
-
generic
-
generic
-
Verified
A DESCRIPTION OF THE PROBLEM :
There is a typo at the end of this section of the package overview (right parenthesis instead of comma).
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
int sumOfWeights = widgets.stream()
.reduce(0,
(sum, b) -> sum + b.getWeight(),
Integer::sum);
ACTUAL -
int sumOfWeights = widgets.stream()
.reduce(0,
(sum, b) -> sum + b.getWeight())
Integer::sum);
URL OF FAULTY DOCUMENTATION :
http://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html#Reduction
There is a typo at the end of this section of the package overview (right parenthesis instead of comma).
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
int sumOfWeights = widgets.stream()
.reduce(0,
(sum, b) -> sum + b.getWeight(),
Integer::sum);
ACTUAL -
int sumOfWeights = widgets.stream()
.reduce(0,
(sum, b) -> sum + b.getWeight())
Integer::sum);
URL OF FAULTY DOCUMENTATION :
http://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html#Reduction
- duplicates
-
JDK-8270342 Document Three argument reduction method in stream api - comma missing
- Closed