mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-16 18:24:36 +00:00
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:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -23,4 +23,5 @@ sftp-config\.json
|
|||||||
# dependencies
|
# dependencies
|
||||||
/node_modules
|
/node_modules
|
||||||
|
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
.project
|
||||||
|
|||||||
@@ -250,10 +250,10 @@ public class BridgeSettings extends BackupHandler {
|
|||||||
return;
|
return;
|
||||||
try {
|
try {
|
||||||
theBridgeSettings = new Gson().fromJson(jsonContent, BridgeSettingsDescriptor.class);
|
theBridgeSettings = new Gson().fromJson(jsonContent, BridgeSettingsDescriptor.class);
|
||||||
|
theBridgeSettings.setConfigfile(aPath.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warn("Issue loading values from file: " + aPath.toUri().toString() + ", Gson convert failed.");
|
log.warn("Issue loading values from file: " + aPath.toUri().toString() + ", Gson convert failed.");
|
||||||
theBridgeSettings = new BridgeSettingsDescriptor();
|
theBridgeSettings = new BridgeSettingsDescriptor();
|
||||||
theBridgeSettings.setConfigfile(aPath.toString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user