File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
spring-test/src/main/java/org/springframework/test/context/transaction Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 22
22
import java .util .Arrays ;
23
23
import java .util .Collections ;
24
24
import java .util .List ;
25
- import java .util .stream .Collectors ;
26
25
27
26
import org .apache .commons .logging .Log ;
28
27
import org .apache .commons .logging .LogFactory ;
46
45
import org .springframework .transaction .interceptor .TransactionAttributeSource ;
47
46
import org .springframework .util .Assert ;
48
47
import org .springframework .util .ReflectionUtils ;
48
+ import org .springframework .util .ReflectionUtils .MethodFilter ;
49
49
import org .springframework .util .StringUtils ;
50
50
51
51
/**
@@ -462,9 +462,9 @@ protected final boolean isRollback(TestContext testContext) throws Exception {
462
462
* as well as annotated interface default methods
463
463
*/
464
464
private List <Method > getAnnotatedMethods (Class <?> clazz , Class <? extends Annotation > annotationType ) {
465
- return Arrays . stream ( ReflectionUtils . getUniqueDeclaredMethods ( clazz , ReflectionUtils .USER_DECLARED_METHODS ))
466
- .filter (method -> AnnotatedElementUtils .hasAnnotation (method , annotationType ))
467
- . collect ( Collectors . toList ( ));
465
+ MethodFilter methodFilter = ReflectionUtils .USER_DECLARED_METHODS
466
+ .and (method -> AnnotatedElementUtils .hasAnnotation (method , annotationType ));
467
+ return Arrays . asList ( ReflectionUtils . getUniqueDeclaredMethods ( clazz , methodFilter ));
468
468
}
469
469
470
470
}
You can’t perform that action at this time.
0 commit comments