private static KeyStore createKeyStore(final URL url,String keystoreType,final String password) throws java.lang.Exception {
  assert url != null;
  InputStream is=null;
  try {
    KeyStore keystore=KeyStore.getInstance(keystoreType);
    is=url.openStream();
    keystore.load(is,password != null ? password.toCharArray() : null);
    return keystore;
  }
 catch (  java.lang.Exception e) {
    System.out.println("Could not create keystore " + e);
    throw e;
  }
 finally {
    if (is != null) {
      try {
        is.close();
      }
 catch (      java.lang.Exception e) {
        System.out.println(e);
      }
    }
  }
}

private static KeyStore createKeyStore ( final URL url , String keystoreType , final String password ) throws java . lang . Exception { assert url != null ; InputStream is = null ; try { KeyStore keystore = KeyStore . getInstance ( keystoreType ) ; is = url . openStream ( ) ; keystore . load ( is , password != null ? password . toCharArray ( ) : null ) ; return keystore ; } catch ( java . lang . Exception e ) { System . out . println ( "Could not create keystore " + e ) ; throw e ; } finally { if ( is != null ) { try { is . close ( ) ; } catch ( java . lang . Exception e ) { System . out . println ( e ) ; } } } }
auto generated test method
