< prev index next >

src/java.base/share/classes/sun/security/ssl/ClientHello.java

Print this page
rev 51919 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: dfuchs, alanb

@@ -491,11 +491,11 @@
                 if ((session != null) &&
                         !ClientHandshakeContext.allowUnsafeServerCertChange) {
                     // It is fine to move on with abbreviate handshake if
                     // endpoint identification is enabled.
                     String identityAlg = chc.sslConfig.identificationProtocol;
-                    if ((identityAlg == null || identityAlg.length() == 0)) {
+                    if (identityAlg == null || identityAlg.isEmpty()) {
                         if (isEmsAvailable) {
                             if (!session.useExtendedMasterSecret) {
                                 // perform full handshake instead
                                 session = null;
                             }   // Otherwise, use extended master secret.
< prev index next >