Review Request: JDK-7142921,(fs) Files.probeContentType reports a MIME type of "text/plain" on Ubuntu 11.04

Alan Bateman Alan.Bateman at
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, 
> <>. 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.

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the nio-dev mailing list