From f2e72b715e2d240414ed07dc3d14c614de1afdbd Mon Sep 17 00:00:00 2001 From: Rodolfo-XDR Date: Fri, 21 Aug 2020 13:00:59 -0500 Subject: [PATCH] Fixed Null Exception --- .../java/com/eu/habbo/core/ConfigurationManager.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eu/habbo/core/ConfigurationManager.java b/src/main/java/com/eu/habbo/core/ConfigurationManager.java index 29e50f73..19b442fe 100644 --- a/src/main/java/com/eu/habbo/core/ConfigurationManager.java +++ b/src/main/java/com/eu/habbo/core/ConfigurationManager.java @@ -23,7 +23,7 @@ public class ConfigurationManager { public boolean loaded = false; public boolean isLoading = false; - public ConfigurationManager(String configurationPath) throws Exception { + public ConfigurationManager(String configurationPath) { this.properties = new Properties(); this.configurationPath = configurationPath; this.reload(); @@ -37,7 +37,12 @@ public class ConfigurationManager { 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) { try {