hi.here 'addAll()' call can be replaced with parametrized constructor call,performance will be better

This commit is contained in:
Brian Huang 2020-06-07 19:55:21 +08:00
parent 6709b0686d
commit 0f1d0abcc1

View File

@ -60,10 +60,8 @@ public class HealthCheckExtendProvider implements BeanFactoryAware {
for(HealthCheckType type : HealthCheckType.values()){
origin.add(type.name());
}
Set<String> processorType = new HashSet<>();
Set<String> healthCheckerType = new HashSet<>();
processorType.addAll(origin);
healthCheckerType.addAll(origin);
Set<String> processorType = new HashSet<>(origin);
Set<String> healthCheckerType = new HashSet<>(origin);
while(processorIt.hasNext()){
HealthCheckProcessor processor = processorIt.next();