public KeystoreWrapper build() throws EsHadoopSecurityException, IOException { if (StringUtils.hasText(path)) { try { keystoreFile = IOUtils.open(path); if (keystoreFile == null) { throw new EsHadoopIllegalArgumentException(String.format("Could not locate [%s] on classpath", path)); } } catch (Exception e) { throw new EsHadoopIllegalArgumentException(String.format("Expected to find keystore file at [%s] but " + "was unable to. Make sure that it is available on the classpath, or if not, that you have " + "specified a valid file URI.", path)); } } if (!StringUtils.hasText(type)) { type = PKCS12; } if (!StringUtils.hasText(password)) { password = DEFAULT_PASS; } return new KeystoreWrapper(keystoreFile, type, password); } }
public KeystoreWrapper build() throws EsHadoopSecurityException, IOException { if (StringUtils.hasText(path)) { try { keystoreFile = IOUtils.open(path); if (keystoreFile == null) { throw new EsHadoopIllegalArgumentException(String.format("Could not locate [%s] on classpath", path)); } } catch (Exception e) { throw new EsHadoopIllegalArgumentException(String.format("Expected to find keystore file at [%s] but " + "was unable to. Make sure that it is available on the classpath, or if not, that you have " + "specified a valid file URI.", path)); } } if (!StringUtils.hasText(type)) { type = PKCS12; } if (!StringUtils.hasText(password)) { password = DEFAULT_PASS; } return new KeystoreWrapper(keystoreFile, type, password); } }
public KeystoreWrapper build() throws EsHadoopSecurityException, IOException { if (StringUtils.hasText(path)) { try { keystoreFile = IOUtils.open(path); if (keystoreFile == null) { throw new EsHadoopIllegalArgumentException(String.format("Could not locate [%s] on classpath", path)); } } catch (Exception e) { throw new EsHadoopIllegalArgumentException(String.format("Expected to find keystore file at [%s] but " + "was unable to. Make sure that it is available on the classpath, or if not, that you have " + "specified a valid file URI.", path)); } } if (!StringUtils.hasText(type)) { type = PKCS12; } if (!StringUtils.hasText(password)) { password = DEFAULT_PASS; } return new KeystoreWrapper(keystoreFile, type, password); } }
public KeystoreWrapper build() throws EsHadoopSecurityException, IOException { if (StringUtils.hasText(path)) { try { keystoreFile = IOUtils.open(path); if (keystoreFile == null) { throw new EsHadoopIllegalArgumentException(String.format("Could not locate [%s] on classpath", path)); } } catch (Exception e) { throw new EsHadoopIllegalArgumentException(String.format("Expected to find keystore file at [%s] but " + "was unable to. Make sure that it is available on the classpath, or if not, that you have " + "specified a valid file URI.", path)); } } if (!StringUtils.hasText(type)) { type = PKCS12; } if (!StringUtils.hasText(password)) { password = DEFAULT_PASS; } return new KeystoreWrapper(keystoreFile, type, password); } }