< prev index next >

src/java.base/share/classes/sun/security/x509/X509CRLImpl.java

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

@@ -368,11 +368,11 @@
         }
         if (signedCRL == null) {
             throw new CRLException("Uninitialized CRL");
         }
         Signature   sigVerf = null;
-        if (sigProvider.length() == 0) {
+        if (sigProvider.isEmpty()) {
             sigVerf = Signature.getInstance(sigAlgId.getName());
         } else {
             sigVerf = Signature.getInstance(sigAlgId.getName(), sigProvider);
         }
 

@@ -493,11 +493,11 @@
         NoSuchProviderException, SignatureException {
         try {
             if (readOnly)
                 throw new CRLException("cannot over-write existing CRL");
             Signature sigEngine = null;
-            if ((provider == null) || (provider.length() == 0))
+            if (provider == null || provider.isEmpty())
                 sigEngine = Signature.getInstance(algorithm);
             else
                 sigEngine = Signature.getInstance(algorithm, provider);
 
             sigEngine.initSign(key);
< prev index next >