src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java
changeset 53018 8bf9268df0e2
parent 47216 71c04702a3d5
equal deleted inserted replaced
53017:e10a1f7aaa13 53018:8bf9268df0e2
   153      */
   153      */
   154     public static final TrustManagerFactory getInstance(String algorithm,
   154     public static final TrustManagerFactory getInstance(String algorithm,
   155                                                  String provider)
   155                                                  String provider)
   156         throws NoSuchAlgorithmException, NoSuchProviderException
   156         throws NoSuchAlgorithmException, NoSuchProviderException
   157     {
   157     {
   158         if (provider == null || provider.length() == 0)
   158         if (provider == null || provider.isEmpty())
   159             throw new IllegalArgumentException("missing provider");
   159             throw new IllegalArgumentException("missing provider");
   160         Object[] objs = SSLSecurity.getImpl(algorithm, "TrustManagerFactory",
   160         Object[] objs = SSLSecurity.getImpl(algorithm, "TrustManagerFactory",
   161                                             provider);
   161                                             provider);
   162         return new TrustManagerFactory((TrustManagerFactorySpi)objs[0],
   162         return new TrustManagerFactory((TrustManagerFactorySpi)objs[0],
   163             (Provider)objs[1], algorithm);
   163             (Provider)objs[1], algorithm);