Browse Source

Remove @Nullable on attributes parameter in isStereotypeWithNameValue()

pull/31202/head
Sam Brannen 2 years ago
parent
commit
fceed9f3e5
  1. 4
      spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java

4
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 * @return whether the annotation qualifies as a stereotype with component name
*/ */
protected boolean isStereotypeWithNameValue(String annotationType, protected boolean isStereotypeWithNameValue(String annotationType,
Set<String> metaAnnotationTypes, @Nullable Map<String, Object> attributes) { Set<String> metaAnnotationTypes, Map<String, Object> attributes) {
boolean isStereotype = metaAnnotationTypes.contains(COMPONENT_ANNOTATION_CLASSNAME) || boolean isStereotype = metaAnnotationTypes.contains(COMPONENT_ANNOTATION_CLASSNAME) ||
annotationType.equals("jakarta.annotation.ManagedBean") || annotationType.equals("jakarta.annotation.ManagedBean") ||
@ -200,7 +200,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
annotationType.equals("jakarta.inject.Named") || annotationType.equals("jakarta.inject.Named") ||
annotationType.equals("javax.inject.Named"); annotationType.equals("javax.inject.Named");
return (isStereotype && attributes != null && attributes.containsKey("value")); return (isStereotype && attributes.containsKey("value"));
} }
/** /**

Loading…
Cancel
Save