Hi Paul,
perhaps you could take the opportunity and also add the missing @since
1.9 tags to all the new dropWhile() / takeWhile() methods (JDK-8071597).
Also in dropWhile() / takeWhile() there is a small typo (I guess) in the
Javadoc:
takeWhile: takes all elements (the result is the same is the input)
dropWhile: the stream match the given predicate then no elements are
dropped (the result is the same is the input)
I guess that should read: (the result is the same as is the input)?
Stefan
2015-07-30 17:08 GMT+02:00 Paul Sandoz paul.san...@oracle.com:
Hi,
Please review this simple fix to the JavaDoc on
j.u.stream.Collector.finisher.
I am also opportunistically fixing some internal comments identified by
Tagir.
Paul.
diff -r 4e3135fac8cc
src/java.base/share/classes/java/util/stream/Collector.java
--- a/src/java.base/share/classes/java/util/stream/Collector.java
Fri Jul 24 15:33:13 2015 -0700
+++ b/src/java.base/share/classes/java/util/stream/Collector.java
Thu Jul 30 17:05:13 2015 +0200
@@ -223,7 +223,7 @@
* Perform the final transformation from the intermediate
accumulation type
* {@code A} to the final result type {@code R}.
*
- * pIf the characteristic {@code IDENTITY_TRANSFORM} is
+ * pIf the characteristic {@code IDENTITY_FINISH} is
* set, this function may be presumed to be an identity transform
with an
* unchecked cast from {@code A} to {@code R}.
*
diff -r 4e3135fac8cc
src/java.base/share/classes/java/util/stream/SliceOps.java
--- a/src/java.base/share/classes/java/util/stream/SliceOps.java
Fri Jul 24 15:33:13 2015 -0700
+++ b/src/java.base/share/classes/java/util/stream/SliceOps.java
Thu Jul 30 17:05:13 2015 +0200
@@ -138,7 +138,7 @@
skip, limit, size);
}
else {
-// @@@ OOMEs will occur for
LongStream.longs().filter(i - true).limit(n)
+// @@@ OOMEs will occur for LongStream.range(0,
Long.MAX_VALUE)).filter(i - true).limit(n)
// regardless of the value of n
// Need to adjust the target size of splitting
for the
// SliceTask from say (size / k) to say min(size
/ k, 1 14)
diff -r 4e3135fac8cc
src/java.base/share/classes/java/util/stream/Streams.java
--- a/src/java.base/share/classes/java/util/stream/Streams.java Fri Jul 24
15:33:13 2015 -0700
+++ b/src/java.base/share/classes/java/util/stream/Streams.java Thu Jul 30
17:05:13 2015 +0200
@@ -156,10 +156,9 @@
* than a balanced tree at the expense of a higher-depth for the
right
* side of the range.
*
- * pThis is optimized for cases such as IntStream.ints() that is
- * implemented as range of 0 to Integer.MAX_VALUE but is likely
to be
- * augmented with a limit operation that limits the number of
elements
- * to a count lower than this threshold.
+ * pThis is optimized for cases such as IntStream.range(0,
Integer.MAX_VALUE)
+ * that is likely to be augmented with a limit operation that
limits the
+ * number of elements to a count lower than this threshold.
*/
private static final int BALANCED_SPLIT_THRESHOLD = 1 24;
@@ -280,10 +279,9 @@
* than a balanced tree at the expense of a higher-depth for the
right
* side of the range.
*
- * pThis is optimized for cases such as LongStream.longs() that
is
- * implemented as range of 0 to Long.MAX_VALUE but is likely to be
- * augmented with a limit operation that limits the number of
elements
- * to a count lower than this threshold.
+ * pThis is optimized for cases such as LongStream.range(0,
Long.MAX_VALUE)
+ * that is likely to be augmented with a limit operation that
limits the
+ * number of elements to a count lower than this threshold.
*/
private static final long BALANCED_SPLIT_THRESHOLD = 1 24;