equal
deleted
inserted
replaced
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); |