Bug or not bug? Files.newInputStream() on a Path which is a directory does not fail until you read from it
Francis Galiegue
fgaliegue at gmail.com
Fri Dec 5 23:32:59 UTC 2014
On Sat, Dec 6, 2014 at 12:18 AM, Francis Galiegue <fgaliegue at gmail.com> wrote:
> [...]
>
> From a cursory analysis of the stack trace, it seems to me as the
> implementation is common to both of them, and that the stream is not
> actually opened until the first time it is read, and that open(2)
> returns -EISDIR; hence the error message...
>
Correction: read(2) can also return that. So it seems that either a
stat(2) or an lstat(2) is missing before returning the input stream...
--
Francis Galiegue, fgaliegue at gmail.com, https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/parboiled1/grappa (redde
Caesaris: https://github.com/sirthias)
More information about the nio-dev
mailing list