Hi Please review this small documentation fix to the averaging functions on java.util.stream.Collectors.
Paul. diff -r 29059b8ecc7f src/java.base/share/classes/java/util/stream/Collectors.java --- a/src/java.base/share/classes/java/util/stream/Collectors.java Tue Feb 21 05:58:23 2017 -0800 +++ b/src/java.base/share/classes/java/util/stream/Collectors.java Wed Feb 22 12:59:06 2017 -0800 @@ -720,8 +720,9 @@ * the result is 0. * * @param <T> the type of the input elements - * @param mapper a function extracting the property to be summed - * @return a {@code Collector} that produces the sum of a derived property + * @param mapper a function extracting the property to be averaged + * @return a {@code Collector} that produces the arithmetic mean of a + * derived property */ public static <T> Collector<T, ?, Double> averagingInt(ToIntFunction<? super T> mapper) { @@ -738,8 +739,9 @@ * the result is 0. * * @param <T> the type of the input elements - * @param mapper a function extracting the property to be summed - * @return a {@code Collector} that produces the sum of a derived property + * @param mapper a function extracting the property to be averaged + * @return a {@code Collector} that produces the arithmetic mean of a + * derived property */ public static <T> Collector<T, ?, Double> averagingLong(ToLongFunction<? super T> mapper) { @@ -769,8 +771,9 @@ * 2<sup>53</sup>, leading to additional numerical errors. * * @param <T> the type of the input elements - * @param mapper a function extracting the property to be summed - * @return a {@code Collector} that produces the sum of a derived property + * @param mapper a function extracting the property to be averaged + * @return a {@code Collector} that produces the arithmetic mean of a + * derived property */ public static <T> Collector<T, ?, Double> averagingDouble(ToDoubleFunction<? super T> mapper) {