mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
25.04.2019 066e0c88e70d8843d916fd113f2b5dce1bdc7a58
Handles now corrupted json config files...
1 files modified
8 ■■■■■ changed files
borgbutler-core/src/main/java/de/micromata/borgbutler/config/ConfigurationHandler.java 8 ●●●●● patch | view | raw | blame | history
borgbutler-core/src/main/java/de/micromata/borgbutler/config/ConfigurationHandler.java
@@ -48,6 +48,14 @@
                }
            }
            this.configuration = JsonUtils.fromJson(configClazz, json);
            if (this.configuration == null) {
                try {
                    this.configuration = configClazz.getDeclaredConstructor().newInstance();
                } catch (Exception ex) {
                    log.error("Internal error: Can't instantiate object of type '" + configClazz + "': " + ex.getMessage(), ex);
                    return;
                }
            }
            if (this.configuration._getRepoConfigs() != null) {
                for (BorgRepoConfig repoConfig : this.configuration._getRepoConfigs()) {
                    if (StringUtils.isBlank(repoConfig.getDisplayName())) {