Fixed Null Exception

This commit is contained in:
Rodolfo-XDR 2020-08-21 13:00:59 -05:00
parent c565092656
commit f2e72b715e

View File

@ -23,7 +23,7 @@ public class ConfigurationManager {
public boolean loaded = false; public boolean loaded = false;
public boolean isLoading = false; public boolean isLoading = false;
public ConfigurationManager(String configurationPath) throws Exception { public ConfigurationManager(String configurationPath) {
this.properties = new Properties(); this.properties = new Properties();
this.configurationPath = configurationPath; this.configurationPath = configurationPath;
this.reload(); this.reload();
@ -37,7 +37,12 @@ public class ConfigurationManager {
String envDbHostname = System.getenv("DB_HOSTNAME"); String envDbHostname = System.getenv("DB_HOSTNAME");
boolean useEnvVarsForDbConnection = envDbHostname != null && envDbHostname.length() > 1; boolean useEnvVarsForDbConnection = false;
if(envDbHostname != null)
{
useEnvVarsForDbConnection = envDbHostname.length() > 1;
}
if (!useEnvVarsForDbConnection) { if (!useEnvVarsForDbConnection) {
try { try {