8168841 The JavaDoc of java.util.stream.Collectors method collectingAndThen has incorrect code snippet
Tagir F. Valeev
amaembo at gmail.com
Tue Nov 1 13:58:59 UTC 2016
Looks good.
PS> Hi,
PS> Please review the following JavDoc fix for
PS> j.u.stream.Collectors:: collectingAndThen.
PS> Thanks,
PS> Paul.
PS> diff -r 2e076c7e72d6
PS> src/java.base/share/classes/java/util/stream/Collectors.java
PS> ---
PS> a/src/java.base/share/classes/java/util/stream/Collectors.java Mon Oct 31 14:51:23 2016 -0700
PS> +++
PS> b/src/java.base/share/classes/java/util/stream/Collectors.java Mon Oct 31 14:55:16 2016 -0700
PS> @@ -508,7 +508,7 @@
PS> * transformation. For example, one could adapt the {@link #toList()}
PS> * collector to always produce an immutable list with:
PS> * <pre>{@code
PS> - * List<String> people
PS> + * List<String> list
PS> * =
PS> people.stream().collect(collectingAndThen(toList(), Collections::unmodifiableList));
PS> * }</pre>
PS> *
More information about the core-libs-dev
mailing list