private static Properties loadPropertiesFromConfigFile()

in src/main/java/com/amazonaws/secretsmanager/util/Config.java [67:79]


    private static Properties loadPropertiesFromConfigFile(String resourceName) {
        Properties newConfig = new Properties(System.getProperties());

        try (InputStream configFile = ClassLoader.getSystemResourceAsStream(resourceName)) {
            if (configFile != null) {
                newConfig.load(configFile);
                configFile.close();
            }
        } catch (IOException e) {
            throw new PropertyException("An error occured when loading the property file, " + CONFIG_FILE_NAME, e);
        }
        return newConfig;
    }