diff --git a/dubbo-configcenter/dubbo-configcenter-apollo/src/main/java/org/apache/dubbo/configcenter/support/apollo/ApolloDynamicConfiguration.java b/dubbo-configcenter/dubbo-configcenter-apollo/src/main/java/org/apache/dubbo/configcenter/support/apollo/ApolloDynamicConfiguration.java index f0ad75b82d7..ebce3031d73 100644 --- a/dubbo-configcenter/dubbo-configcenter-apollo/src/main/java/org/apache/dubbo/configcenter/support/apollo/ApolloDynamicConfiguration.java +++ b/dubbo-configcenter/dubbo-configcenter-apollo/src/main/java/org/apache/dubbo/configcenter/support/apollo/ApolloDynamicConfiguration.java @@ -176,11 +176,8 @@ public void onChange(com.ctrip.framework.apollo.model.ConfigChangeEvent changeEv return; } - listeners.forEach(listener -> { - ConfigChangeEvent event = new ConfigChangeEvent(key, change.getNewValue(), getChangeType(change)); - listener.process(event); - } - ); + ConfigChangeEvent event = new ConfigChangeEvent(key, change.getNewValue(), getChangeType(change)); + listeners.forEach(listener -> listener.process(event)); } }