< prev index next >
src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java
Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD
@@ -141,11 +141,11 @@
//
String ciphers [];
String cipherString =
GetPropertyAction.privilegedGetProperty("https.cipherSuites");
- if (cipherString == null || "".equals(cipherString)) {
+ if (cipherString == null || cipherString.isEmpty()) {
ciphers = null;
} else {
StringTokenizer tokenizer;
Vector<String> v = new Vector<String>();
@@ -165,11 +165,11 @@
//
String protocols [];
String protocolString =
GetPropertyAction.privilegedGetProperty("https.protocols");
- if (protocolString == null || "".equals(protocolString)) {
+ if (protocolString == null || protocolString.isEmpty()) {
protocols = null;
} else {
StringTokenizer tokenizer;
Vector<String> v = new Vector<String>();
@@ -185,11 +185,11 @@
}
private String getUserAgent() {
String userAgent =
GetPropertyAction.privilegedGetProperty("https.agent");
- if (userAgent == null || userAgent.length() == 0) {
+ if (userAgent == null || userAgent.isEmpty()) {
userAgent = "JSSE";
}
return userAgent;
}
< prev index next >