JDK-8129632 : (fs) Files.probeContentType returns null on Mac OS X
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2015-06-23
  • Updated: 2016-08-24
  • Resolved: 2015-06-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b72Fixed
Related Reports
Relates :  
Relates :  
Description
The content type probe mechanism depends on the existence of user.home/.mime.types which does not in general exist on Mac OS X unless expressly created by the user. Hence the return value "contentType" of

Path path;
String contentType = Files.probeContentType(path);

will be null.