--- a/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystemProvider.java Mon Dec 03 11:07:20 2012 -0500
+++ b/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystemProvider.java Tue Dec 04 14:07:30 2012 +0000
@@ -29,6 +29,8 @@
import java.nio.file.attribute.*;
import java.nio.file.spi.FileTypeDetector;
import java.io.IOException;
+import java.security.AccessController;
+import sun.security.action.GetPropertyAction;
/**
* Solaris implementation of FileSystemProvider
@@ -83,6 +85,12 @@
@Override
FileTypeDetector getFileTypeDetector() {
- return new GnomeFileTypeDetector();
+ Path userMimeTypes = Paths.get(AccessController.doPrivileged(
+ new GetPropertyAction("user.home")), ".mime.types");
+ Path etcMimeTypes = Paths.get("/etc/mime.types");
+
+ return chain(new GnomeFileTypeDetector(),
+ new MimeTypesFileTypeDetector(userMimeTypes),
+ new MimeTypesFileTypeDetector(etcMimeTypes));
}
}