< prev index next >

src/java.base/linux/classes/sun/nio/fs/LinuxFileSystemProvider.java

Print this page
rev 14210 : 8154231: Simplify access to System properties from JDK code
Reviewed-by: rriggs

*** 100,111 **** } } @Override FileTypeDetector getFileTypeDetector() { ! Path userMimeTypes = Paths.get(AccessController.doPrivileged( ! new GetPropertyAction("user.home")), ".mime.types"); Path etcMimeTypes = Paths.get("/etc/mime.types"); return chain(new GioFileTypeDetector(), new MimeTypesFileTypeDetector(userMimeTypes), new MimeTypesFileTypeDetector(etcMimeTypes), --- 100,111 ---- } } @Override FileTypeDetector getFileTypeDetector() { ! String userHome = GetPropertyAction.getProperty("user.home"); ! Path userMimeTypes = Paths.get(userHome, ".mime.types"); Path etcMimeTypes = Paths.get("/etc/mime.types"); return chain(new GioFileTypeDetector(), new MimeTypesFileTypeDetector(userMimeTypes), new MimeTypesFileTypeDetector(etcMimeTypes),
< prev index next >