RFR: 8032190 It's unclear that flatMap will ensure each stream will be closed.

Alan Bateman Alan.Bateman at oracle.com
Mon Jan 20 22:16:08 UTC 2014

On 20/01/2014 10:38, Paul Sandoz wrote:
> Hi,
> For the flatMap operations of streams we forgot to say what it does with the mapped streams after it has processed them i.e. closes them, which is important for I/O backed streams (e.g. map Path ->  Stream<String>  for lines of a file). The following patch fixes that omission in the docs:
> https://bugs.openjdk.java.net/browse/JDK-8032190
> I think this should be backported to 8.
> Paul.
This is important to add. A minor comment is to just link "closed" to 
BaseStream#close rather than adding "see ...".

  "If a mapper stream is null then an empty stream is used" seems okay 
to me.


More information about the core-libs-dev mailing list