Fix command line config path issue

When the command line config path is used and the ocnfig file has no entry for configfile a null pointer exception occurrs
This commit is contained in:
bwssystems
2020-11-19 12:09:13 -06:00
parent f9e9f16756
commit add9617a07
2 changed files with 3 additions and 2 deletions

3
.gitignore vendored
View File

@@ -23,4 +23,5 @@ sftp-config\.json
# dependencies
/node_modules
package-lock.json
package-lock.json
.project

View File

@@ -250,10 +250,10 @@ public class BridgeSettings extends BackupHandler {
return;
try {
theBridgeSettings = new Gson().fromJson(jsonContent, BridgeSettingsDescriptor.class);
theBridgeSettings.setConfigfile(aPath.toString());
} catch (Exception e) {
log.warn("Issue loading values from file: " + aPath.toUri().toString() + ", Gson convert failed.");
theBridgeSettings = new BridgeSettingsDescriptor();
theBridgeSettings.setConfigfile(aPath.toString());
}
}