< prev index next >

src/java.base/share/classes/sun/net/sdp/SdpSupport.java

Print this page
rev 14210 : 8154231: Simplify access to System properties from JDK code
Reviewed-by: rriggs

*** 29,48 **** import java.io.FileDescriptor; import java.security.AccessController; import jdk.internal.misc.SharedSecrets; import jdk.internal.misc.JavaIOFileDescriptorAccess; /** * This class defines methods for creating SDP sockets or "converting" existing * file descriptors, referencing (unbound) TCP sockets, to SDP. */ public final class SdpSupport { ! private static final String os = AccessController ! .doPrivileged(new sun.security.action.GetPropertyAction("os.name")); private static final boolean isSupported = (os.equals("SunOS") || (os.equals("Linux"))); private static final JavaIOFileDescriptorAccess fdAccess = SharedSecrets.getJavaIOFileDescriptorAccess(); private SdpSupport() { } --- 29,48 ---- import java.io.FileDescriptor; import java.security.AccessController; import jdk.internal.misc.SharedSecrets; import jdk.internal.misc.JavaIOFileDescriptorAccess; + import sun.security.action.GetPropertyAction; /** * This class defines methods for creating SDP sockets or "converting" existing * file descriptors, referencing (unbound) TCP sockets, to SDP. */ public final class SdpSupport { ! private static final String os = GetPropertyAction.getProperty("os.name"); private static final boolean isSupported = (os.equals("SunOS") || (os.equals("Linux"))); private static final JavaIOFileDescriptorAccess fdAccess = SharedSecrets.getJavaIOFileDescriptorAccess(); private SdpSupport() { }
< prev index next >