< prev index next >
src/java.base/unix/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java
Print this page
rev 14210 : 8154231: Simplify access to System properties from JDK code
Reviewed-by: rriggs
*** 29,39 ****
import java.nio.ByteBuffer;
import java.net.*;
import java.util.concurrent.*;
import java.io.IOException;
import java.io.FileDescriptor;
- import java.security.AccessController;
import sun.net.NetHooks;
import sun.security.action.GetPropertyAction;
/**
* Unix implementation of AsynchronousSocketChannel
--- 29,38 ----
*** 45,56 ****
private static final NativeDispatcher nd = new SocketDispatcher();
private static enum OpType { CONNECT, READ, WRITE };
private static final boolean disableSynchronousRead;
static {
! String propValue = AccessController.doPrivileged(
! new GetPropertyAction("sun.nio.ch.disableSynchronousRead", "false"));
disableSynchronousRead = (propValue.length() == 0) ?
true : Boolean.valueOf(propValue);
}
private final Port port;
--- 44,55 ----
private static final NativeDispatcher nd = new SocketDispatcher();
private static enum OpType { CONNECT, READ, WRITE };
private static final boolean disableSynchronousRead;
static {
! String propValue = GetPropertyAction
! .getProperty("sun.nio.ch.disableSynchronousRead", "false");
disableSynchronousRead = (propValue.length() == 0) ?
true : Boolean.valueOf(propValue);
}
private final Port port;
< prev index next >