private SamlPluginSettings reload()

in saml-authentication-server/src/main/java/jetbrains/buildServer/auth/saml/plugin/SamlPluginSettingsStorageImpl.java [65:84]


    private SamlPluginSettings reload() throws IOException {
        if (!this.configPath.toFile().exists() || this.configPath.toFile().length() == 0) {
            save(new SamlPluginSettings());
        }

        try {
            SamlPluginSettings result = this.objectMapper.readValue(this.configPath.toFile(), SamlPluginSettings.class);

            // some clean-up of additional certs
            if (result.getAdditionalCerts().stream().allMatch(StringUtils::isEmpty)) {
                result.getAdditionalCerts().clear();
            }

            cachedSamlPluginSettings = result;
            return result;
        } catch (RuntimeException ex) {
            Loggers.SERVER.error("Cannot load SAML plugin settings", ex);
            throw ex;
        }
    }