Skip to content

Commit 43cb1af

Browse files
committed
Polishing
1 parent a1efe3c commit 43cb1af

File tree

4 files changed

+16
-31
lines changed

4 files changed

+16
-31
lines changed

spring-context/src/main/java/org/springframework/context/annotation/AutoProxyRegistrar.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -57,9 +57,9 @@ public class AutoProxyRegistrar implements ImportBeanDefinitionRegistrar {
5757
@Override
5858
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
5959
boolean candidateFound = false;
60-
Set<String> annoTypes = importingClassMetadata.getAnnotationTypes();
61-
for (String annoType : annoTypes) {
62-
AnnotationAttributes candidate = AnnotationConfigUtils.attributesFor(importingClassMetadata, annoType);
60+
Set<String> annTypes = importingClassMetadata.getAnnotationTypes();
61+
for (String annType : annTypes) {
62+
AnnotationAttributes candidate = AnnotationConfigUtils.attributesFor(importingClassMetadata, annType);
6363
if (candidate == null) {
6464
continue;
6565
}

spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -360,8 +360,7 @@ public boolean isAlias(String beanName) {
360360

361361
/**
362362
* Register a bean from the given bean class, optionally customizing its
363-
* bean definition metadata (typically declared as a lambda expression
364-
* or method reference).
363+
* bean definition metadata (typically declared as a lambda expression).
365364
* @param beanClass the class of the bean (resolving a public constructor
366365
* to be autowired, possibly simply the default constructor)
367366
* @param customizers one or more callbacks for customizing the factory's
@@ -374,10 +373,8 @@ public final <T> void registerBean(Class<T> beanClass, BeanDefinitionCustomizer.
374373
}
375374

376375
/**
377-
* Register a bean from the given bean class, using the given supplier for
378-
* obtaining a new instance (typically declared as a lambda expression or
379-
* method reference), optionally customizing its bean definition metadata
380-
* (again typically declared as a lambda expression or method reference).
376+
* Register a bean from the given bean class, optionally customizing its
377+
* bean definition metadata (typically declared as a lambda expression).
381378
* @param beanName the name of the bean (may be {@code null})
382379
* @param beanClass the class of the bean (resolving a public constructor
383380
* to be autowired, possibly simply the default constructor)
@@ -396,7 +393,7 @@ public final <T> void registerBean(
396393
* Register a bean from the given bean class, using the given supplier for
397394
* obtaining a new instance (typically declared as a lambda expression or
398395
* method reference), optionally customizing its bean definition metadata
399-
* (again typically declared as a lambda expression or method reference).
396+
* (again typically declared as a lambda expression).
400397
* @param beanClass the class of the bean
401398
* @param supplier a callback for creating an instance of the bean
402399
* @param customizers one or more callbacks for customizing the factory's
@@ -414,7 +411,7 @@ public final <T> void registerBean(
414411
* Register a bean from the given bean class, using the given supplier for
415412
* obtaining a new instance (typically declared as a lambda expression or
416413
* method reference), optionally customizing its bean definition metadata
417-
* (again typically declared as a lambda expression or method reference).
414+
* (again typically declared as a lambda expression).
418415
* <p>This method can be overridden to adapt the registration mechanism for
419416
* all {@code registerBean} methods (since they all delegate to this one).
420417
* @param beanName the name of the bean (may be {@code null})

spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -205,39 +205,27 @@ private void assertMetaAnnotationOverrides(AnnotationMetadata metadata) {
205205
assertThat("length of basePackageClasses[]", basePackageClasses.length, is(0));
206206
}
207207

208-
/**
209-
* https://jira.spring.io/browse/SPR-11649
210-
*/
211-
@Test
208+
@Test // SPR-11649
212209
public void multipleAnnotationsWithIdenticalAttributeNamesUsingStandardAnnotationMetadata() {
213210
AnnotationMetadata metadata = new StandardAnnotationMetadata(NamedAnnotationsClass.class);
214211
assertMultipleAnnotationsWithIdenticalAttributeNames(metadata);
215212
}
216213

217-
/**
218-
* https://jira.spring.io/browse/SPR-11649
219-
*/
220-
@Test
214+
@Test // SPR-11649
221215
public void multipleAnnotationsWithIdenticalAttributeNamesUsingAnnotationMetadataReadingVisitor() throws Exception {
222216
MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory();
223217
MetadataReader metadataReader = metadataReaderFactory.getMetadataReader(NamedAnnotationsClass.class.getName());
224218
AnnotationMetadata metadata = metadataReader.getAnnotationMetadata();
225219
assertMultipleAnnotationsWithIdenticalAttributeNames(metadata);
226220
}
227221

228-
/**
229-
* https://jira.spring.io/browse/SPR-11649
230-
*/
231-
@Test
222+
@Test // SPR-11649
232223
public void composedAnnotationWithMetaAnnotationsWithIdenticalAttributeNamesUsingStandardAnnotationMetadata() {
233224
AnnotationMetadata metadata = new StandardAnnotationMetadata(NamedComposedAnnotationClass.class);
234225
assertMultipleAnnotationsWithIdenticalAttributeNames(metadata);
235226
}
236227

237-
/**
238-
* https://jira.spring.io/browse/SPR-11649
239-
*/
240-
@Test
228+
@Test // SPR-11649
241229
public void composedAnnotationWithMetaAnnotationsWithIdenticalAttributeNamesUsingAnnotationMetadataReadingVisitor() throws Exception {
242230
MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory();
243231
MetadataReader metadataReader = metadataReaderFactory.getMetadataReader(NamedComposedAnnotationClass.class.getName());

src/docs/asciidoc/core/core-null-safety.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[-[null-safety]]
1+
[[null-safety]]
22
= Null-safety
33

44
Although Java does not let you express null-safety with its type system, the Spring Framework

0 commit comments

Comments
 (0)