< prev index next >

src/java.base/unix/classes/sun/net/sdp/SdpProvider.java

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

*** 32,42 **** import java.util.*; import java.io.File; import java.io.FileDescriptor; import java.io.IOException; import java.io.PrintStream; - import java.security.AccessController; import sun.net.sdp.SdpSupport; import sun.security.action.GetPropertyAction; /** --- 32,41 ----
*** 55,66 **** // logging for debug purposes private PrintStream log; public SdpProvider() { // if this property is not defined then there is nothing to do. ! String file = AccessController.doPrivileged( ! new GetPropertyAction("com.sun.sdp.conf")); if (file == null) { this.enabled = false; this.rules = null; return; } --- 54,64 ---- // logging for debug purposes private PrintStream log; public SdpProvider() { // if this property is not defined then there is nothing to do. ! String file = GetPropertyAction.getProperty("com.sun.sdp.conf"); if (file == null) { this.enabled = false; this.rules = null; return; }
*** 75,86 **** } } // check if debugging is enabled PrintStream out = null; ! String logfile = AccessController.doPrivileged( ! new GetPropertyAction("com.sun.sdp.debug")); if (logfile != null) { out = System.out; if (logfile.length() > 0) { try { out = new PrintStream(logfile); --- 73,83 ---- } } // check if debugging is enabled PrintStream out = null; ! String logfile = GetPropertyAction.getProperty("com.sun.sdp.debug"); if (logfile != null) { out = System.out; if (logfile.length() > 0) { try { out = new PrintStream(logfile);
< prev index next >