File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
spring-core/src/main/java/org/springframework/core/annotation Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -289,19 +289,15 @@ private void addConventionMappings() {
289
289
int mapped = rootAttributes .indexOf (name );
290
290
if (!MergedAnnotation .VALUE .equals (name ) && mapped != -1 && !isExplicitAttributeOverride (name )) {
291
291
String rootAnnotationTypeName = this .root .annotationType .getName ();
292
- // We want to avoid duplicate log warnings as much as possible, without
293
- // fully synchronizing on the cache.
294
292
String cacheKey = rootAnnotationTypeName + "." + name ;
295
- if (!conventionBasedOverrideCheckCache .contains (cacheKey )) {
296
- conventionBasedOverrideCheckCache .add (cacheKey );
297
- if (logger .isWarnEnabled ()) {
298
- logger .warn ("""
299
- Support for convention-based annotation attribute overrides is \
300
- deprecated and will be removed in Spring Framework 6.1. Please \
301
- annotate the '%s' attribute in @%s with an appropriate @AliasFor \
302
- declaration."""
303
- .formatted (name , rootAnnotationTypeName ));
304
- }
293
+ // We want to avoid duplicate log warnings as much as possible, without full synchronization.
294
+ if (conventionBasedOverrideCheckCache .add (cacheKey ) && logger .isWarnEnabled ()) {
295
+ logger .warn ("""
296
+ Support for convention-based annotation attribute overrides is \
297
+ deprecated and will be removed in Spring Framework 6.1. Please \
298
+ annotate the '%s' attribute in @%s with an appropriate @AliasFor \
299
+ declaration."""
300
+ .formatted (name , rootAnnotationTypeName ));
305
301
}
306
302
mappings [i ] = mapped ;
307
303
MirrorSet mirrors = getMirrorSets ().getAssigned (i );
You can’t perform that action at this time.
0 commit comments