config manager: overwrite defaults when unable to unmarshall values
This allows config key types to change without errors by resetting the config with new default value
This commit is contained in:
@@ -507,7 +507,9 @@ public class ConfigManager
|
|||||||
|
|
||||||
if (!override)
|
if (!override)
|
||||||
{
|
{
|
||||||
String current = getConfiguration(group.value(), item.keyName());
|
// This checks if it is set and is also unmarshallable to the correct type; so
|
||||||
|
// we will overwrite invalid config values with the default
|
||||||
|
Object current = getConfiguration(group.value(), item.keyName(), method.getReturnType());
|
||||||
if (current != null)
|
if (current != null)
|
||||||
{
|
{
|
||||||
continue; // something else is already set
|
continue; // something else is already set
|
||||||
|
|||||||
Reference in New Issue
Block a user