JDK 9 RFR of 8150204: (fs) Enhance java/nio/file/Files/probeContentType/Basic.java debugging output
Brian Burkhalter
brian.burkhalter at oracle.com
Fri Feb 19 16:28:05 UTC 2016
On Feb 19, 2016, at 8:17 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> At some point then I think we should look at dropping the GIO based FileTypeDetector but that is something for a different discussion. It's hard to tell if the issue is GNOME or a bad .mime.types on the system.
I think it is a bad [.]mime.types.
> I'm curious about the use of GetPropertyAction as I don't think this test runs with a security manager.
I duped it from elsewhere.
> If it's needed then this might be better:
>
> PrivilegedAction<String> pa = () -> System.getProperty("user.home");
> String value = AccessController.doPrivileged(pa);
>
> and it will avoid needing to add @modules to this test.
>
> It might be cleaner if you can fit this on one line:
>
> try (Stream<String> lines = Files.lines(etcMimeTypes)) {
>
> Also you can use lines.forEach(System.out::println) if you want something shorter.
OK I will make those changes and re-post later.
Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20160219/fb899dd8/attachment.html>
More information about the nio-dev
mailing list