Skip to content

Commit

Permalink
Use old config on migration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bytekeeper committed Jan 26, 2018
1 parent 355f6cf commit 66af665
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/org/stt/config/ConfigServiceFacade.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public void start() throws Exception {
jsonConfigService.start();
if (jsonConfigService.isNewConfig()) {
yamlConfigService.start();
jsonConfigService.setConfig(yamlConfigService.getConfig());
} else {
skipYaml = true;
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/stt/config/JsonConfigService.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public ConfigRoot getConfig() {
return config;
}

public void setConfig(ConfigRoot config) {
this.config = config;
}

@Override
public void start() throws Exception {
boolean mkdirs = sttJson.getParentFile().mkdirs();
Expand Down

0 comments on commit 66af665

Please sign in to comment.