8159821: "PrimitiveStream.iterateFinite" methods contain incorrect code sample
authorpsandoz
Fri, 17 Jun 2016 10:08:39 -0700
changeset 39060 d39deb27f118
parent 39059 a51b9d78b20c
child 39061 0a7abfc4f4b0
8159821: "PrimitiveStream.iterateFinite" methods contain incorrect code sample Reviewed-by: chegar, briangoetz
jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java
jdk/src/java.base/share/classes/java/util/stream/IntStream.java
jdk/src/java.base/share/classes/java/util/stream/LongStream.java
--- a/jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java	Sat May 28 13:57:30 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java	Fri Jun 17 10:08:39 2016 -0700
@@ -986,7 +986,7 @@
      * {@code DoubleStream.iterate} should produce the same sequence of
      * elements as produced by the corresponding for-loop:
      * <pre>{@code
-     *     for (double index=seed; predicate.test(index); index = f.apply(index)) {
+     *     for (double index=seed; predicate.test(index); index = f.applyAsDouble(index)) {
      *         ...
      *     }
      * }</pre>
--- a/jdk/src/java.base/share/classes/java/util/stream/IntStream.java	Sat May 28 13:57:30 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/stream/IntStream.java	Fri Jun 17 10:08:39 2016 -0700
@@ -926,7 +926,7 @@
      * {@code IntStream.iterate} should produce the same sequence of elements
      * as produced by the corresponding for-loop:
      * <pre>{@code
-     *     for (int index=seed; predicate.test(index); index = f.apply(index)) {
+     *     for (int index=seed; predicate.test(index); index = f.applyAsInt(index)) {
      *         ...
      *     }
      * }</pre>
--- a/jdk/src/java.base/share/classes/java/util/stream/LongStream.java	Sat May 28 13:57:30 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/stream/LongStream.java	Fri Jun 17 10:08:39 2016 -0700
@@ -916,7 +916,7 @@
      * {@code LongStream.iterate} should produce the same sequence of elements
      * as produced by the corresponding for-loop:
      * <pre>{@code
-     *     for (long index=seed; predicate.test(index); index = f.apply(index)) {
+     *     for (long index=seed; predicate.test(index); index = f.applyAsLong(index)) {
      *         ...
      *     }
      * }</pre>