8168841: The JavaDoc of java.util.stream.Collectors method collectingAndThen has incorrect code snippet
Reviewed-by: smarks, lancea, tvaleev
This commit is contained in:
parent
1730680ce7
commit
530da2782a
@ -508,7 +508,7 @@ public final class Collectors {
|
|||||||
* transformation. For example, one could adapt the {@link #toList()}
|
* transformation. For example, one could adapt the {@link #toList()}
|
||||||
* collector to always produce an immutable list with:
|
* collector to always produce an immutable list with:
|
||||||
* <pre>{@code
|
* <pre>{@code
|
||||||
* List<String> people
|
* List<String> list
|
||||||
* = people.stream().collect(collectingAndThen(toList(), Collections::unmodifiableList));
|
* = people.stream().collect(collectingAndThen(toList(), Collections::unmodifiableList));
|
||||||
* }</pre>
|
* }</pre>
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user