From 669b05dc1d925cf88a084a1de6e582b6f0a773e1 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 8 Feb 2022 14:04:11 +0100 Subject: [PATCH] Allow AutowiredAnnotationBeanPostProcessor to compile on JDK 11 --- .../annotation/AutowiredAnnotationBeanPostProcessor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java index 37f5884e67..f31d48191a 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java @@ -537,10 +537,10 @@ public class AutowiredAnnotationBeanPostProcessor implements SmartInstantiationA * @param ann the Autowired annotation * @return whether the annotation indicates that a dependency is required */ - @SuppressWarnings({"deprecation", "cast"}) + @SuppressWarnings("deprecation") protected boolean determineRequiredStatus(MergedAnnotation ann) { - return determineRequiredStatus( - ann.asMap(mergedAnnotation -> new AnnotationAttributes(mergedAnnotation.getType()))); + return determineRequiredStatus(ann. asMap( + mergedAnnotation -> new AnnotationAttributes(mergedAnnotation.getType()))); } /**