diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java index 381ca0c70152..c9d61907f962 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -111,7 +111,7 @@ public void checkConfigMembers(RootBeanDefinition beanDefinition) { this.checkedElements = Collections.emptySet(); } else { - Set checkedElements = new LinkedHashSet<>(this.injectedElements.size()*4/3 + 1); + Set checkedElements = new LinkedHashSet<>((this.injectedElements.size() * 4 / 3) + 1); for (InjectedElement element : this.injectedElements) { Member member = element.getMember(); if (!beanDefinition.isExternallyManagedConfigMember(member)) { diff --git a/spring-core/src/main/java/org/springframework/core/type/classreading/MergedAnnotationReadingVisitor.java b/spring-core/src/main/java/org/springframework/core/type/classreading/MergedAnnotationReadingVisitor.java index a4d13cd32a44..540ee3546a0a 100644 --- a/spring-core/src/main/java/org/springframework/core/type/classreading/MergedAnnotationReadingVisitor.java +++ b/spring-core/src/main/java/org/springframework/core/type/classreading/MergedAnnotationReadingVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -93,8 +93,8 @@ public AnnotationVisitor visitArray(String name) { @Override public void visitEnd() { - Map compactedAttributes - = this.attributes.size() == 0 ? Collections.emptyMap() : this.attributes; + Map compactedAttributes = + (this.attributes.size() == 0 ? Collections.emptyMap() : this.attributes); MergedAnnotation annotation = MergedAnnotation.of( this.classLoader, this.source, this.annotationType, compactedAttributes); this.consumer.accept(annotation);