diff --git a/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/extend/HealthCheckExtendProvider.java b/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/extend/HealthCheckExtendProvider.java index fe6407368..ef4b0f515 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/extend/HealthCheckExtendProvider.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/extend/HealthCheckExtendProvider.java @@ -60,10 +60,8 @@ public class HealthCheckExtendProvider implements BeanFactoryAware { for(HealthCheckType type : HealthCheckType.values()){ origin.add(type.name()); } - Set processorType = new HashSet<>(); - Set healthCheckerType = new HashSet<>(); - processorType.addAll(origin); - healthCheckerType.addAll(origin); + Set processorType = new HashSet<>(origin); + Set healthCheckerType = new HashSet<>(origin); while(processorIt.hasNext()){ HealthCheckProcessor processor = processorIt.next();