< prev index next >

src/java.base/share/classes/sun/security/util/Debug.java

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

@@ -27,10 +27,11 @@
 
 import java.math.BigInteger;
 import java.util.regex.Pattern;
 import java.util.regex.Matcher;
 import java.util.Locale;
+import sun.security.action.GetPropertyAction;
 
 /**
  * A utility class for debuging.
  *
  * @author Roland Schemers

@@ -40,17 +41,14 @@
     private String prefix;
 
     private static String args;
 
     static {
-        args = java.security.AccessController.doPrivileged
-                (new sun.security.action.GetPropertyAction
-                ("java.security.debug"));
-
-        String args2 = java.security.AccessController.doPrivileged
-                (new sun.security.action.GetPropertyAction
-                ("java.security.auth.debug"));
+        args = GetPropertyAction.getProperty("java.security.debug");
+
+        String args2 =
+                GetPropertyAction.getProperty("java.security.auth.debug");
 
         if (args == null) {
             args = args2;
         } else {
             if (args2 != null)
< prev index next >