mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +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,8 +29,8 @@ import java.nio.file.*;
|
|||
import java.nio.file.attribute.*;
|
||||
import java.nio.file.spi.FileTypeDetector;
|
||||
import java.io.IOException;
|
||||
import java.security.AccessController;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
|
||||
import jdk.internal.util.StaticProperty;
|
||||
|
||||
/**
|
||||
* Linux implementation of FileSystemProvider
|
||||
|
@ -102,7 +102,7 @@ public class LinuxFileSystemProvider extends UnixFileSystemProvider {
|
|||
|
||||
@Override
|
||||
FileTypeDetector getFileTypeDetector() {
|
||||
String userHome = GetPropertyAction.privilegedGetProperty("user.home");
|
||||
String userHome = StaticProperty.userHome();
|
||||
Path userMimeTypes = Path.of(userHome, ".mime.types");
|
||||
Path etcMimeTypes = Path.of("/etc/mime.types");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue