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);
|
Reader configReader = new InputStreamReader(is);
|
||||||
ConfigurationParser confParser = new ConfigurationParser();
|
ConfigurationParser confParser = new ConfigurationParser();
|
||||||
|
m_properties = confParser.getProperties();
|
||||||
assignDefaults();
|
assignDefaults();
|
||||||
try {
|
try {
|
||||||
confParser.parse(configReader);
|
confParser.parse(configReader);
|
||||||
} catch (ParseException pex) {
|
} catch (ParseException pex) {
|
||||||
LOG.warn("An error occurred in parsing configuration, fallback on default configuration", pex);
|
LOG.warn("An error occurred in parsing configuration, fallback on default configuration", pex);
|
||||||
}
|
}
|
||||||
m_properties = confParser.getProperties();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -34,13 +34,13 @@ public class FilesystemConfig extends IConfig {
|
|||||||
|
|
||||||
public FilesystemConfig(File file) {
|
public FilesystemConfig(File file) {
|
||||||
ConfigurationParser confParser = new ConfigurationParser();
|
ConfigurationParser confParser = new ConfigurationParser();
|
||||||
|
m_properties = confParser.getProperties();
|
||||||
assignDefaults();
|
assignDefaults();
|
||||||
try {
|
try {
|
||||||
confParser.parse(file);
|
confParser.parse(file);
|
||||||
} catch (ParseException pex) {
|
} catch (ParseException pex) {
|
||||||
LOG.warn("An error occurred in parsing configuration, fallback on default configuration", pex);
|
LOG.warn("An error occurred in parsing configuration, fallback on default configuration", pex);
|
||||||
}
|
}
|
||||||
m_properties = confParser.getProperties();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FilesystemConfig() {
|
public FilesystemConfig() {
|
||||||
|
|||||||
Reference in New Issue
Block a user