Merge pull request #2984 from showkawa/develop

hi.here 'addAll()' call can be replaced with paramterized constructor call,performance will be better
This commit is contained in:
liaochuntao 2020-06-08 23:44:03 +08:00 committed by GitHub
commit 38f33b4ab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();