< prev index next >
src/java.base/unix/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java
Print this page
rev 14210 : 8154231: Simplify access to System properties from JDK code
Reviewed-by: rriggs
@@ -24,11 +24,10 @@
*/
package sun.nio.ch;
import java.nio.channels.spi.AsynchronousChannelProvider;
-import java.security.AccessController;
import sun.security.action.GetPropertyAction;
/**
* Creates this platform's default asynchronous channel provider
*/
@@ -58,12 +57,11 @@
/**
* Returns the default AsynchronousChannelProvider.
*/
public static AsynchronousChannelProvider create() {
- String osname = AccessController
- .doPrivileged(new GetPropertyAction("os.name"));
+ String osname = GetPropertyAction.getProperty("os.name");
if (osname.equals("SunOS"))
return createProvider("sun.nio.ch.SolarisAsynchronousChannelProvider");
if (osname.equals("Linux"))
return createProvider("sun.nio.ch.LinuxAsynchronousChannelProvider");
if (osname.contains("OS X"))
< prev index next >