Same pattern as for FileConfigSubscription
@@ -39,11 +39,11 @@ public class ConfigSetSubscription<T extends ConfigInstance> extends ConfigSubsc
ConfigState<T> configState = getConfigState();
// User forced reload
if (checkReloaded()) {
- updateInstance(myInstance);
+ setConfigIfChanged((T)myInstance);
return true;
}
if (!myInstance.equals(configState.getConfig())) {
- updateInstance(myInstance);
+ setConfigIfChangedIncGen((T)myInstance);
return true;
}
sleep();
@@ -59,11 +59,6 @@ public class ConfigSetSubscription<T extends ConfigInstance> extends ConfigSubsc
}
}
- @SuppressWarnings("unchecked")
- private void updateInstance(ConfigInstance myInstance) {
- setConfigIfChangedIncGen((T)myInstance);
- }
-
@Override
public boolean subscribe(long timeout) {
return true;
