mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8066709: Make some JDK system properties read only
Reviewed-by: lancea, sundar, bchristi, weijun, mchung, alanb, mullan
This commit is contained in:
parent
cad47f4a03
commit
4098f2560a
25 changed files with 215 additions and 46 deletions
|
@ -27,6 +27,7 @@ package sun.nio.fs;
|
|||
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.spi.FileTypeDetector;
|
||||
import jdk.internal.util.StaticProperty;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
|
||||
/**
|
||||
|
@ -45,8 +46,7 @@ public class MacOSXFileSystemProvider extends BsdFileSystemProvider {
|
|||
|
||||
@Override
|
||||
FileTypeDetector getFileTypeDetector() {
|
||||
Path userMimeTypes = Path.of(GetPropertyAction
|
||||
.privilegedGetProperty("user.home"), ".mime.types");
|
||||
Path userMimeTypes = Path.of(StaticProperty.userHome(), ".mime.types");
|
||||
|
||||
return chain(new MimeTypesFileTypeDetector(userMimeTypes),
|
||||
new UTIFileTypeDetector());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue