diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AutoProxyRegistrar.java b/spring-context/src/main/java/org/springframework/context/annotation/AutoProxyRegistrar.java index 8ae8c21f5cf..33c5e3907b1 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AutoProxyRegistrar.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AutoProxyRegistrar.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 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. @@ -57,9 +57,9 @@ public class AutoProxyRegistrar implements ImportBeanDefinitionRegistrar { @Override public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) { boolean candidateFound = false; - Set annoTypes = importingClassMetadata.getAnnotationTypes(); - for (String annoType : annoTypes) { - AnnotationAttributes candidate = AnnotationConfigUtils.attributesFor(importingClassMetadata, annoType); + Set annTypes = importingClassMetadata.getAnnotationTypes(); + for (String annType : annTypes) { + AnnotationAttributes candidate = AnnotationConfigUtils.attributesFor(importingClassMetadata, annType); if (candidate == null) { continue; } diff --git a/spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java b/spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java index 4b766530c99..abd3b90fcdf 100644 --- a/spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java +++ b/spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 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. @@ -360,8 +360,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem /** * Register a bean from the given bean class, optionally customizing its - * bean definition metadata (typically declared as a lambda expression - * or method reference). + * bean definition metadata (typically declared as a lambda expression). * @param beanClass the class of the bean (resolving a public constructor * to be autowired, possibly simply the default constructor) * @param customizers one or more callbacks for customizing the factory's @@ -374,10 +373,8 @@ public class GenericApplicationContext extends AbstractApplicationContext implem } /** - * Register a bean from the given bean class, using the given supplier for - * obtaining a new instance (typically declared as a lambda expression or - * method reference), optionally customizing its bean definition metadata - * (again typically declared as a lambda expression or method reference). + * Register a bean from the given bean class, optionally customizing its + * bean definition metadata (typically declared as a lambda expression). * @param beanName the name of the bean (may be {@code null}) * @param beanClass the class of the bean (resolving a public constructor * to be autowired, possibly simply the default constructor) @@ -396,7 +393,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem * Register a bean from the given bean class, using the given supplier for * obtaining a new instance (typically declared as a lambda expression or * method reference), optionally customizing its bean definition metadata - * (again typically declared as a lambda expression or method reference). + * (again typically declared as a lambda expression). * @param beanClass the class of the bean * @param supplier a callback for creating an instance of the bean * @param customizers one or more callbacks for customizing the factory's @@ -414,7 +411,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem * Register a bean from the given bean class, using the given supplier for * obtaining a new instance (typically declared as a lambda expression or * method reference), optionally customizing its bean definition metadata - * (again typically declared as a lambda expression or method reference). + * (again typically declared as a lambda expression). *

This method can be overridden to adapt the registration mechanism for * all {@code registerBean} methods (since they all delegate to this one). * @param beanName the name of the bean (may be {@code null}) diff --git a/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java b/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java index 28b3ebc2111..677e3768ce0 100644 --- a/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 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. @@ -205,19 +205,13 @@ public class AnnotationMetadataTests { assertThat("length of basePackageClasses[]", basePackageClasses.length, is(0)); } - /** - * https://jira.spring.io/browse/SPR-11649 - */ - @Test + @Test // SPR-11649 public void multipleAnnotationsWithIdenticalAttributeNamesUsingStandardAnnotationMetadata() { AnnotationMetadata metadata = new StandardAnnotationMetadata(NamedAnnotationsClass.class); assertMultipleAnnotationsWithIdenticalAttributeNames(metadata); } - /** - * https://jira.spring.io/browse/SPR-11649 - */ - @Test + @Test // SPR-11649 public void multipleAnnotationsWithIdenticalAttributeNamesUsingAnnotationMetadataReadingVisitor() throws Exception { MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory(); MetadataReader metadataReader = metadataReaderFactory.getMetadataReader(NamedAnnotationsClass.class.getName()); @@ -225,19 +219,13 @@ public class AnnotationMetadataTests { assertMultipleAnnotationsWithIdenticalAttributeNames(metadata); } - /** - * https://jira.spring.io/browse/SPR-11649 - */ - @Test + @Test // SPR-11649 public void composedAnnotationWithMetaAnnotationsWithIdenticalAttributeNamesUsingStandardAnnotationMetadata() { AnnotationMetadata metadata = new StandardAnnotationMetadata(NamedComposedAnnotationClass.class); assertMultipleAnnotationsWithIdenticalAttributeNames(metadata); } - /** - * https://jira.spring.io/browse/SPR-11649 - */ - @Test + @Test // SPR-11649 public void composedAnnotationWithMetaAnnotationsWithIdenticalAttributeNamesUsingAnnotationMetadataReadingVisitor() throws Exception { MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory(); MetadataReader metadataReader = metadataReaderFactory.getMetadataReader(NamedComposedAnnotationClass.class.getName()); diff --git a/src/docs/asciidoc/core/core-null-safety.adoc b/src/docs/asciidoc/core/core-null-safety.adoc index 07044b68503..ffed936d840 100644 --- a/src/docs/asciidoc/core/core-null-safety.adoc +++ b/src/docs/asciidoc/core/core-null-safety.adoc @@ -1,4 +1,4 @@ -[-[null-safety]] +[[null-safety]] = Null-safety Although Java does not let you express null-safety with its type system, the Spring Framework