8168841: The JavaDoc of java.util.stream.Collectors method collectingAndThen has incorrect code snippet
authorpsandoz
Tue, 01 Nov 2016 17:29:49 -0700
changeset 41830 12d848e1dd2e
parent 41829 224facf0da6e
child 41831 2dd91b18195b
8168841: The JavaDoc of java.util.stream.Collectors method collectingAndThen has incorrect code snippet Reviewed-by: smarks, lancea, tvaleev
jdk/src/java.base/share/classes/java/util/stream/Collectors.java
--- a/jdk/src/java.base/share/classes/java/util/stream/Collectors.java	Tue Nov 01 17:29:48 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/stream/Collectors.java	Tue Nov 01 17:29:49 2016 -0700
@@ -508,7 +508,7 @@
      * transformation.  For example, one could adapt the {@link #toList()}
      * collector to always produce an immutable list with:
      * <pre>{@code
-     *     List<String> people
+     *     List<String> list
      *         = people.stream().collect(collectingAndThen(toList(), Collections::unmodifiableList));
      * }</pre>
      *