RFR: JDK-8006884: (fs) Add Files.list, lines and find

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu May 2 08:46:18 PDT 2013


On 05/02/2013 08:22 AM, Alan Bateman wrote:
> On 02/05/2013 07:52, Henry Jen wrote:
>> Hi,
>>
>> Please review a couple stream access API proposed for
>> java.nio.file.Files and java.nio.file.DirectoryStream,
>>
>> http://cr.openjdk.java.net/~henryjen/ccc/8006884.0/webrev/
>> http://cr.openjdk.java.net/~henryjen/ccc/8006884.0/specdiff/
>>
>> Cheers,
>> Henry
> One corner case that I meant to ask about is the expected behavior when
> someone attempts to do something on a CloseableStream after it is
> closed? It's not specified so it's not testable but I'm just wondering
> if the Iterator throwing ISE is right or whether this should be an
> UncheckedIOException. As I understand it, an ISE will be thrown if
> someone attempts to use a stream that already been operated on, so this
> really just leaves the uninteresting case where the stream is closed
> before using it.
>
> -Alan.
>

ISE sounds more interesting/helpful to the end user than a catch-all
UncheckedIOException, which just means "sh*t happened."

-- Jon


More information about the lambda-dev mailing list