File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
spring-test/src/main/java/org/springframework/test/context Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -492,10 +492,11 @@ public static class AnnotationDescriptor<T extends Annotation> {
492
492
Assert .notNull (annotation , "Annotation must not be null" );
493
493
this .rootDeclaringClass = rootDeclaringClass ;
494
494
this .declaringClass = declaringClass ;
495
- this . annotation = (T ) AnnotatedElementUtils .findMergedAnnotation (
495
+ T mergedAnnotation = (T ) AnnotatedElementUtils .findMergedAnnotation (
496
496
rootDeclaringClass , annotation .annotationType ());
497
- Assert .state (this . annotation != null ,
497
+ Assert .state (mergedAnnotation != null ,
498
498
() -> "Failed to find merged annotation for " + annotation );
499
+ this .annotation = mergedAnnotation ;
499
500
}
500
501
501
502
public Class <?> getRootDeclaringClass () {
You can’t perform that action at this time.
0 commit comments