JDK 9 RFR of 8146215: (fs) java/nio/file/Files/probeContentType/Basic.java failed frequently on Solaris-sparc with Unexpected type: text/plain

Brian Burkhalter brian.burkhalter at oracle.com
Wed Aug 3 00:59:39 UTC 2016


I’ve incorporated the previous comments:

http://cr.openjdk.java.net/~bpb/8146215/webrev.03/

With respect to the previous version of the patch the class FileNameMapFileTypeDetector class has been removed and the references to it removed from the Linux and Solaris FileTypeDetectors. The functionality of FileNameMapFileTypeDetector is now moved to be a fallback for all platforms directly in AbstractFileTypeDetector.probeContentType() in the event that all detected FileTypeDetectors return null for the content type.

URLConnection.getFileNameMap() is modified to create and retain a single static reference to an instance of an anonymous FileNameMap class instead of creating a new instance on each invocation. The method is also no longer synchronized instead relying on an internal lock in a hopefully correct manner.

Thanks,

Brian


More information about the nio-dev mailing list