8168841: The JavaDoc of java.util.stream.Collectors method collectingAndThen has incorrect code snippet

Reviewed-by: smarks, lancea, tvaleev
This commit is contained in:
Paul Sandoz 2016-11-01 17:29:49 -07:00
parent 1730680ce7
commit 530da2782a

View File

@ -508,7 +508,7 @@ public final class Collectors {
* 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>
*