8048689: Clarify documentation on BaseStream.spliterator
Reviewed-by: lancea, chegar
--- a/jdk/src/java.base/share/classes/java/util/stream/BaseStream.java Fri Jan 30 16:13:57 2015 -0500
+++ b/jdk/src/java.base/share/classes/java/util/stream/BaseStream.java Mon Feb 02 14:18:54 2015 +0100
@@ -79,6 +79,14 @@
* <p>This is a <a href="package-summary.html#StreamOps">terminal
* operation</a>.
*
+ * <p>
+ * The returned spliterator should report the set of characteristics derived
+ * from the stream pipeline (namely the characteristics derived from the
+ * stream source spliterator and the intermediate operations).
+ * Implementations may report a sub-set of those characteristics. For
+ * example, it may be too expensive to compute the entire set for some or
+ * all possible stream pipelines.
+ *
* @return the element spliterator for this stream
*/
Spliterator<T> spliterator();