Set config to default if string to object fails and it's a default method

This commit is contained in:
Lucas
2019-05-31 04:33:40 +02:00
parent 5bd4e3c366
commit 3b0e11ecef

View File

@@ -88,7 +88,11 @@ class ConfigInvocationHandler implements InvocationHandler
log.warn("Unable to unmarshal {}.{} ", group.value(), item.keyName(), e);
if (method.isDefault())
{
return callDefaultMethod(proxy, method, null);
Object defaultValue = callDefaultMethod(proxy, method, null);
manager.setConfiguration(group.value(), item.keyName(), defaultValue);
return defaultValue;
}
return null;
}