changeset 39060:d39deb27f118

8159821: "PrimitiveStream.iterateFinite" methods contain incorrect code sample Reviewed-by: chegar, briangoetz
author psandoz
date Fri, 17 Jun 2016 10:08:39 -0700
parents a51b9d78b20c
children 0a7abfc4f4b0
files 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
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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>