United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-8008345 : (fs) Files.probeContentType returns null on Mac OS X

Details
Type:
Bug
Submit Date:
2013-02-16
Status:
Resolved
Updated Date:
2013-08-29
Project Name:
JDK
Resolved Date:
2013-03-04
Component:
core-libs
OS:
Sub-Component:
java.nio
CPU:
Priority:
P4
Resolution:
Not an Issue
Affected Versions:
8
Fixed Versions:

Related Reports
Duplicate:
Relates:

Sub Tasks

Description
Same issue as described in JDK-7144997 still exist on mac, tested with Mac OS X 10.7.5, jdk8/b77

Affected SQE test:
java_nio/file/TestProbeContentType
                                    

Comments
~/.mime.types file is created for solaris and mac test machines, issue can be closed

$ cat .mime.types 
text/plain                   txt cgi java
text/html                    htm html shtml
                                     
2013-03-04
Basing on the current implementation, ~/.mime.types file is needed in Mac and several Solaris platforms for this SQE test.
                                     
2013-03-01
I tried again on solaris 5.10, 5.11 x86 and sparc, and mac machine:

* There's no ~/.mime.types  on  all machines
* On solaris (sparc & x86), 5.10 & 5.11, run 32bit java, test pass (returns expected type "type=text/html")
* On solaris (sparc & x86), 5.11, run 64bit java (java -d64), test pass
* On solaris (sparc & x86), 5.10, run 64bit java, test fail as it returns null
        -- if create  ~/.mime.types and make sure "text/html                    htm html shtml", then test pass with -d64
* On mac, java is always 64bit java, test fail as it returns null
        -- if create  ~/.mime.types and make sure "text/html                    htm html shtml", then test pass

Test I mentioned above is the one in JDK-7144997
                                     
2013-02-27
Amy - can you see if the file type is listed in ~/.mime.types

If the file doesn't exist then create it and see if that fixes the issue.
                                     
2013-02-16



Hardware and Software, Engineered to Work Together