Stephane Nicoll
71182ab54b
Provide hierarchy traversal support for getBeanNamesForAnnotation
...
Issue: SPR-15923
2017-09-03 08:19:34 +02:00
Juergen Hoeller
ac5e2599f7
Consistent overriding for all variants of init/destroy method inheritance
...
Issue: SPR-15532
2017-08-18 00:13:49 +02:00
Juergen Hoeller
b94302b5bd
Enforce non-null value from getBean and at injection points
...
Bean-derived null values may still get passed into bean properties and injection points but only if those are declared as non-required. Note that getBean will never return null; a manual bean.equals(null) / "null".equals(bean.toString()) check identifies expected null values now. This will only ever happen with custom FactoryBeans or factory methods returning null - and since all common cases are handled by autowiring or bean property values in bean definitions, there should be no need to ever manually check for such a null value received from getBean.
Issue: SPR-15829
2017-08-18 00:11:35 +02:00
Sebastien Deleuze
fa4d139684
Support instantiating Kotlin classes with optional parameters
...
This commit updates BeanUtils class in order to add Kotlin optional
parameters with default values support to the immutable data classes
support introduced by SPR-15199.
Issue: SPR-15673
2017-07-20 10:44:06 +02:00
Stephane Nicoll
58242f2249
Polish
2017-06-13 10:13:14 +02:00
Juergen Hoeller
f813712f5b
Consistent use of @Nullable across the codebase (even for internals)
...
Beyond just formally declaring the current behavior, this revision actually enforces non-null behavior in selected signatures now, not tolerating null values anymore when not explicitly documented. It also changes some utility methods with historic null-in/null-out tolerance towards enforced non-null return values, making them a proper citizen in non-null assignments.
Some issues are left as to-do: in particular a thorough revision of spring-test, and a few tests with unclear failures (ignored as "TODO: NULLABLE") to be sorted out in a follow-up commit.
Issue: SPR-15540
2017-06-07 14:19:15 +02:00
Sebastien Deleuze
b47d713e14
Add missing @Nullable annotations on parameters
...
Issue: SPR-15540
2017-05-31 16:56:08 +02:00
Juergen Hoeller
d74542ed21
Honor @Autowired(required=false) at parameter level
...
Includes a revision of the AutowireCandidateResolver SPI with default methods.
Issue: SPR-15268
2017-05-03 13:42:16 +02:00
Juergen Hoeller
6556b40c2b
Upgrade to SnakeYAML 1.18 (with updated duplicate key tests)
...
Includes updates to Caffeine 2.4, Jetty 9.4.2, Undertow 1.4.11, RxJava 1.2.7 and Groovy 2.4.9.
2017-02-28 13:19:33 +01:00
Juergen Hoeller
0da8dee289
Polishing
2017-02-16 16:24:13 +01:00
Juergen Hoeller
9543384d9e
Avoid deprecated comparators in tests
...
Issue: SPR-14779
2017-02-16 15:36:27 +01:00
Juergen Hoeller
65d8d698cd
Test for ObjectFactory injection at constructor level
...
Issue: SPR-15222
2017-02-10 10:42:48 +01:00
Juergen Hoeller
5e946c2700
Consistent type variable resolution for arrays/collections (in particular at field level)
...
Dropping GenericCollectionTypeResolver in favor of direct ResolvableType usage.
Issue: SPR-15160
2017-01-24 18:00:17 +01:00
Juergen Hoeller
ac6aa53031
Drop outdated BeanFactoryLocator / beanRefContext.xml mechanism
...
Issue: SPR-15154
2017-01-17 13:58:37 +01:00
Juergen Hoeller
32fc855dd1
Introspect FactoryBean class declaration if no early instantiation possible
...
Issue: SPR-15125
2017-01-16 12:00:38 +01:00
Juergen Hoeller
1cb381e9a7
Consistent deprecation markers on JDK 9
2017-01-13 10:53:20 +01:00
Juergen Hoeller
8084da59a7
Map resolution for multiple beans applies to plain Map interface declaration only
...
Issue: SPR-15117
2017-01-12 21:15:41 +01:00
Juergen Hoeller
d3f97e3092
ObjectProvider offers getIfAvailable/getIfUnique variants with default supplier
...
Issue: SPR-14980
2016-12-23 18:49:12 +01:00
Juergen Hoeller
12aa14ddbc
Support @Nullable annotations as indicators for optional injection points
...
Issue: SPR-15028
2016-12-18 21:04:08 +01:00
Juergen Hoeller
4c005e6336
ResolvableType-based matching respects generic factory method return type
...
Includes consistent use of ResolvableType.resolve() wherever applicable.
Issue: SPR-15011
2016-12-17 23:10:48 +01:00
Juergen Hoeller
8b5ee4ef91
AutowiredAnnotationBeanPostProcessor tolerates annotated no-arg constructors
...
Issue: SPR-15005
2016-12-12 22:26:24 +01:00
Juergen Hoeller
ac5933a7ac
Various DefaultListableBeanFactory clarifications
...
* getBeanDefinitionNames defensively returns a copy of the bean definition names array.
* copyConfigurationFrom provides an independent AutowireCandidateResolver instance and copies a ConversionService and dependency comparator configuration as well.
* findAutowireCandidates only considers a self reference fallback for direct dependency declarations, not as a collection element.
Issue: SPR-14897
Issue: SPR-14921
Issue: SPR-14965
2016-11-30 22:07:55 +01:00
Juergen Hoeller
7f4904ed22
Avoid deprecated Mockito methods
...
Issue: SPR-14880
2016-11-04 20:39:53 +01:00
Juergen Hoeller
84d3808b3b
Upgrade to Mockito 2.2
...
Issue: SPR-14880
2016-11-03 22:53:35 +01:00
Juergen Hoeller
74c618892e
YamlPropertiesFactoryBean consistently exposes String values
...
Issue: SPR-14737
2016-09-25 21:05:40 +02:00
Stephane Nicoll
2b0bf9f04a
Add Qualified element on RootBeanDefinition
...
Improve RootBeanDefinition to specify an AnnotatedElement that holds
qualifier information. When such element is present, any qualifier that
it defines will be used to find a matching candidate.
Issue: SPR-14725
2016-09-16 09:20:31 +02:00
Juergen Hoeller
c4fcdb6864
DefaultListableBeanFactory does not trigger early candidate creation ahead of primary bean selection
...
Issue: SPR-14611
2016-08-24 22:56:47 +02:00
Juergen Hoeller
ab0d523cc0
Polishing
...
(cherry picked from commit 1932a9d )
2016-08-17 21:54:40 +02:00
Juergen Hoeller
4b06b60007
RootBeanDefinition accepts ResolvableType for target type hint
...
Issue: SPR-14580
2016-08-17 16:59:16 +02:00
Juergen Hoeller
d69afaada8
PathEditor tries file system path in case of non-existing resource
...
Issue: SPR-14549
2016-08-08 13:46:57 +02:00
Juergen Hoeller
d128830605
Test injection for @Lookup-declaring bean
...
Issue: SPR-14550
2016-08-08 13:21:52 +02:00
Juergen Hoeller
e03dea1d64
Polishing
2016-07-26 17:15:19 +02:00
Juergen Hoeller
23c2b6ad41
Added PathEditor for NIO file system resolution
...
Issue: SPR-14436
2016-07-08 14:58:38 +02:00
Juergen Hoeller
bc2c22d51e
Streamline XML namespace support towards unversioned schemas
...
This commit also removes support code for outdated options which were only available in older schema versions.
Issue: SPR-13499
2016-07-05 20:50:03 +02:00
Stephane Nicoll
00d2606b00
Explicit type can be replaced by <>
...
Issue: SPR-13188
2016-07-05 17:00:34 +02:00
Juergen Hoeller
c4c941c43f
Convert comma-separated string into list of classes analogous to existing support for class array
...
Issue: SPR-14415
2016-06-30 14:02:51 +02:00
Juergen Hoeller
cf0a0cd5d8
BeanWrapper avoids StringIndexOutOfBoundsException for incompletely quoted keys
...
Issue: SPR-14293
2016-05-30 15:15:27 +02:00
Juergen Hoeller
ce2f28da49
CachedIntrospectionResults explicitly introspects implemented interfaces (for Java 8 default methods)
...
Issue: SPR-14198
2016-04-27 15:39:00 +02:00
Juergen Hoeller
5c1d3fca15
BeanFactory does not unwrap java.util.Optional for top-level bean
...
Issue: SPR-14121
2016-04-07 14:18:30 +02:00
Juergen Hoeller
edea66a967
Further tests for getBeanNamesForType(ResolvableType)
...
Issue: SPR-14097
2016-04-04 14:58:30 +02:00
Juergen Hoeller
852212d0c5
Polishing
2016-03-24 19:57:54 +01:00
Juergen Hoeller
517ebd1d3e
Consistent formatting
2016-03-24 19:22:50 +01:00
Juergen Hoeller
b6dd8a9233
Consistent UnsatisfiedDependencyException exposure with injection point metadata
...
Issue: SPR-13968
2016-02-25 21:36:49 +01:00
Juergen Hoeller
ed98393fb2
SmartObjectFactory renamed to ObjectProvider (extends ObjectFactory)
...
Issue: SPR-13943
Issue: SPR-13956
2016-02-23 14:30:30 +01:00
Juergen Hoeller
a7ad49adcf
Placeholder configurers allow for trimming of property values
...
Issue: SPR-5839
2016-02-19 19:19:39 +01:00
Juergen Hoeller
890819f886
SmartObjectFactory provides getObject(args) variant as well
...
Issue: SPR-13956
2016-02-19 14:39:55 +01:00
Juergen Hoeller
1b53edfc5e
DefaultListableBeanFactory skips fallback match attempt for Collection/Map beans
...
Issue: SPR-13963
2016-02-19 00:05:28 +01:00
Juergen Hoeller
343bb2f130
Support for SmartObjectFactory injection points with programmatic optionality and lenient not-unique handling
...
Issue: SPR-13943
2016-02-12 17:45:25 +01:00
Juergen Hoeller
903ae48382
DisposableBeanAdapter ignores bridge method conflicts
...
Issue: SPR-13922
2016-02-08 13:20:48 +01:00
Sam Brannen
81f68463ec
Clean up warnings in Gradle build
2016-02-03 18:42:30 +01:00