mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Replace Collectors.toList with Stream.toList
Closes gh-29203
This commit is contained in:
committed by
Brian Clozel
parent
9d263668d5
commit
0ccb64fe10
+1
-2
@@ -18,7 +18,6 @@ package org.springframework.context.annotation;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -156,7 +155,7 @@ class ConfigurationClassAndBeanMethodTests {
|
||||
private static List<BeanMethod> getBeanMethods(ConfigurationClass configurationClass) {
|
||||
List<BeanMethod> beanMethods = configurationClass.getBeanMethods().stream()
|
||||
.sorted(Comparator.comparing(beanMethod -> beanMethod.getMetadata().getMethodName()))
|
||||
.collect(Collectors.toList());
|
||||
.toList();
|
||||
assertThat(beanMethods).hasSize(3);
|
||||
return beanMethods;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user