< 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,34 **** */ 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 */ --- 24,33 ----
*** 58,69 **** /** * Returns the default AsynchronousChannelProvider. */ public static AsynchronousChannelProvider create() { ! String osname = AccessController ! .doPrivileged(new GetPropertyAction("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")) --- 57,67 ---- /** * Returns the default AsynchronousChannelProvider. */ public static AsynchronousChannelProvider create() { ! 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 >