I logged an issue:

https://bugs.openjdk.java.net/browse/JDK-8141608 <https://bugs.openjdk.java.net/browse/JDK-8141608>

Thanks to Remi and Paul for the complete explanation. Concerning JDK-8141608, I lile Peter Levart's comment about making a specific Collector. IMHO it fits better the API design, as in the end we're performing a collection of the stream products into a file. I think it would be also better for readability, as it would preserve the typical pattern of Stream code, where you don't pass the reference to the Stream to a method, but you invoke a terminal operation on the stream itself.

Thanks.

--
Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
http://tidalwave.it/fabrizio/blog - fabrizio.giud...@tidalwave.it

Reply via email to