From fceed9f3e5fa8f5ccf0a547ed33aed406b49df25 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Mon, 11 Sep 2023 14:54:55 +0200 Subject: [PATCH] Remove @Nullable on attributes parameter in isStereotypeWithNameValue() --- .../context/annotation/AnnotationBeanNameGenerator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java index 64aa0a2f263..cb78bf95c7b 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java @@ -192,7 +192,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator { * @return whether the annotation qualifies as a stereotype with component name */ protected boolean isStereotypeWithNameValue(String annotationType, - Set metaAnnotationTypes, @Nullable Map attributes) { + Set metaAnnotationTypes, Map attributes) { boolean isStereotype = metaAnnotationTypes.contains(COMPONENT_ANNOTATION_CLASSNAME) || annotationType.equals("jakarta.annotation.ManagedBean") || @@ -200,7 +200,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator { annotationType.equals("jakarta.inject.Named") || annotationType.equals("javax.inject.Named"); - return (isStereotype && attributes != null && attributes.containsKey("value")); + return (isStereotype && attributes.containsKey("value")); } /**