Commit Graph

1899 Commits

Author SHA1 Message Date
Sam Brannen ac11acb532 Optimize sorting in PostProcessorRegistrationDelegate
Closes gh-24776
2020-03-26 17:32:38 +01:00
Sam Brannen 5c977ce119 Make remaining static fields final in CommonAnnotationBPP 2020-03-25 18:58:56 +01:00
Sam Brannen 6d0bab332c Polishing 2020-03-25 18:41:21 +01:00
Qimiao Chen c42a0eeb38
Make resourceAnnotationTypes field final in CommonAnnotationBPP
Closes gh-24774
2020-03-25 14:34:29 +01:00
Juergen Hoeller 910d2788e9 Polishing 2020-03-23 18:02:55 +01:00
Juergen Hoeller 2e23cf32ce Clarify name generation responsibility for PropertySourceFactory impls
Closes gh-24757
2020-03-23 18:02:05 +01:00
陈其苗 821a8eebdd Improve Javadoc in Configuration 2020-03-23 15:42:45 +01:00
Sam Brannen b069efade4 Polish Javadoc for @ManagedAttribute
See gh-24742
2020-03-23 11:34:25 +01:00
Rossen Stoyanchev 1f72ab4816 Add Javadoc to ManagedAttribute
Closes: gh-24742
2020-03-20 21:50:52 +00:00
Qimiao Chen 09b36380cd
Fix typos in source files
Closes gh-24746
2020-03-20 20:06:52 +01:00
Sam Brannen e6814f6609 Clean up warnings in Jsr354NumberFormatAnnotationFormatterFactory 2020-03-18 17:04:28 +01:00
Sam Brannen 678b6edad2 Delete unused method in ConfigurationClassParser 2020-03-18 17:01:33 +01:00
Qimiao Chen c8c1e61c0a
Improve Javadoc in AutoProxyRegistrar
Closes gh-24688

Co-authored-by: Sam Brannen <sbrannen@pivotal.io>
2020-03-13 10:01:58 +01:00
Juergen Hoeller bcee6b9da4 Consistent assertions for supplier-based bean definition tests 2020-03-11 14:55:39 +01:00
Juergen Hoeller bee63e38c1 Create ScannedGenericBeanDefinitions for index-derived components as well
Closes gh-24638
2020-03-11 14:54:16 +01:00
Juergen Hoeller 0e95282153 Polishing 2020-02-24 19:08:23 +01:00
Juergen Hoeller 2afe5802c0 Clarify setCacheMillis/setCacheSeconds vs java.util.ResourceBundle
Closes gh-24563
2020-02-24 19:08:13 +01:00
Hyunjin Choi ede2a1d4b2 Remove unnecessary semicolon in some enum classes 2020-02-24 14:56:12 +01:00
ZhangT 6add7b4dec
Polishing
Closes gh-24543
2020-02-17 17:33:39 +01:00
Juergen Hoeller a4179b4795 Polishing 2020-02-12 18:32:32 +01:00
Juergen Hoeller d1c7083e77 Consistent ROLE_INFRASTRUCTURE declarations for configuration classes
Closes gh-24509
2020-02-12 16:49:02 +01:00
Sam Brannen 9dbd411f81 Suppress warnings in Gradle build 2020-02-12 11:04:07 +01:00
Sam Brannen 974cacac31 Support nested annotations in ASM-based processing again
Spring Framework 5.0 introduced a regression in ASM-based annotation
processing. Specifically, nested annotations were no longer supported,
and component scanning resulted in an exception if a candidate
component was annotated with an annotation that contained nested
annotations.

This commit fixes this regression by introducing special handling in
AnnotationTypeMapping that supports extracting values from objects of
type TypeMappedAnnotation when necessary.

Closes gh-24375
2020-02-12 10:36:54 +01:00
Rossen Stoyanchev 0a974511bd Expose awaitTerminationMillis presion
Closes gh-24496
2020-02-11 14:02:50 +00:00
Juergen Hoeller b23049bd27 Polishing 2020-02-06 12:59:55 +01:00
Juergen Hoeller 82adb09490 ImportSelector.getExclusionFilter() naming and javadoc clarification
See gh-24175
2020-02-05 18:20:27 +01:00
Juergen Hoeller d93303c008 ImportSelector.getCandidateFilter() for transitive filtering of classes
Closes gh-24175
2020-02-05 12:35:16 +01:00
Qimiao Chen 5aa37ea07b
Let BFAwareGeneratorStrategy extend ClassLoaderAwareGeneratorStrategy
This commit updates BeanFactoryAwareGeneratorStrategy to extend 
ClassLoaderAwareGeneratorStrategy in order to avoid duplication of the
common generate() implementation.

Closes gh-24396
2020-02-04 14:10:59 +01:00
Sam Brannen 984f9de191 Fix Checkstyle violation
See gh-24375
2020-01-16 18:14:14 +01:00
Sam Brannen 2a2efbe611 Introduce @Disabled regression test for gh-24375 2020-01-16 17:16:57 +01:00
Sébastien Deleuze 3f1882c4eb Support noarg callable references in Kotlin beans DSL
Closes gh-23395
2020-01-13 10:53:23 +01:00
Stephane Nicoll bdb9f9570e Polish 2020-01-09 17:08:48 +01:00
Juergen Hoeller 4936a637fe Polishing 2020-01-09 17:03:17 +01:00
Juergen Hoeller b0e4b7e29c Re-calculate SimpleKey's hashCode field on deserialization
Closes gh-24320
2020-01-09 15:39:04 +01:00
stsypanov 8e5cad2af3 Add fast path for ClassUtils.hasMethod() 2020-01-08 18:52:15 +01:00
Sam Brannen e3e7d90415 Improve documentation for FullyQualifiedAnnotationBeanNameGenerator
See gh-24114
2020-01-08 16:47:39 +01:00
Sam Brannen b4c91e7dac Introduce BeanNameGenerator based on fully qualified class name
Prior to this commit, Spring offered two top-level implementations of
the BeanNameGenerator strategy: DefaultBeanNameGenerator and
AnnotationBeanNameGenerator. The latter is used as the default bean
name generator for beans picked up via component scanning. In a typical
application, this strategy works well; however, if multiple component
scanned beans have the same simple class name (i.e., identical names
ignoring the package), a BeanDefinitionStoreException is thrown.

To address such naming conflicts, users of Spring have had to implement
a custom BeanNameGenerator based on the fully qualified class name of
such components.

Similar conflicts can arise with components registered via
configuration class imports (i.e., via @Import), and
ConfigurationClassPostProcessor addresses this via an anonymous inner
class that extends AnnotationBeanNameGenerator but falls back to using
the fully qualified class name if an explicit bean name is not provided
via an annotation.

This commit extracts the implementation of
ConfigurationClassPostProcessor's internal BeanNameGenerator into a new
top-level FullyQualifiedAnnotationBeanNameGenerator class that can be
used to disambiguate between same-named components residing in
different packages that are picked up via component scanning. This bean
name generator can be configured via @ComponentScan's nameGenerator
attribute.

Closes gh-24114
2020-01-07 19:39:28 +01:00
Sam Brannen e1fb4a1966 Polishing 2020-01-07 18:47:54 +01:00
Sam Brannen 8a371c7669 Use Gradle test fixture support for spring-aop
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen 57b771ba92 Move common FactoryMethods to spring-beans test fixtures
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen 726b1bb1d0 Rename test fixture package in spring-context
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen 7cd4ddf5fc Rename test fixture package in spring-beans
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen 4260c34b47 Rename test fixture package in spring-core
See gh-23550
2020-01-02 16:01:34 +01:00
Sam Brannen 61d4ee594d Use Gradle test fixture support for spring-beans and spring-context
See gh-23550
2020-01-02 16:01:34 +01:00
Sam Brannen 5718bf424b Use Gradle test fixture support for spring-core
See gh-23550
2020-01-02 16:01:34 +01:00
Juergen Hoeller 7474ee7041 Polishing 2019-12-16 16:50:30 +01:00
Sam Brannen 47b18e5ea9 Polishing 2019-12-13 16:12:39 +01:00
lixiaolong11000 bee2b7cd73 Add missing test cases in XmlBeanFactoryTests
Closes gh-24189
2019-12-13 15:56:06 +01:00
Johnny Lim 1e83e889aa Use hasSize() where possible
See gh-24172
2019-12-10 07:58:53 +01:00
Sam Brannen 093323beeb Introduce Checkstyle rule to prohibit class names ending with "Test" 2019-11-29 17:30:29 +01:00