< prev index next >
src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java
Print this page
rev 14210 : 8154231: Simplify access to System properties from JDK code
Reviewed-by: rriggs
*** 39,49 ****
import java.net.Proxy;
import java.security.Principal;
import java.security.cert.*;
import java.util.StringTokenizer;
import java.util.Vector;
- import java.security.AccessController;
import javax.security.auth.x500.X500Principal;
import javax.net.ssl.*;
import sun.net.www.http.HttpClient;
--- 39,48 ----
*** 137,148 ****
private String [] getCipherSuites() {
//
// If ciphers are assigned, sort them into an array.
//
String ciphers [];
! String cipherString = AccessController.doPrivileged(
! new GetPropertyAction("https.cipherSuites"));
if (cipherString == null || "".equals(cipherString)) {
ciphers = null;
} else {
StringTokenizer tokenizer;
--- 136,147 ----
private String [] getCipherSuites() {
//
// If ciphers are assigned, sort them into an array.
//
String ciphers [];
! String cipherString =
! GetPropertyAction.getProperty("https.cipherSuites");
if (cipherString == null || "".equals(cipherString)) {
ciphers = null;
} else {
StringTokenizer tokenizer;
*** 161,172 ****
private String [] getProtocols() {
//
// If protocols are assigned, sort them into an array.
//
String protocols [];
! String protocolString = AccessController.doPrivileged(
! new GetPropertyAction("https.protocols"));
if (protocolString == null || "".equals(protocolString)) {
protocols = null;
} else {
StringTokenizer tokenizer;
--- 160,171 ----
private String [] getProtocols() {
//
// If protocols are assigned, sort them into an array.
//
String protocols [];
! String protocolString =
! GetPropertyAction.getProperty("https.protocols");
if (protocolString == null || "".equals(protocolString)) {
protocols = null;
} else {
StringTokenizer tokenizer;
*** 182,193 ****
}
return protocols;
}
private String getUserAgent() {
! String userAgent = java.security.AccessController.doPrivileged(
! new sun.security.action.GetPropertyAction("https.agent"));
if (userAgent == null || userAgent.length() == 0) {
userAgent = "JSSE";
}
return userAgent;
}
--- 181,191 ----
}
return protocols;
}
private String getUserAgent() {
! String userAgent = GetPropertyAction.getProperty("https.agent");
if (userAgent == null || userAgent.length() == 0) {
userAgent = "JSSE";
}
return userAgent;
}
< prev index next >