Restore retrieval of plain annotations through direct presence checks
Includes deprecation of several AnnotationUtils methods and nullability refinements for passed-in function arguments at the MergedAnnotation API level... also, MergedAnnotation.getType() returns a Class now. Closes gh-22663 Closes gh-22685
This commit is contained in:
@@ -521,9 +521,10 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
|
||||
* @param ann the Autowired annotation
|
||||
* @return whether the annotation indicates that a dependency is required
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected boolean determineRequiredStatus(MergedAnnotation<?> ann) {
|
||||
return determineRequiredStatus(
|
||||
ann.asMap(mergedAnnotation -> new AnnotationAttributes()));
|
||||
return determineRequiredStatus((AnnotationAttributes)
|
||||
ann.asMap(mergedAnnotation -> new AnnotationAttributes(mergedAnnotation.getType())));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -533,7 +534,7 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
|
||||
* or method when no beans are found.
|
||||
* @param ann the Autowired annotation
|
||||
* @return whether the annotation indicates that a dependency is required
|
||||
* @deprecated since 5.2 in favor of {@link #determineRequiredStatus(MergedAnnotation)}
|
||||
* @deprecated since 5.2, in favor of {@link #determineRequiredStatus(MergedAnnotation)}
|
||||
*/
|
||||
@Deprecated
|
||||
protected boolean determineRequiredStatus(AnnotationAttributes ann) {
|
||||
|
||||
Reference in New Issue
Block a user