RFR 8057113: (fs) Path should have a method to test the filename extension

Brian Burkhalter brian.burkhalter at oracle.com
Wed Feb 14 18:59:23 UTC 2018

Roger / Alan,

On Feb 14, 2018, at 10:25 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 14/02/2018 18:14, Roger Riggs wrote:
>> Hi Brian,
>> Ok, but perhaps we should (separately) fix probeContentType to use the same rule
>> (last occurrence of dot).

That seems appropriate. To me using the first dot is incorrect. Would need to investigate why it’s that way at least for that one method.

> Files.probeContentType doesn't depend on file extensions so I don't think it needs anything.

I don’t believe that is true. It looks as if the extension is used to key into the appropriate mapping (~/.mime.types, /etc/mime.types, macOS UTI, Windows registry, or the URLConnection database) to find the content type. In any case this probe area is somewhat problematic as we know.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180214/cefbfc95/attachment.html>

More information about the nio-dev mailing list