Commit f1261bf
committed
configuration-processor: detect @nullable on TYPE_USE parameters
Update MetadataGenerationEnvironment#getAnnotation to also inspect
type-use annotations (element.asType().getAnnotationMirrors()) in
addition to declaration annotations. This ensures that @nullable
on method parameter types is correctly detected when generating
configuration metadata for Actuator endpoints.
Previously, parameters annotated with @nullable in TYPE_USE
position could be missed, causing them to be marked as required
in metadata. With this change, both declaration-level and
type-use @nullable annotations are recognized.
No new dependencies are introduced, and existing public APIs
remain unchanged.
Signed-off-by: wonyongg <[email protected]>1 parent 7a8b337 commit f1261bf
File tree
1 file changed
+6
-0
lines changed- configuration-metadata/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor
1 file changed
+6
-0
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
268 | 274 | | |
269 | 275 | | |
270 | 276 | | |
| |||
0 commit comments