Bug or not bug? Files.newInputStream() on a Path which is a directory does not fail until you read from it
Brian Burkhalter
brian.burkhalter at oracle.com
Sat Dec 6 00:01:38 UTC 2014
On Dec 5, 2014, at 3:58 PM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> On Dec 5, 2014, at 3:53 PM, Francis Galiegue <fgaliegue at gmail.com> wrote:
>
>> Agreed on that; also, it'd be really nice to have an exception such as
>> IsDirectoryException or the like for such cases.
>
> Or “NotFileException” if the methods in question are supported for files only.
Actually this suggestion is not good as “file” subsumes regular files, directories, and links.
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20141205/dcd2a634/attachment.html>
More information about the nio-dev
mailing list