8154231: Simplify access to System properties from JDK code

Reviewed-by: rriggs, chegar, weijun
This commit is contained in:
Claes Redestad 2016-04-21 13:39:53 +02:00
parent b909478b3d
commit 2b5207e74d
78 changed files with 391 additions and 453 deletions

View file

@ -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;