diff --git a/client/src/main/java/com/alibaba/nacos/client/config/impl/ConfigChangeHandler.java b/client/src/main/java/com/alibaba/nacos/client/config/impl/ConfigChangeHandler.java index 97e4307dc..57b3894d9 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/impl/ConfigChangeHandler.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/impl/ConfigChangeHandler.java @@ -23,7 +23,6 @@ import com.alibaba.nacos.common.spi.NacosServiceLoader; import java.io.IOException; import java.util.Collection; import java.util.Collections; -import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -44,11 +43,8 @@ public class ConfigChangeHandler { this.parserList = new LinkedList<>(); Collection loader = NacosServiceLoader.load(ConfigChangeParser.class); - Iterator itr = loader.iterator(); - while (itr.hasNext()) { - this.parserList.add(itr.next()); - } - + this.parserList.addAll(loader); + this.parserList.add(new PropertiesChangeParser()); this.parserList.add(new YmlChangeParser()); }