Commit 2fddcf0d authored by DominikE's avatar DominikE

Remove hard requirement for properties tag

parent 5c556230
......@@ -130,7 +130,7 @@ public class Moduli
private void setGlobalConfiguration()
{
globalConfiguration = config.configurationAt("globalConfiguration");
globalConfiguration = getModuleConfig("globalConfiguration");
}
......@@ -152,7 +152,7 @@ public class Moduli
clazz = id;
}
SubnodeConfiguration moduleConfig = config.configurationAt(moduleMessage(i, ".properties"));
SubnodeConfiguration moduleConfig = getModuleConfig(moduleMessage(i, ".properties"));
AModule module = (AModule) createObject(clazz);
......@@ -179,6 +179,18 @@ public class Moduli
}
private SubnodeConfiguration getModuleConfig(final String key)
{
try
{
return config.configurationAt(key);
} catch (IllegalArgumentException e)
{
return null;
}
}
private void checkModuleIsUnique(final AModule module) throws LoadModulesException
{
if (modules.containsKey(module.getId()))
......
......@@ -8,8 +8,6 @@
<module id="edu.tigers.moduli.modules.TestModule">
<implementation>edu.tigers.moduli.modules.ConcreteTestModule</implementation>
<properties></properties>
</module>
<module id="edu.tigers.moduli.modules.ConfiguredTestModule">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment