- Notifications
You must be signed in to change notification settings - Fork38.8k
Commit0e3e34b
committed
Find annotations on parameters in overridden non-public methods
Prior to this commit, annotations were not found on parameters in anoverridden method unless the method was public. Specifically, thesearch algorithm in AnnotatedMethod did not consider a protected orpackage-private method in a superclass to be a potential overridecandidate. This affects parameter annotation searches inspring-messaging, spring-webmvc, spring-webflux, and any othercomponents that use or extend AnnotatedMethod.To address that, this commit revises the search algorithm inAnnotatedMethod to consider all non-final declared methods as potentialoverride candidates, thereby aligning with the search logic inAnnotationsScanner for the MergedAnnotations API.Closesgh-353491 parent4745c7c commit0e3e34b
File tree
2 files changed
+27
-7
lines changed- spring-core/src
- main/java/org/springframework/core/annotation
- test/java/org/springframework/core/annotation
2 files changed
+27
-7
lines changedLines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
| |||
38 | 39 |
| |
39 | 40 |
| |
40 | 41 |
| |
| 42 | + | |
41 | 43 |
| |
42 | 44 |
| |
43 | 45 |
| |
| |||
181 | 183 |
| |
182 | 184 |
| |
183 | 185 |
| |
184 |
| - | |
| 186 | + | |
185 | 187 |
| |
186 | 188 |
| |
187 | 189 |
| |
| |||
194 | 196 |
| |
195 | 197 |
| |
196 | 198 |
| |
197 |
| - | |
198 |
| - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
199 | 202 |
| |
200 | 203 |
| |
201 | 204 |
| |
|
Lines changed: 21 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
22 | 23 |
| |
23 | 24 |
| |
24 | 25 |
| |
25 | 26 |
| |
26 |
| - | |
| 27 | + | |
27 | 28 |
| |
| 29 | + | |
| 30 | + | |
28 | 31 |
| |
29 | 32 |
| |
30 | 33 |
| |
| |||
55 | 58 |
| |
56 | 59 |
| |
57 | 60 |
| |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
58 | 67 |
| |
59 | 68 |
| |
60 | 69 |
| |
| |||
78 | 87 |
| |
79 | 88 |
| |
80 | 89 |
| |
81 |
| - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
82 | 98 |
| |
83 | 99 |
| |
84 | 100 |
| |
| |||
103 | 119 |
| |
104 | 120 |
| |
105 | 121 |
| |
106 |
| - | |
| 122 | + | |
| 123 | + | |
107 | 124 |
| |
108 | 125 |
| |
109 | 126 |
| |
110 | 127 |
| |
111 | 128 |
| |
112 |
| - | |
| 129 | + | |
113 | 130 |
| |
114 | 131 |
| |
115 | 132 |
| |
|
0 commit comments
Comments
(0)