configinvocationhandler: Set config to default if string to obj… (#1540)

configinvocationhandler: Set config to default if string to object fails and it's a default method
This commit is contained in:
ST0NEWALL
2019-09-06 14:59:24 -04:00
committed by GitHub

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