src/java.base/macosx/classes/sun/nio/fs/MacOSXFileSystemProvider.java

Print this page
rev 12244 : 8129632: (fs) Files.probeContentType returns null on Mac OS X
Summary: Append a Uniform Type Identifier-based FileType Detector for Mac OS X
Reviewed-by: XXX

*** 1,7 **** /* ! * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 47,54 **** @Override FileTypeDetector getFileTypeDetector() { Path userMimeTypes = Paths.get(AccessController.doPrivileged( new GetPropertyAction("user.home")), ".mime.types"); ! return new MimeTypesFileTypeDetector(userMimeTypes); } } --- 47,56 ---- @Override FileTypeDetector getFileTypeDetector() { Path userMimeTypes = Paths.get(AccessController.doPrivileged( new GetPropertyAction("user.home")), ".mime.types"); ! ! return chain(new MimeTypesFileTypeDetector(userMimeTypes), ! new UTIFileTypeDetector()); } }