Hi Daniel,

We should try to call Path::toFile first - whether there is a security
manager or not. In the case where that succeeds, we can use
new FileInputStream(), otherwise, we use Files.newInputStream.

It's unfortunate that new FileInputStream() and Files.newInputStream()
use different sets of exceptions, and that our public signature use
the exception thrown by the former.

Keeping using new FileInputStream() for the case where the Path::toFile
returns a file will ensure that we preserve backward compatibility
with existing code, but the current implementation of create() is
missing the case where there is no security manager and
Path::toFile doesn't throw.

Thanks for the input, I adjusted the changes to FilePublisher accordingly. All relevant tests pass on repeat 50.

Updated webrev: http://cr.openjdk.java.net/~jboes/webrevs/8235459/webrev.03/

Regards,

Julia

Reply via email to