jdk/src/java.base/share/classes/sun/security/ssl/Debug.java
changeset 37781 71ed5645f17c
parent 37593 824750ada3d6
child 41820 3d8c88d00c9f
equal deleted inserted replaced
37780:06f3783b338f 37781:71ed5645f17c
    43     private String prefix;
    43     private String prefix;
    44 
    44 
    45     private static String args;
    45     private static String args;
    46 
    46 
    47     static {
    47     static {
    48         args = GetPropertyAction.getProperty("javax.net.debug", "");
    48         args = GetPropertyAction.privilegedGetProperty("javax.net.debug", "");
    49         args = args.toLowerCase(Locale.ENGLISH);
    49         args = args.toLowerCase(Locale.ENGLISH);
    50         if (args.equals("help")) {
    50         if (args.equals("help")) {
    51             Help();
    51             Help();
    52         }
    52         }
    53     }
    53     }
   176     }
   176     }
   177 
   177 
   178     /**
   178     /**
   179      * Return the value of the boolean System property propName.
   179      * Return the value of the boolean System property propName.
   180      *
   180      *
   181      * Note use of doPrivileged(). Do make accessible to applications.
   181      * Note use of privileged action. Do NOT make accessible to applications.
   182      */
   182      */
   183     static boolean getBooleanProperty(String propName, boolean defaultValue) {
   183     static boolean getBooleanProperty(String propName, boolean defaultValue) {
   184         // if set, require value of either true or false
   184         // if set, require value of either true or false
   185         String b = GetPropertyAction.getProperty(propName);
   185         String b = GetPropertyAction.privilegedGetProperty(propName);
   186         if (b == null) {
   186         if (b == null) {
   187             return defaultValue;
   187             return defaultValue;
   188         } else if (b.equalsIgnoreCase("false")) {
   188         } else if (b.equalsIgnoreCase("false")) {
   189             return false;
   189             return false;
   190         } else if (b.equalsIgnoreCase("true")) {
   190         } else if (b.equalsIgnoreCase("true")) {