mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Merge branch '7.0.x'
This commit is contained in:
+1
-4
@@ -103,7 +103,6 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
|
||||
private final Map<String, Set<String>> metaAnnotationTypesCache = new ConcurrentHashMap<>();
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) {
|
||||
if (definition instanceof AnnotatedBeanDefinition annotatedBeanDefinition) {
|
||||
@@ -200,8 +199,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
|
||||
return names.get(0);
|
||||
}
|
||||
if (names.size() > 1) {
|
||||
throw new IllegalStateException(
|
||||
"Stereotype annotations suggest inconsistent component names: " + names);
|
||||
throw new IllegalStateException("Stereotype annotations suggest inconsistent component names: " + names);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -219,7 +217,6 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
|
||||
|
||||
boolean isStereotype = metaAnnotationTypes.contains(COMPONENT_ANNOTATION_CLASSNAME) ||
|
||||
annotationType.equals("jakarta.inject.Named");
|
||||
|
||||
return (isStereotype && attributes.containsKey(MergedAnnotation.VALUE));
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -127,6 +127,7 @@ public abstract class AbstractJsonHttpMessageConverter extends AbstractGenericHt
|
||||
catch (Exception ex) {
|
||||
throw new HttpMessageNotWritableException("Could not write JSON: " + ex.getMessage(), ex);
|
||||
}
|
||||
writer.close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
-1
@@ -110,7 +110,6 @@ public class GsonHttpMessageConverter extends AbstractJsonHttpMessageConverter {
|
||||
else {
|
||||
getGson().toJson(object, writer);
|
||||
}
|
||||
writer.flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user