changes order of m_properties assignment in Constructors such that the 'assignDefaults' data is NOT overwritten by the incoming values
This commit is contained in:
@@ -43,13 +43,13 @@ public class ClasspathConfig extends IConfig {
|
||||
}
|
||||
Reader configReader = new InputStreamReader(is);
|
||||
ConfigurationParser confParser = new ConfigurationParser();
|
||||
m_properties = confParser.getProperties();
|
||||
assignDefaults();
|
||||
try {
|
||||
confParser.parse(configReader);
|
||||
} catch (ParseException pex) {
|
||||
LOG.warn("An error occurred in parsing configuration, fallback on default configuration", pex);
|
||||
}
|
||||
m_properties = confParser.getProperties();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,13 +34,13 @@ public class FilesystemConfig extends IConfig {
|
||||
|
||||
public FilesystemConfig(File file) {
|
||||
ConfigurationParser confParser = new ConfigurationParser();
|
||||
m_properties = confParser.getProperties();
|
||||
assignDefaults();
|
||||
try {
|
||||
confParser.parse(file);
|
||||
} catch (ParseException pex) {
|
||||
LOG.warn("An error occurred in parsing configuration, fallback on default configuration", pex);
|
||||
}
|
||||
m_properties = confParser.getProperties();
|
||||
}
|
||||
|
||||
public FilesystemConfig() {
|
||||
|
||||
Reference in New Issue
Block a user