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

Alan Bateman Alan.Bateman at oracle.com
Tue Aug 2 14:36:03 UTC 2016



On 01/08/2016 15:11, Brian Burkhalter wrote:
>
> Modified accordingly: 
> http://cr.openjdk.java.net/~bpb/8146215/webrev.02/ 
> <http://cr.openjdk.java.net/%7Ebpb/8146215/webrev.02/>
There is a still a volatile write to initialize fileNameMap to null at 
L38, this can be removed.

>
>> Alternatively just call URLConnection.getFileNameMap() each time.
>
> URLConnection.getFileNameMap() is synchronized and returns a new 
> anonymous class instance at each invocation so this does not look to 
> be a good idea.
I meant that we clean-up URLConnection.getFileNameMap().


>
>> As regards ordering what what you have it okay. I assume it will be 
>> rare to set the property content.types.user.table and so the JDK's 
>> content-types.properties will be a fallback.
>
> Question is whether this should be a fallback on OS X and Windows as well.
>
On Windows then it's configured via the UI (backed by the registry) so 
probably not needed. On OSX then then can the mappings that the UTI 
based detector uses be configured?

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


More information about the nio-dev mailing list