< prev index next >

src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java

Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD

@@ -153,11 +153,11 @@
      */
     public static final TrustManagerFactory getInstance(String algorithm,
                                                  String provider)
         throws NoSuchAlgorithmException, NoSuchProviderException
     {
-        if (provider == null || provider.length() == 0)
+        if (provider == null || provider.isEmpty())
             throw new IllegalArgumentException("missing provider");
         Object[] objs = SSLSecurity.getImpl(algorithm, "TrustManagerFactory",
                                             provider);
         return new TrustManagerFactory((TrustManagerFactorySpi)objs[0],
             (Provider)objs[1], algorithm);
< prev index next >