-
Bug
-
Resolution: Fixed
-
P4
-
8, 9
-
b159
-
generic
-
generic
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8176640 | 10 | Paul Sandoz | P4 | Resolved | Fixed | b03 |
A DESCRIPTION OF THE PROBLEM :
Java Doc for Collectors.averagingInt states the following:
***************
Returns:
a Collector that produces the sum of a derived property
***************
But it returns "arithmetic mean of an integer-valued function applied to the input elements"
The same issue for averagingLong and averagingDouble
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Returns:
a Collector that produces the arithmetic mean of an integer-valued function applied to the input elements
ACTUAL -
Returns:
a Collector that produces the sum of a derived property
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collectors.html#averagingInt-java.util.function.ToIntFunction-
Java Doc for Collectors.averagingInt states the following:
***************
Returns:
a Collector that produces the sum of a derived property
***************
But it returns "arithmetic mean of an integer-valued function applied to the input elements"
The same issue for averagingLong and averagingDouble
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Returns:
a Collector that produces the arithmetic mean of an integer-valued function applied to the input elements
ACTUAL -
Returns:
a Collector that produces the sum of a derived property
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collectors.html#averagingInt-java.util.function.ToIntFunction-
- backported by
-
JDK-8176640 Error in Collectors.averagingXXX Java Doc
-
- Resolved
-