Merge pull request #455 from Lucwousin/yesbyee

Set config to default if string to object fails and it's a default method
This commit is contained in:
Ganom
2019-05-30 22:39:59 -04:00
committed by GitHub

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;
}