< 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,34 **** */ 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; --- 24,33 ----
*** 44,55 **** private String prefix; private static String args; static { ! args = java.security.AccessController.doPrivileged( ! new GetPropertyAction("javax.net.debug", "")); args = args.toLowerCase(Locale.ENGLISH); if (args.equals("help")) { Help(); } } --- 43,53 ---- private String prefix; private static String args; static { ! args = GetPropertyAction.getProperty("javax.net.debug", ""); args = args.toLowerCase(Locale.ENGLISH); if (args.equals("help")) { Help(); } }
*** 182,193 **** * * 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)); if (b == null) { return defaultValue; } else if (b.equalsIgnoreCase("false")) { return false; } else if (b.equalsIgnoreCase("true")) { --- 180,190 ---- * * 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 = GetPropertyAction.getProperty(propName); if (b == null) { return defaultValue; } else if (b.equalsIgnoreCase("false")) { return false; } else if (b.equalsIgnoreCase("true")) {
< prev index next >