mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8259816: Typo in java.util.stream package description
Reviewed-by: iris, lancea, naoto
This commit is contained in:
parent
0eed2c3312
commit
eb9236853c
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -346,7 +346,7 @@
|
|||
* <pre>{@code
|
||||
* List<String> results =
|
||||
* stream.filter(s -> pattern.matcher(s).matches())
|
||||
* .collect(Collectors.toList()); // No side-effects!
|
||||
* .toList(); // No side-effects!
|
||||
* }</pre>
|
||||
*
|
||||
* <h3><a id="Ordering">Ordering</a></h3>
|
||||
|
@ -436,7 +436,7 @@
|
|||
* can operate on subsets of the data in parallel, and then combine the
|
||||
* intermediate results to get the final correct answer. (Even if the language
|
||||
* had a "parallel for-each" construct, the mutative accumulation approach would
|
||||
* still required the developer to provide
|
||||
* still require the developer to provide
|
||||
* thread-safe updates to the shared accumulating variable {@code sum}, and
|
||||
* the required synchronization would then likely eliminate any performance gain from
|
||||
* parallelism.) Using {@code reduce()} instead removes all of the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue