mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8344078: Remove security manager dependency in java.nio
Reviewed-by: alanb, rriggs
This commit is contained in:
parent
2649406323
commit
922b12f30c
67 changed files with 285 additions and 1480 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2024, 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
|
||||
|
@ -34,8 +34,6 @@ import java.nio.file.attribute.*;
|
|||
import java.nio.channels.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
|
||||
/**
|
||||
* Base implementation of FileStore for Unix/like implementations.
|
||||
|
@ -269,17 +267,11 @@ abstract class UnixFileStore
|
|||
/**
|
||||
* Returns status to indicate if file system supports a given feature
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
FeatureStatus checkIfFeaturePresent(String feature) {
|
||||
if (props == null) {
|
||||
synchronized (loadLock) {
|
||||
if (props == null) {
|
||||
props = AccessController.doPrivileged(
|
||||
new PrivilegedAction<>() {
|
||||
@Override
|
||||
public Properties run() {
|
||||
return loadProperties();
|
||||
}});
|
||||
props = loadProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue