RFR 8072773 (fs) Files.lines needs a better splitting implementation for stream source

Paul Sandoz paul.sandoz at oracle.com
Thu Jun 4 20:06:34 UTC 2015


On Jun 3, 2015, at 6:18 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> As this code path is only for the default provider case then there's a good chance that it will be a FileChannelImpl, in which case you can call its unmap method (directly or via a shared secret). It is possible to interpose on the default provider so you can't be guaranteed it is a FileChannelImpl of course.
> 

Not yet done. I would like to revisit this as a separate issue if i may.


> In passing, you might consider moving  ByteBufferLinesSpliterator to its own source file because Files is getting very big.
> 

Done.

I am going to revisit the set of support charsets at another time. For the moment i have limited to a subset of standard charsets.

Also the file lines test tickled a bug in the stream test library, it was not closing streams, which becomes an issue when ~15000 tests are executed leaving the process with no more file descriptors:

http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8072773-File-lines/webrev/

Paul.



More information about the core-libs-dev mailing list