Minor tweaks to BOPConfig.java
This commit is contained in:
parent
42da4d197c
commit
1892ce1959
|
@ -115,7 +115,7 @@ public class BOPConfig
|
|||
public void parse(String jsonString)
|
||||
{
|
||||
this.members = new HashMap<String, JsonElement>();
|
||||
if (jsonString != null) {return;}
|
||||
if (jsonString == null) {return;}
|
||||
JsonElement rootElement = null;
|
||||
try
|
||||
{
|
||||
|
@ -543,6 +543,11 @@ public class BOPConfig
|
|||
public static class ConfigFileObj extends ConfigObjBase
|
||||
{
|
||||
public ConfigFileObj(File configFile)
|
||||
{
|
||||
this(configFile, false);
|
||||
}
|
||||
|
||||
public ConfigFileObj(File configFile, boolean warnIfMissing)
|
||||
{
|
||||
this.prefix = configFile.getAbsolutePath();
|
||||
String jsonString = null;
|
||||
|
@ -554,6 +559,11 @@ public class BOPConfig
|
|||
} catch (IOException e) {
|
||||
this.addMessage("Error reading config file "+e.getMessage());
|
||||
}
|
||||
} else {
|
||||
if (warnIfMissing)
|
||||
{
|
||||
this.addMessage("File missing");
|
||||
}
|
||||
}
|
||||
this.parse(jsonString);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue