Commit Graph

1385 Commits

Author SHA1 Message Date
Sam Brannen
e26764d249 Remove duplicate words in documentation and polish Javadoc 2020-03-31 12:17:58 +02:00
Сергей Цыпанов
e63d1cf12d Improve usage of ByteArrayOutputStream/ByteArrayInputStream
Closes gh-24805
2020-03-30 13:22:21 +02:00
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
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
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
d1c7083e77 Consistent ROLE_INFRASTRUCTURE declarations for configuration classes
Closes gh-24509
2020-02-12 16:49:02 +01:00
Rossen Stoyanchev
0a974511bd Expose awaitTerminationMillis presion
Closes gh-24496
2020-02-11 14:02:50 +00: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
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
59e250c93c Consistent use of SCOPE_PROTOTYPE and SCOPE_SINGLETON constants
Closes gh-19905
2019-11-24 13:49:43 +01:00
Sam Brannen
fd6efb9a65 Polishing 2019-11-19 15:53:20 +01:00
Sam Brannen
8df3afd0b6 Polish contribution
See gh-23895
2019-11-14 13:26:38 +01:00
monosoul
a0e4ac39bf Inverse condition to fix ISO-formatted Instant parsing
Prior to this commit, InstantFormatter was able to properly serialize
an Instant that is far in the future (or in the past), but it could not
properly deserialize it, because in such scenarios an ISO-formatted
Instant starts with a +/- sign.

This commit fixes this issue, while maintaining the previous contract,
and also introduces tests for InstantFormatter.

Closes gh-23895
2019-11-14 09:59:42 +01:00
Juergen Hoeller
3dc5e7b1d5 Avoid String concatenation for lookup in StaticMessageSource
Closes gh-22451
2019-11-13 23:41:26 +01:00
stsypanov
f2b3953d76 Use array.clone() instead of manual array creation 2019-11-13 13:53:42 +01:00
Juergen Hoeller
f61d728db9 Fallback Locale other than the system Locale through setDefaultLocale
Closes gh-23977
2019-11-13 13:48:08 +01:00
Juergen Hoeller
c4ec6aea68 Fix Checkstyle violations
See gh-23784
2019-11-11 17:18:52 +01:00
Steven Schlansker
fc55e66d50 ApplicationListenerMethodAdapter: gracefully handle beans which are actually NullBean
Currently, if you have an optional event listener (via a @Bean method returning `null`)
this causes the event multicaster to explode violently.  Now, we just safely skip it.
2019-11-11 15:43:29 +01:00
GungnirLaevatain
d494621ee3 avoid store all bean name 2019-11-11 15:43:05 +01:00
Sam Brannen
64dfa462a6 Fix Javadoc for SmartLifecycle.DEFAULT_PHASE regarding ordering
Closes gh-23956
2019-11-09 18:03:07 +01:00
stsypanov
f5ae3c77c6 Use Method::getParameterCount where possible 2019-11-07 18:00:15 +01:00
Sam Brannen
57b4b74e7d Polish Javadoc for JMX factory beans 2019-10-31 13:55:13 +01:00
Sam Brannen
9f00eb68e9 Clean up warnings 2019-10-30 19:14:58 +01:00
Brian Clozel
4beb25b318 Reorder date formatting converter in registrar
Prior to this commit, the `DateFormatterRegistrar` would register the
annotation-based formatter before the pattern-based formatter. This
would create an issue when an application tries to convert a `String` to
an annotated `@DateTimeFormat Date`: since the converters are considered
in reversed order of registration in
`GenericConversionServicei#ConvertersForPair`, the pattern-based variant
would always be considered before the annotation-based variant,
overriding the developer's opinion.

This commit aligns the `DateFormatterRegistrar` with the
`DateTimeFormatterRegistrar` and registers the annotation-based variant
last.

Closes gh-23893
2019-10-30 17:15:59 +01:00
Juergen Hoeller
19ff7d84ab Polishing 2019-10-30 14:31:46 +01:00
Juergen Hoeller
2861fc65bd Polishing 2019-09-27 10:17:56 +02:00
Sam Brannen
f05b4625de Merge branch '5.1.x' 2019-09-26 10:55:55 +02:00
Sam Brannen
7d126d3288 Improve documentation regarding "annotated classes"
See gh-23638
2019-09-26 10:26:36 +02:00
Juergen Hoeller
1aa0ea0281 Fix nullability declarations on internal ParserStrategyUtils methods 2019-09-25 13:51:20 +02:00