Browse Source

Polish contribution

pull/29800/head
Sam Brannen 3 years ago
parent
commit
d5fb5d029b
  1. 4
      spring-beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java
  2. 6
      spring-core/src/main/java/org/springframework/core/type/classreading/MergedAnnotationReadingVisitor.java

4
spring-beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java

@ -1,5 +1,5 @@ @@ -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 class InjectionMetadata { @@ -111,7 +111,7 @@ public class InjectionMetadata {
this.checkedElements = Collections.emptySet();
}
else {
Set<InjectedElement> checkedElements = new LinkedHashSet<>(this.injectedElements.size()*4/3 + 1);
Set<InjectedElement> checkedElements = new LinkedHashSet<>((this.injectedElements.size() * 4 / 3) + 1);
for (InjectedElement element : this.injectedElements) {
Member member = element.getMember();
if (!beanDefinition.isExternallyManagedConfigMember(member)) {

6
spring-core/src/main/java/org/springframework/core/type/classreading/MergedAnnotationReadingVisitor.java

@ -1,5 +1,5 @@ @@ -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 @@ class MergedAnnotationReadingVisitor<A extends Annotation> extends AnnotationVis @@ -93,8 +93,8 @@ class MergedAnnotationReadingVisitor<A extends Annotation> extends AnnotationVis
@Override
public void visitEnd() {
Map<String, Object> compactedAttributes
= this.attributes.size() == 0 ? Collections.emptyMap() : this.attributes;
Map<String, Object> compactedAttributes =
(this.attributes.size() == 0 ? Collections.emptyMap() : this.attributes);
MergedAnnotation<A> annotation = MergedAnnotation.of(
this.classLoader, this.source, this.annotationType, compactedAttributes);
this.consumer.accept(annotation);

Loading…
Cancel
Save