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

This commit is contained in:
Owain van Brakel
2019-09-04 13:20:23 +02:00
parent 6c916195d5
commit e3159888b8

View File

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