mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8154231: Simplify access to System properties from JDK code
Reviewed-by: rriggs, chegar, weijun
This commit is contained in:
parent
b909478b3d
commit
2b5207e74d
78 changed files with 391 additions and 453 deletions
|
@ -27,9 +27,9 @@ package sun.nio.ch;
|
|||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.IOException;
|
||||
import java.security.PrivilegedAction;
|
||||
import jdk.internal.misc.SharedSecrets;
|
||||
import jdk.internal.misc.JavaIOFileDescriptorAccess;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
|
||||
class FileDispatcherImpl extends FileDispatcher {
|
||||
|
||||
|
@ -119,13 +119,8 @@ class FileDispatcherImpl extends FileDispatcher {
|
|||
}
|
||||
|
||||
static boolean isFastFileTransferRequested() {
|
||||
String fileTransferProp = java.security.AccessController.doPrivileged(
|
||||
new PrivilegedAction<String>() {
|
||||
@Override
|
||||
public String run() {
|
||||
return System.getProperty("jdk.nio.enableFastFileTransfer");
|
||||
}
|
||||
});
|
||||
String fileTransferProp = GetPropertyAction
|
||||
.getProperty("jdk.nio.enableFastFileTransfer");
|
||||
boolean enable;
|
||||
if ("".equals(fileTransferProp)) {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue