RFR: 8157437 Typos in Stream JavaDoc
Paul Sandoz
paul.sandoz at oracle.com
Fri May 20 11:47:09 UTC 2016
Hi,
I introduced some typos in my haste to push the fix for JDK-8130023 (API java.util.stream: explicitly specify guaranteed execution of the pipeline) (I am reminded of the phrase “Go slow and you’ll get there faster”.)
So to slow my self down i did a search for spelling errors in all of the stream package and found a few in internal comments.
Paul.
diff -r 871cb8793270 src/java.base/share/classes/java/util/stream/AbstractTask.java
--- a/src/java.base/share/classes/java/util/stream/AbstractTask.java Fri May 20 11:47:39 2016 +0200
+++ b/src/java.base/share/classes/java/util/stream/AbstractTask.java Fri May 20 13:37:14 2016 +0200
@@ -106,7 +106,7 @@
protected Spliterator<P_IN> spliterator;
/** Target leaf size, common to all tasks in a computation */
- protected long targetSize; // may be laziliy initialized
+ protected long targetSize; // may be lazily initialized
/**
* The left child.
diff -r 871cb8793270 src/java.base/share/classes/java/util/stream/DoubleStream.java
--- a/src/java.base/share/classes/java/util/stream/DoubleStream.java Fri May 20 11:47:39 2016 +0200
+++ b/src/java.base/share/classes/java/util/stream/DoubleStream.java Fri May 20 13:37:14 2016 +0200
@@ -211,7 +211,7 @@
* .sum();
* }</pre>
*
- * <p>In cases where stream implementation is able to optimize away the
+ * <p>In cases where the stream implementation is able to optimize away the
* production of some or all the elements (such as with short-circuiting
* operations like {@code findFirst}, or in the example described in
* {@link #count}), the action will not be invoked for those elements.
diff -r 871cb8793270 src/java.base/share/classes/java/util/stream/IntStream.java
--- a/src/java.base/share/classes/java/util/stream/IntStream.java Fri May 20 11:47:39 2016 +0200
+++ b/src/java.base/share/classes/java/util/stream/IntStream.java Fri May 20 13:37:14 2016 +0200
@@ -209,7 +209,7 @@
* .sum();
* }</pre>
*
- * <p>In cases where stream implementation is able to optimize away the
+ * <p>In cases where the stream implementation is able to optimize away the
* production of some or all the elements (such as with short-circuiting
* operations like {@code findFirst}, or in the example described in
* {@link #count}), the action will not be invoked for those elements.
diff -r 871cb8793270 src/java.base/share/classes/java/util/stream/LongStream.java
--- a/src/java.base/share/classes/java/util/stream/LongStream.java Fri May 20 11:47:39 2016 +0200
+++ b/src/java.base/share/classes/java/util/stream/LongStream.java Fri May 20 13:37:14 2016 +0200
@@ -209,7 +209,7 @@
* .sum();
* }</pre>
*
- * <p>In cases where stream implementation is able to optimize away the
+ * <p>In cases where the stream implementation is able to optimize away the
* production of some or all the elements (such as with short-circuiting
* operations like {@code findFirst}, or in the example described in
* {@link #count}), the action will not be invoked for those elements.
diff -r 871cb8793270 src/java.base/share/classes/java/util/stream/Stream.java
--- a/src/java.base/share/classes/java/util/stream/Stream.java Fri May 20 11:47:39 2016 +0200
+++ b/src/java.base/share/classes/java/util/stream/Stream.java Fri May 20 13:37:14 2016 +0200
@@ -93,7 +93,7 @@
* example of such an optimization, see the API note documented on the
* {@link #count} operation. For more detail, see the
* <a href="package-summary.html#SideEffects">side-effects</a> section of the
- * strean package documentation.)
+ * stream package documentation.)
*
* <p>Collections and streams, while bearing some superficial similarities,
* have different goals. Collections are primarily concerned with the efficient
@@ -428,7 +428,7 @@
* .collect(Collectors.toList());
* }</pre>
*
- * <p>In cases where stream implementation is able to optimize away the
+ * <p>In cases where the stream implementation is able to optimize away the
* production of some or all the elements (such as with short-circuiting
* operations like {@code findFirst}, or in the example described in
* {@link #count}), the action will not be invoked for those elements.
diff -r 871cb8793270 src/java.base/share/classes/java/util/stream/StreamSpliterators.java
--- a/src/java.base/share/classes/java/util/stream/StreamSpliterators.java Fri May 20 11:47:39 2016 +0200
+++ b/src/java.base/share/classes/java/util/stream/StreamSpliterators.java Fri May 20 13:37:14 2016 +0200
@@ -28,7 +28,6 @@
import java.util.Objects;
import java.util.Spliterator;
import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.BooleanSupplier;
import java.util.function.Consumer;
@@ -104,7 +103,7 @@
T_BUFFER buffer;
/**
- * True if full traversal has occurred (with possible cancelation).
+ * True if full traversal has occurred (with possible cancellation).
* If doing a partial traversal, there may be still elements in buffer.
*/
boolean finished;
More information about the core-libs-dev
mailing list