code: public KeyStore newInstance() throws KeyStoreException, NoSuchProviderException, NoSuchAlgorithmException, CertificateException, IOException {
          if (data == null) {
              throw new IllegalStateException("data property is not set.");
          }
  
          KeyStore ks;
          if (provider == null) {
              ks = KeyStore.getInstance(type);
          } else {
              ks = KeyStore.getInstance(type, provider);
          }
  
          InputStream is = new ByteArrayInputStream(data);
          try {
              ks.load(is, password);
          } finally {
              try {
                  is.close();
              } catch (IOException ignored) {
                  // Do nothing
              }
          }
  
          return ks;
      }
docs: Creates a new {@link KeyStore}. This method will be called
  by the base class when Spring creates a bean using this FactoryBean.
  
  @return a new {@link KeyStore} instance.