mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +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
|
@ -29,6 +29,7 @@ import java.nio.file.*;
|
|||
import java.nio.file.attribute.*;
|
||||
import java.nio.file.spi.FileTypeDetector;
|
||||
import java.io.IOException;
|
||||
import jdk.internal.util.StaticProperty;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
|
||||
/**
|
||||
|
@ -84,8 +85,7 @@ public class SolarisFileSystemProvider extends UnixFileSystemProvider {
|
|||
|
||||
@Override
|
||||
FileTypeDetector getFileTypeDetector() {
|
||||
Path userMimeTypes = Path.of(
|
||||
GetPropertyAction.privilegedGetProperty("user.home"), ".mime.types");
|
||||
Path userMimeTypes = Path.of(StaticProperty.userHome(), ".mime.types");
|
||||
Path etcMimeTypes = Path.of("/etc/mime.types");
|
||||
|
||||
return chain(new MimeTypesFileTypeDetector(userMimeTypes),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue