private boolean loadPropertiesFromFile(final String file) { if (CommonUtils.isEmpty(file)) { return false; } FileInputStream fis = null; try { fis = new FileInputStream(file); this.properties.load(fis); return true; } catch (final IOException e) { LOGGER.warn("Unable to load properties for file {}", file, e); return false; } finally { CommonUtils.closeQuietly(fis); } } }
/** * Gets the ssl config to use for HTTPS connections * if one is configured for this filter. * @return Properties that can contains key/trust info for Client Side Certificates */ protected Properties getSSLConfig() { final Properties properties = new Properties(); final String fileName = getString(ConfigurationKeys.SSL_CONFIG_FILE); if (fileName != null) { FileInputStream fis = null; try { fis = new FileInputStream(fileName); properties.load(fis); logger.trace("Loaded {} entries from {}", properties.size(), fileName); } catch (final IOException ioe) { logger.error(ioe.getMessage(), ioe); } finally { CommonUtils.closeQuietly(fis); } } return properties; }
LOGGER.error(e.getMessage(), e); } finally { CommonUtils.closeQuietly(keyStoreIS);
throw new RuntimeException(e); } finally { closeQuietly(in); if (conn != null) { conn.disconnect();