ConfigManager: don't post an update if the values are the same (#5480)

- Don't post config update if the values changed are the same
- Don't post unset if value is already null
This commit is contained in:
Ron Young
2018-10-11 17:48:05 -05:00
committed by Tomas Slusny
parent e93ba9d51f
commit 1e4b4d672e

View File

@@ -237,9 +237,9 @@ public class ConfigManager
}
T t = (T) Proxy.newProxyInstance(clazz.getClassLoader(), new Class<?>[]
{
clazz
}, handler);
{
clazz
}, handler);
return t;
}
@@ -277,6 +277,11 @@ public class ConfigManager
String oldValue = (String) properties.setProperty(groupName + "." + key, value);
if (Objects.equals(oldValue, value))
{
return;
}
if (client != null)
{
client.set(groupName + "." + key, value);
@@ -315,6 +320,11 @@ public class ConfigManager
String oldValue = (String) properties.remove(groupName + "." + key);
if (oldValue == null)
{
return;
}
if (client != null)
{
client.unset(groupName + "." + key);