Replace Collectors.toList with Stream.toList

Closes gh-29203
This commit is contained in:
Adam Ostrožlík
2022-09-26 14:04:43 +02:00
committed by Brian Clozel
parent 9d263668d5
commit 0ccb64fe10
49 changed files with 62 additions and 106 deletions

View File

@@ -18,7 +18,6 @@ package org.springframework.context.index.processor;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import org.assertj.core.api.Condition;
@@ -30,7 +29,7 @@ import org.assertj.core.api.Condition;
class Metadata {
public static Condition<CandidateComponentsMetadata> of(Class<?> type, Class<?>... stereotypes) {
return of(type.getName(), Arrays.stream(stereotypes).map(Class::getName).collect(Collectors.toList()));
return of(type.getName(), Arrays.stream(stereotypes).map(Class::getName).toList());
}
public static Condition<CandidateComponentsMetadata> of(String type, String... stereotypes) {