Replace Collectors.toList with Stream.toList
Closes gh-29203
This commit is contained in:
committed by
Brian Clozel
parent
9d263668d5
commit
0ccb64fe10
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user