Review Request: JDK-7142921,(fs) Files.probeContentType reports a MIME type of "text/plain" on Ubuntu 11.04
Alan Bateman
Alan.Bateman at oracle.com
Sat Dec 1 08:17:49 PST 2012
On 30/11/2012 16:28, Dan Xu wrote:
> Thanks for your comments. Here is the updated patch,
> http://cr.openjdk.java.net/~dxu/7142921/webrev.03/
> <http://cr.openjdk.java.net/%7Edxu/7142921/webrev.03/>. Please review it.
>
> -Dan
Thanks for the fixing the lazy loading to loadMimeTypes. Minor comment
is that you don't really need "done".
I don't think L108-111 is needed as Files.readAllLines will fail the
file can't be found. You will need to do this in a doPrivileged block as
otherwise it will fail if there is a security manager. This also means
you don't need to catch SecurityException.
The test update is missing in this webrev, I don't know if that is
intentional or not. I did a quick check and it looks like we aren't
testing Files.probeContentType with a security manager and I think it
would be good to add such a test.
-Alan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20121201/e7022138/attachment.html
More information about the nio-dev
mailing list