8043327: Collectors.toMap studentToGPA example uses Functions.identity()
8043328: Typo in documentation of package java.util.stream

Reviewed-by: alanb, lancea
diff --git a/jdk/src/share/classes/java/util/stream/Collectors.java b/jdk/src/share/classes/java/util/stream/Collectors.java
index 70d7f28..6f68322 100644
--- a/jdk/src/share/classes/java/util/stream/Collectors.java
+++ b/jdk/src/share/classes/java/util/stream/Collectors.java
@@ -1220,7 +1220,7 @@
      * students to their grade point average:
      * <pre>{@code
      *     Map<Student, Double> studentToGPA
-     *         students.stream().collect(toMap(Functions.identity(),
+     *         students.stream().collect(toMap(Function.identity(),
      *                                         student -> computeGPA(student)));
      * }</pre>
      * And the following produces a {@code Map} mapping a unique identifier to
@@ -1228,7 +1228,7 @@
      * <pre>{@code
      *     Map<String, Student> studentIdToStudent
      *         students.stream().collect(toMap(Student::getId,
-     *                                         Functions.identity());
+     *                                         Function.identity());
      * }</pre>
      *
      * @implNote
@@ -1390,7 +1390,7 @@
      * students to their grade point average:
      * <pre>{@code
      *     Map<Student, Double> studentToGPA
-     *         students.stream().collect(toMap(Functions.identity(),
+     *         students.stream().collect(toMap(Function.identity(),
      *                                         student -> computeGPA(student)));
      * }</pre>
      * And the following produces a {@code Map} mapping a unique identifier to
@@ -1398,7 +1398,7 @@
      * <pre>{@code
      *     Map<String, Student> studentIdToStudent
      *         students.stream().collect(toConcurrentMap(Student::getId,
-     *                                                   Functions.identity());
+     *                                                   Function.identity());
      * }</pre>
      *
      * <p>This is a {@link Collector.Characteristics#CONCURRENT concurrent} and
diff --git a/jdk/src/share/classes/java/util/stream/package-info.java b/jdk/src/share/classes/java/util/stream/package-info.java
index 016c86d..2353870 100644
--- a/jdk/src/share/classes/java/util/stream/package-info.java
+++ b/jdk/src/share/classes/java/util/stream/package-info.java
@@ -468,7 +468,7 @@
  * <pre>{@code
  *     int sumOfWeights = widgets.stream()
  *                               .reduce(0,
- *                                       (sum, b) -> sum + b.getWeight())
+ *                                       (sum, b) -> sum + b.getWeight(),
  *                                       Integer::sum);
  * }</pre>
  * though the explicit map-reduce form is more readable and therefore should