File tree Expand file tree Collapse file tree
spring-core/src/main/java/org/springframework/core/annotation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public class AnnotatedMethod {
5858
5959 private final MethodParameter [] parameters ;
6060
61- private final Map <Class <? extends Annotation >, Object > annotations = new ConcurrentHashMap <>( 4 ) ;
61+ private final Map <Class <? extends Annotation >, Object > annotations ;
6262
6363 private volatile @ Nullable List <Annotation [][]> inheritedParameterAnnotations ;
6464
@@ -73,6 +73,7 @@ public AnnotatedMethod(Method method) {
7373 this .bridgedMethod = BridgeMethodResolver .findBridgedMethod (method );
7474 ReflectionUtils .makeAccessible (this .bridgedMethod );
7575 this .parameters = initMethodParameters ();
76+ this .annotations = new ConcurrentHashMap <>(4 );
7677 }
7778
7879 /**
@@ -83,6 +84,7 @@ protected AnnotatedMethod(AnnotatedMethod annotatedMethod) {
8384 this .method = annotatedMethod .method ;
8485 this .bridgedMethod = annotatedMethod .bridgedMethod ;
8586 this .parameters = annotatedMethod .parameters ;
87+ this .annotations = annotatedMethod .annotations ;
8688 this .inheritedParameterAnnotations = annotatedMethod .inheritedParameterAnnotations ;
8789 }
8890
You can’t perform that action at this time.
0 commit comments