< prev index next >
src/java.base/share/classes/sun/security/ssl/Debug.java
Print this page
rev 14210 : 8154231: Simplify access to System properties from JDK code
Reviewed-by: rriggs
@@ -24,11 +24,10 @@
*/
package sun.security.ssl;
import java.io.PrintStream;
-import java.security.AccessController;
import java.util.Locale;
import sun.security.util.HexDumpEncoder;
import java.nio.ByteBuffer;
@@ -44,12 +43,11 @@
private String prefix;
private static String args;
static {
- args = java.security.AccessController.doPrivileged(
- new GetPropertyAction("javax.net.debug", ""));
+ args = GetPropertyAction.getProperty("javax.net.debug", "");
args = args.toLowerCase(Locale.ENGLISH);
if (args.equals("help")) {
Help();
}
}
@@ -182,12 +180,11 @@
*
* Note use of doPrivileged(). Do make accessible to applications.
*/
static boolean getBooleanProperty(String propName, boolean defaultValue) {
// if set, require value of either true or false
- String b = AccessController.doPrivileged(
- new GetPropertyAction(propName));
+ String b = GetPropertyAction.getProperty(propName);
if (b == null) {
return defaultValue;
} else if (b.equalsIgnoreCase("false")) {
return false;
} else if (b.equalsIgnoreCase("true")) {
< prev index next >