src/java.base/share/classes/java/security/KeyStore.java
changeset 53018 8bf9268df0e2
parent 52996 2457d862a646
child 58242 94bb65cb37d3
equal deleted inserted replaced
53017:e10a1f7aaa13 53018:8bf9268df0e2
   911      */
   911      */
   912     public static KeyStore getInstance(String type, String provider)
   912     public static KeyStore getInstance(String type, String provider)
   913         throws KeyStoreException, NoSuchProviderException
   913         throws KeyStoreException, NoSuchProviderException
   914     {
   914     {
   915         Objects.requireNonNull(type, "null type name");
   915         Objects.requireNonNull(type, "null type name");
   916         if (provider == null || provider.length() == 0)
   916         if (provider == null || provider.isEmpty())
   917             throw new IllegalArgumentException("missing provider");
   917             throw new IllegalArgumentException("missing provider");
   918         try {
   918         try {
   919             Object[] objs = Security.getImpl(type, "KeyStore", provider);
   919             Object[] objs = Security.getImpl(type, "KeyStore", provider);
   920             return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type);
   920             return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type);
   921         } catch (NoSuchAlgorithmException nsae) {
   921         } catch (NoSuchAlgorithmException nsae) {