igor-suhorukov
9a6fbf59c5
Polish: follow name convention - make immutable fields final
2018-02-10 12:09:19 +01:00
Stephane Nicoll
991eb4858e
Update copyright header
2018-02-09 10:16:58 +01:00
igor-suhorukov
c0b4b5787f
Change this "try" to a try-with-resources
...
Closes gh-1671
2018-02-09 10:12:55 +01:00
Juergen Hoeller
285b01fc79
Test with all-negated profile condition
...
Issue: SPR-16465
2018-02-07 14:14:11 +01:00
Juergen Hoeller
5c813a366b
Consistent use of @throws instead of @exception
2018-02-05 22:51:51 +01:00
Kamil Szymanski
61117245a6
Replace manual array copy with native method call
...
Closes gh-1606
2018-02-04 11:39:43 +01:00
Juergen Hoeller
4a1cc9ced7
Constructor-provided field values get recorded for failed binding result
...
Also, TypeMismatchExceptions get registered via BindingErrorProcessor.
Issue: SPR-16449
2018-02-02 11:33:56 +01:00
Juergen Hoeller
7772b914c6
Deep BeanCurrentlyInCreationException check in getTypeForFactoryBean
...
Issue: SPR-16427
2018-01-29 21:13:59 +01:00
Juergen Hoeller
ea5f8f5a7c
Consistently handle NoClassDefFoundError in BeanUtils and related places
...
Issue: SPR-16369
2018-01-17 20:24:57 +01:00
Juergen Hoeller
214576673a
Proper NoClassDefFoundError check against BeanUtils.instantiateClass
...
Issue: SPR-16369
2018-01-17 18:29:05 +01:00
sdeleuze
19a1477228
Fix Kotlin bean w/ default + secondary ctors handling
...
This commit polishes SPR-16022 fix in order to handle correctly
the case when primary and default constructors are the same when
a secondary constructor is defined.
Issue: SPR-16289
2018-01-10 18:29:33 +01:00
Juergen Hoeller
45828cb934
Check BeanInfoFactory for interface introspection as well
...
Issue: SPR-16322
2018-01-08 18:05:02 +01:00
Juergen Hoeller
4adc820714
Warning instead of error for non-present type filter class
...
Issue: SPR-16356
2018-01-08 13:41:23 +01:00
Juergen Hoeller
4a57e26d76
Polishing
2018-01-07 23:33:35 +01:00
Juergen Hoeller
18d90ec140
Properly handle null FactoryBean instance
...
Issue: SPR-16250
2018-01-07 23:22:56 +01:00
Juergen Hoeller
d3e0f4dd91
Consider enum subclasses as simple value types as well
...
Issue: SPR-16278
2018-01-07 23:20:09 +01:00
Juergen Hoeller
9beb97880f
Support for static field access on non-public enums
...
Issue: SPR-16284
2018-01-07 23:19:47 +01:00
Christoph Dreis
260ebeca3a
Improve performance of some string operations
...
Issue: SPR-16293
2017-12-12 17:14:24 +01:00
sdeleuze
9f1d8517ba
Polish Kotlin source code style
2017-11-21 15:59:23 +01:00
Juergen Hoeller
84699c8b9b
Document common use cases for @Order vs @Priority vs @DependsOn
...
Issue: SPR-16213
2017-11-20 12:53:37 +01:00
Juergen Hoeller
7697b398d5
Polishing
2017-11-14 17:11:16 +01:00
sdeleuze
edf8232555
Avoid implicit autowiring with Kotlin secondary ctors
...
Autowiring implicitely Kotlin primary constructors
when there are secondary constructors has side effects
on ConstructorResolver. It seems reasonable to
require explicit @Autowired annotation in such case.
With this commit, implicit autowiring of Kotlin
primary constructors is only performed when there
is a primary constructor defined alone or with
a default constructor (define explicitly or
generated via the kotlin-noarg compiler plugin
or via optional constructor parameters with default
values).
Issue: SPR-16022
2017-11-14 09:25:46 +01:00
Juergen Hoeller
b5cedd43eb
Consistent and efficient access to BeanDefinition argument values
...
Issue: SPR-16192
2017-11-13 21:51:11 +01:00
Juergen Hoeller
a5da05c3dc
Comprehensive documentation on injection point matching
...
Issue: SPR-16142
2017-11-10 20:20:13 +01:00
sdeleuze
1a246c0a67
Fix ListableBeanFactory Kotlin extensions return types
2017-11-07 13:51:53 +01:00
Juergen Hoeller
9649b0cb25
Properly resolve null beans as getBeansOfType result entries
...
Issue: SPR-16163
2017-11-06 13:27:51 +01:00
Juergen Hoeller
5f270bc432
Upgrade to SnakeYAML 1.19
2017-10-18 12:17:13 +02:00
Juergen Hoeller
91a8993895
Skip init/destroy method check for null beans
...
Issue: SPR-16063
2017-10-12 15:31:57 +02:00
Juergen Hoeller
c9d3c2690d
Properly resolve null candidates for collection injection
...
Issue: SPR-16033
2017-10-02 12:27:11 +02:00
Juergen Hoeller
ec345bf162
Revised handling of missing data class arguments
...
Includes unified detection of Kotlin's optional parameters in MethodParameter.isOptional(), reduces BeanUtils.findPrimaryConstructor to Kotlin semantics (for reuse in AutowiredAnnotationBeanPostProcessor), and finally introduces a common KotlinDetector delegate with an isKotlinType(Class) check.
Issue: SPR-15877
Issue: SPR-16020
2017-09-28 00:31:12 +02:00
Sebastien Deleuze
fb09a75c82
Improve support of Kotlin beans w/ primary and default ctors
...
This commit add the default constructor if available as
fallback after to the primary constructor.
Issue: SPR-16012
2017-09-27 11:27:00 +02:00
Juergen Hoeller
efce7902c4
Polishing
2017-09-27 01:34:11 +02:00
Juergen Hoeller
e927cae476
ObjectProvider offers ifAvailable/ifUnique variants with Consumer
...
Issue: SPR-16001
2017-09-25 22:45:15 +02:00
Sebastien Deleuze
3996f33399
Support non-standard classes in Kotlin reflection discovery methods
...
Issue: SPR-15999
2017-09-24 23:10:40 +02:00
Juergen Hoeller
9190b76ab9
Latest dependency updates (POI 3.17, Rome 1.8, EhCache 3.4, Caffeine 2.5.6, RxJava 2.1.4, Tomcat 8.5.21, JRuby 9.1.13, Rhino 1.7.7.2)
2017-09-23 11:28:19 +02:00
Juergen Hoeller
7ae59d0c2a
Nullability refinements on private and static methods
...
Based on IntelliJ IDEA 2017.3 introspection results.
Issue: SPR-15756
2017-09-22 18:22:14 +02:00
Sebastien Deleuze
d8e52c0413
Refine BeanUtils#findPrimaryConstructor behavior
...
Issue: SPR-15673
2017-09-22 13:40:37 +02:00
Sebastien Deleuze
1bc93e3d0f
Revisit nullability annotations
...
This commit introduces the following changes.
1) It adds a new Spring @NonNull annotation which allows to apply
@NonNullApi semantic on a specific element, like @Nullable does.
Combined with @Nullable, it allows partial null-safety support when
package granularity is too broad.
2) @Nullable and @NonNull can apply to ElementType.TYPE_USE in order
to be used on generic type arguments (SPR-15942).
3) Annotations does not apply to ElementType.TYPE_PARAMETER anymore
since it is not supported yet (applicability for such use case is
controversial and need to be discussed).
4) @NonNullApi does not apply to ElementType.FIELD anymore since in a
lot of use cases (private, protected) it is not part for the public API
+ its usage should remain opt-in. A dedicated @NonNullFields annotation
has been added in order to set fields default to non-nullable.
5) Updated Javadoc and reference documentation.
Issue: SPR-15756
2017-09-15 13:26:41 +02:00
Juergen Hoeller
4371350b5d
Polishing
2017-09-10 21:56:31 +02:00
Stephane Nicoll
71182ab54b
Provide hierarchy traversal support for getBeanNamesForAnnotation
...
Issue: SPR-15923
2017-09-03 08:19:34 +02:00
Brian Clozel
397fd24849
Revert "Leverage Kotlin plugin dependency management"
...
This reverts commit 3e2f6c848a
.
2017-08-22 21:29:39 +02:00
Sebastien Deleuze
3e2f6c848a
Leverage Kotlin plugin dependency management
2017-08-22 17:35:57 +02:00
Sebastien Deleuze
ef68ccdbd8
Add support for Kotlin autowired ctors w/ optional params
...
This commit adds support for autowired constructor parameters
on Kotlin classes with optional parameters. If some constructor
parameters are not available, optional parameter default values
will be used instead. Both explicit @Autowired annotated constructor
and implicit single constructor automatically autowired are supported.
Issue: SPR-15847
2017-08-22 17:05:18 +02:00
Sebastien Deleuze
ab6430569d
Efficient Kotlin metadata detection
...
Follow-up of 3991ab4a23
.
Issue: SPR-15673
2017-08-22 16:22:25 +02:00
Brian Clozel
41cbc4670f
Refactor the spring-beans build
...
This commit merges back the "spring-beans-groovy" module into the main
"spring-beans" one. The build is configured so:
* Java and Groovy sources are jointly compiled
* Kotlin sources are compiled after
With this change, the `MergePlugin` is not used anymore in the project
build and therefore is removed.
The `DetectSplitPackagesPlugin` wasn't applied so it's been removed as
well.
Issue: SPR-15885
2017-08-21 14:41:46 +02:00
Juergen Hoeller
3991ab4a23
Efficient Kotlin metadata detection
...
Issue: SPR-15673
2017-08-21 01:33:20 +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
73cf07e9a4
Fix overridden methods nullability
...
Issue: SPR-15869
2017-08-17 15:02:59 +02:00
Sebastien Deleuze
ef175d7ca6
Fix BeanUtils#instantiateClass w/ Kotlin + noarg constructor
...
Issue: SPR-15851
2017-08-14 15:14:02 +02:00
Juergen Hoeller
adeb521ce4
Polishing
2017-08-08 17:27:28 +02:00
Juergen Hoeller
09f5c71374
Consistent nullability for BeanDefinitionBuilder setters
...
Issue: SPR-15841
2017-08-08 17:26:45 +02:00
Sebastien Deleuze
ed6fe2b723
Upgrade to Kotlin 1.1.4-eap-33
...
Issue: SPR-15814
2017-07-24 17:29:02 +02:00
Juergen Hoeller
40df7b6eca
Polishing
...
Issue: SPR-15673
2017-07-20 13:16:50 +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
Juergen Hoeller
46eba3dbfa
Nullability fine-tuning around declaration inconsistencies
...
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 22:22:20 +02:00
Juergen Hoeller
9fc4fb10b0
Nullability fine-tuning around bean properties
...
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 11:43:58 +02:00
Sebastien Deleuze
fb4ddb0746
Make getters and setters null-safety consistent
...
This commit ensure that null-safety is consistent between
getters and setters in order to be able to provide beans
with properties with a common type when type safety is
taken in account like with Kotlin.
It also add a few missing property level @Nullable
annotations.
Issue: SPR-15792
2017-07-19 09:07:56 +02:00
Juergen Hoeller
fd2b4f2427
DefaultListableBeanFactory falls back to empty DLBF instance on deserialization
...
Issue: SPR-15766
(cherry picked from commit c9ffa64
)
2017-07-13 13:19:45 +02:00
Juergen Hoeller
6c0ae1ec9b
Clarified role of postProcessAfterInstantiation
...
Issue: SPR-15732
2017-07-05 00:01:38 +02:00
Juergen Hoeller
6534359473
FactoryBean object cache cleared on shutdown
...
Issue: SPR-15722
2017-06-30 20:57:15 +02:00
Juergen Hoeller
cc74a2891a
@Nullable all the way: null-safety at field level
...
This commits extends nullability declarations to the field level, formalizing the interaction between methods and their underlying fields and therefore avoiding any nullability mismatch.
Issue: SPR-15720
2017-06-30 01:54:16 +02:00
Sebastien Deleuze
d728d597f2
Add missing license headers in Kotlin files
2017-06-27 14:39:26 +02:00
Sebastien Deleuze
04d5a2951c
Remove KClass based Kotlin extensions
...
Issue: SPR-15660
2017-06-13 18:43:59 +02:00
Stephane Nicoll
58242f2249
Polish
2017-06-13 10:13:14 +02:00
Stephane Nicoll
fc64b8040f
Polish "Replace relevant code with lambda"
...
Closes gh-1454
2017-06-13 09:42:20 +02:00
diguage
4b1478d830
Replace relevant code with lambda
...
See gh-1454
2017-06-13 08:55:38 +02:00
Stephane Nicoll
451b419624
Polish "Use Map#forEach instead of Map#entrySet#forEach"
...
Closes gh-1449
2017-06-12 14:37:33 +02:00
diguage
2efa06237a
Use Map#forEach instead of Map#entrySet#forEach
...
See gh-1449
2017-06-12 14:37:33 +02:00
diguage
c1d44d9a34
Use the diamond syntax
...
Closes gh-1450
2017-06-12 09:19:06 +02:00
Stephane Nicoll
27aabb15f9
Polish "Refact iterator of Map with Java 8 forEach"
...
Closes gh-1451
2017-06-12 08:53:56 +02:00
diguage
dab7a7f0ee
Refact iterator of Map with Java 8 forEach
...
See gh-1451
2017-06-12 08:11:32 +02:00
Juergen Hoeller
e2e0410570
Method-level javadoc on XmlReaderContext etc
2017-06-11 12:03:05 +02:00
Juergen Hoeller
c0550f7eb6
Documented AbstractBeanFactory nullability warning
...
Issue: SPR-15540
2017-06-09 20:46:15 +02:00
Sebastien Deleuze
86580b2358
Polishing
2017-06-09 01:49:56 +03:00
Sebastien Deleuze
8579ae66fc
Add comprehensive tests of Kotlin extensions
...
This commit also removes extensions hidden by Java API (varargs).
2017-06-09 01:01:16 +03:00
Juergen Hoeller
fd53d2a51a
Consistent use of @Nullable in spring-test
...
This commit also removes nullability from two common spots: ResolvableType.getType() and TargetSource.getTarget(), both of which are never effectively null with any regular implementation. For such scenarios, a non-null empty type/target is the cleaner contract.
Issue: SPR-15540
2017-06-08 22:52:59 +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
1f28825f9d
Add more @Nullable parameters based on null usage
...
Issue: SPR-15540
2017-05-31 21:42:23 +02:00
Sebastien Deleuze
c3e6afb879
Improve null-safety to fix some Spring Boot warnings
...
Issue: SPR-15540
2017-05-31 17:14:49 +02:00
Sebastien Deleuze
b47d713e14
Add missing @Nullable annotations on parameters
...
Issue: SPR-15540
2017-05-31 16:56:08 +02:00
Sebastien Deleuze
87598f48e4
Introduce null-safety of Spring Framework API
...
This commit introduces 2 new @Nullable and @NonNullApi
annotations that leverage JSR 305 (dormant but available via
Findbugs jsr305 dependency and already used by libraries
like OkHttp) meta-annotations to specify explicitly
null-safety of Spring Framework parameters and return values.
In order to avoid adding too much annotations, the
default is set at package level with @NonNullApi and
@Nullable annotations are added when needed at parameter or
return value level. These annotations are intended to be used
on Spring Framework itself but also by other Spring projects.
@Nullable annotations have been introduced based on Javadoc
and search of patterns like "return null;". It is expected that
nullability of Spring Framework API will be polished with
complementary commits.
In practice, this will make the whole Spring Framework API
null-safe for Kotlin projects (when KT-10942 will be fixed)
since Kotlin will be able to leverage these annotations to
know if a parameter or a return value is nullable or not. But
this is also useful for Java developers as well since IntelliJ
IDEA, for example, also understands these annotations to
generate warnings when unsafe nullable usages are detected.
Issue: SPR-15540
2017-05-27 08:57:01 +02:00
Juergen Hoeller
f985f71daf
Polishing
2017-05-12 12:50:17 +02:00
Juergen Hoeller
652266bcc2
Polishing
2017-05-04 22:27:36 +02:00
Juergen Hoeller
27057889f8
Polishing
2017-05-03 13:45:29 +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
Stephane Nicoll
1b9e12f52f
Polish "Use Java 8 forEach method on Map"
...
Closes gh-1404
2017-04-28 11:07:08 +02:00
Jon Borenstein
13dc0cd828
Use Java 8 forEach method on Map
2017-04-28 11:07:08 +02:00
Juergen Hoeller
c668d9a473
Polishing
2017-04-26 18:20:19 +02:00
Juergen Hoeller
a95843a068
Dependency tracking for Supplier-created beans
...
Issue: SPR-15417
2017-04-07 18:01:28 +02:00
Sebastien Deleuze
e2fd398bad
Specify explicitly Kotlin extensions return type
...
The main purpose is to specify nullability.
2017-03-30 14:25:13 +02:00
Sam Brannen
7a01771a45
Polishing
2017-03-28 19:27:03 +02:00
Sebastien Deleuze
9963c4a495
Fix Kotlin warnings
2017-03-10 10:35:30 +01: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
stonio
7d062df992
Use String#isEmpty()
...
Closes gh-1335
2017-02-22 11:55:17 +01:00
Juergen Hoeller
0da8dee289
Polishing
2017-02-16 16:24:13 +01:00
Juergen Hoeller
8d707eb530
Polishing
2017-02-16 15:37:31 +01:00
Juergen Hoeller
9543384d9e
Avoid deprecated comparators in tests
...
Issue: SPR-14779
2017-02-16 15:36:27 +01:00
Kazuki Miyahara
e95391765c
Fix typo in Javadoc
2017-02-16 18:22:44 +09:00
Stephane Nicoll
d4dd8baed5
Update copyright header
...
Closes gh-1327
2017-02-14 10:39:54 +01:00
hengyunabc
2723bd092c
Fix typo
...
See gh-1327
2017-02-14 10:36:14 +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
1b2dc3638f
Revisit Assert to avoid single-arg assert methods (with refined messages)
...
Issue: SPR-15196
2017-01-30 22:15:55 +01:00
Juergen Hoeller
4a57d4512e
Reset cached ResolvableType on increaseNestingLevel/setContainingClass
...
Issue: SPR-15160
2017-01-25 00:30:05 +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
ed40b1c8ee
Remove outdated abstractions/delegates from core/util
...
Issue: SPR-15159
2017-01-23 13:41:55 +01:00
Juergen Hoeller
ac6aa53031
Drop outdated BeanFactoryLocator / beanRefContext.xml mechanism
...
Issue: SPR-15154
2017-01-17 13:58:37 +01:00
Juergen Hoeller
46fc7fba8f
Polishing
2017-01-16 23:08:44 +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
9e6aa0ff59
BeanDefinitionBuilder supports factory method on factory bean
...
Issue: SPR-15098
2017-01-12 21:15:22 +01:00
Sebastien Deleuze
0a988fd2b1
Remove object wrappers in Kotlin extensions
...
This commit also improve significantly Kotlin extensions
documentation.
Issue: SPR-15127
2017-01-11 08:52:01 +01:00
Sebastien Deleuze
4f1fe74912
Polish ListableBeanFactoryExtension
2017-01-11 07:57:02 +01:00
Sebastien Deleuze
f8461d856a
Support Gradle-style Kotlin bean API
...
val context = GenericApplicationContext {
registerBean<Foo>()
registerBean { Bar(it.getBean<Foo>()) }
}
Issue: SPR-15126
2017-01-10 21:43:27 +01:00
Juergen Hoeller
e8a082fbe1
Clarified setAutowireCandidate semantics (plus attribute reordering in BeanDefinition)
...
Issue: SPR-15072
2016-12-30 11:30:18 +01:00
Juergen Hoeller
fc629bb508
Polishing
2016-12-29 22:39:36 +01:00
Juergen Hoeller
edc62be231
@Scheduled reliably applies after other post-processors and shuts down before TaskScheduler
...
Issue: SPR-14692
Issue: SPR-15067
2016-12-29 22:35:10 +01:00
Juergen Hoeller
209e7a700d
Avoid FactoryBean initialization on isSingleton check for decorated bean definition
...
Issue: SPR-14892
Issue: SPR-15042
2016-12-28 17:27:06 +01:00
Sebastien Deleuze
6a850ee688
Polishing
2016-12-27 10:08:12 +01:00
Juergen Hoeller
64d6561cbb
AbstractNestablePropertyAccessor's setPropertyValue refactored into several delegate methods
...
Issue: SPR-15053
2016-12-26 19:47:26 +01:00
Sebastien Deleuze
ff675f5226
Add Kotlin extensions for bean registration and retrieval
...
Issue: SPR-15048
2016-12-26 14:21:10 +01:00
Juergen Hoeller
f805427629
Detect generic type match behind interface-based proxy as well
...
Issue: SPR-14097
2016-12-26 11:23:07 +01:00
Juergen Hoeller
fd41f63ec0
Clarify programmatic contract (no annotation-driven injection)
...
Issue: SPR-8704
2016-12-26 10:57:50 +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
e788b8467d
GenericApplicationContext offers Supplier-based registration with BeanDefinitionCustomizer callback
...
Issue: SPR-14832
2016-12-23 12:26:47 +01:00
Juergen Hoeller
154ef8bf10
Polishing
2016-12-20 19:57:52 +01:00
Juergen Hoeller
3ee6286eb5
Support for functional instance supplier callback at BeanDefinition level
...
Issue: SPR-14832
2016-12-18 21:05:45 +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
39d2769bd0
Autodetect Kotlin nullability for optional injection points (analogous to java.util.Optional)
...
Built-in support in MethodParameter and DependencyDescriptor supersedes our separate KotlinUtils helper.
Issue: SPR-14951
2016-12-13 17:38:58 +01:00
Juergen Hoeller
8b5ee4ef91
AutowiredAnnotationBeanPostProcessor tolerates annotated no-arg constructors
...
Issue: SPR-15005
2016-12-12 22:26:24 +01:00
Juergen Hoeller
547b9638dc
Collection injection may refer back to factory methods on same bean again
...
Issue: SPR-14996
2016-12-09 23:09:10 +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
b22a59a0c4
Polishing
2016-11-24 15:32:06 +01:00
Juergen Hoeller
85b0ce1ef7
Avoid defensive checks against java.time API
...
Issue: SPR-13188
2016-11-22 14:55:03 +01:00
Juergen Hoeller
da63898d5f
Polishing
2016-11-21 17:36:04 +01:00
Juergen Hoeller
b3cd1ad7f1
Refined throwing of BeanCreationExceptions (and reflection exceptions)
...
Issue: SPR-14883
2016-11-07 19:03:18 +01:00
Juergen Hoeller
cf479bf893
Consistent throwing of BeanCreationExceptions (and reflection exceptions)
...
Issue: SPR-14883
(cherry picked from commit b42d731
)
2016-11-07 18:00:21 +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
8053fefea8
Consistent support for early placeholder resolution in properties locations
...
Issue: SPR-10502
2016-11-03 14:33:48 +01:00
Juergen Hoeller
dc080cb1be
Revised NoSuchBeanDefinitionException message and ResolvableType handling
...
Includes consistent quoting of qualified type names in related classes.
Issue: SPR-14831
2016-10-28 23:39:05 +02:00
Juergen Hoeller
36332441ae
DefaultListableBeanFactory allows early type matching against ScopedProxyFactoryBean
...
Issue: SPR-14816
2016-10-28 23:37:58 +02:00
Juergen Hoeller
20419d72ef
Tightened StringValueResolver contract
...
Issue: SPR-14842
2016-10-28 15:28:42 +02:00
Stephane Nicoll
3a34cdba81
Polish contribution
...
Closes gh-1203
2016-10-26 09:49:50 +02:00
Vitalii
2980e59298
Fix javadoc syntax
...
See gh-1203
2016-10-26 09:46:14 +02:00
Stephane Nicoll
827bc78e34
Polish
2016-10-24 20:12:18 +02:00
Stephane Nicoll
b7d85f8ebc
Expose ResolvableType in NoSuchBeanDefinitionException
...
This commit improves NoSuchBeanDefinitionException to expose a full
ResolvableType rather than a raw class if a lookup by type failed. This
allows to know more about the underlying type and is typically useful
when a collection or map is required as the relevant generic type is the
actual bean that wasn't found.
Issue: SPR-14831
2016-10-24 17:43:54 +02:00
Juergen Hoeller
3726c6f18d
Polishing
2016-10-21 12:26:27 +02:00
Stephane Nicoll
fc8bad36c9
Fix formatting
...
Closes gh-1206
2016-10-15 11:55:07 +03:00
Philippe Marschall
ae5b0c6fb5
Replace J2EE with Java EE
...
String with version 5 the name of Java Platform, Enterprise Edition
changed from J2EE to Java EE. However a lot of the documentation still
uses the term J2EE.
This commit includes the following changes:
* replace J2EE with Java EE where appropriate
This is not a blind search and replace. The following occurrences
remain unchanged:
* references to old J2EE releases, most notably 1.3 and 1.4.
* references to "Expert One-On-One J2EE Design and Development"
* references to "Core J2EE patterns"
* XML namespaces
* package names
Issue: SPR-14811
See gh-1206
2016-10-15 11:49:00 +03:00
Juergen Hoeller
c64f39943f
Polishing
2016-09-26 17:20:30 +02:00
Juergen Hoeller
74c618892e
YamlPropertiesFactoryBean consistently exposes String values
...
Issue: SPR-14737
2016-09-25 21:05:40 +02:00
Juergen Hoeller
2b2cc2d1ca
Rearranged field order in RootBeanDefinition
...
Issue: SPR-14725
2016-09-16 10:34:05 +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
f592599349
Polishing
...
(cherry picked from commit 54db496
)
2016-09-13 23:48:41 +02:00
Juergen Hoeller
c69e6a36f7
Revised IllegalArgumentException handling for Formatter parse calls
...
Issue: SPR-14661
2016-09-13 21:55:20 +02:00
Juergen Hoeller
0c2e8a6246
Consistent callbacks for TypeFilters, ImportSelectors and ImportBeanDefinitionRegistrars
...
Issue: SPR-14686
2016-09-13 21:49:24 +02:00
Juergen Hoeller
fa820bc0c9
PropertyValue stores source object in common superclass field
...
Issue: SPR-8337
2016-09-13 21:29:05 +02:00
Juergen Hoeller
41f7680e20
Polishing
2016-08-25 00:20:18 +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
3d297b10e9
NamedBeanHolder enforces bean name
...
Issue: SPR-7549
2016-08-24 14:29:45 +02:00
Juergen Hoeller
93d2287894
UnsatisfiedDependencyException avoids duplicate nested exception message
...
Issue: SPR-14607
2016-08-23 13:21:40 +02:00
Juergen Hoeller
ab0d523cc0
Polishing
...
(cherry picked from commit 1932a9d
)
2016-08-17 21:54:40 +02:00
Juergen Hoeller
022b013563
Revised NoSuchBeanDefinitionException message for proper array class names
...
Issue: SPR-14595
2016-08-17 17:13:28 +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
214c919742
AspectJ bean pointcut supports qualifier match
...
Issue: SPR-11217
2016-08-17 00:43:41 +02:00
Juergen Hoeller
1ac8e1c949
Polishing
...
(cherry picked from commit a4a71a8
)
2016-08-11 23:50:54 +02:00
Juergen Hoeller
8b5d3559f5
Avoid stack overflow in case of chained factory-bean references to FactoryBean class
...
Issue: SPR-14551
2016-08-11 22:56:14 +02:00
Juergen Hoeller
6157fad91f
PersistenceAnnotationBeanPostProcessor obtains default EntityManagerFactory via getBean(Class) algorithm
...
Issue: SPR-7549
2016-08-11 22:42:06 +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
b9ab895743
Inferred generics for newSetFromMap arrangements
...
Issue: SPR-13188
2016-07-26 21:26:31 +02:00
Juergen Hoeller
e03dea1d64
Polishing
2016-07-26 17:15:19 +02:00
Stephane Nicoll
bfa48d551d
Polish contribution
...
Closes gh-1112
2016-07-25 12:34:42 +02:00
fisache
3ccf653174
Polish Javadoc
...
See gh-1112
2016-07-25 12:30:31 +02:00
Juergen Hoeller
249b798059
Direct reference to JDK 7 AutoCloseable interface
...
Issue: SPR-13188
2016-07-25 12:06:35 +02:00
Juergen Hoeller
ed49ce838e
Executable instead of Object for constructor or factory method
...
Issue: SPR-13188
2016-07-24 15:34:03 +02:00
Juergen Hoeller
4a85309a04
Consistent throwing of BeanNotOfRequiredTypeException even for existing proxy
...
Issue: SPR-14504
2016-07-24 15:31:00 +02:00
Juergen Hoeller
725fb3219f
Polishing
2016-07-20 18:06:31 +02:00
Juergen Hoeller
0e3f0bd9d0
Avoid JDK proxy against CGLIB Factory interface and assert required type when resolving dependency
...
Issue: SPR-14478
2016-07-20 18:05:51 +02:00
Juergen Hoeller
938b56c0fe
BeanWrapperImpl.setBeanInstance correctly exposes root object
...
Issue: SPR-14474
2016-07-20 18:02:23 +02:00
Juergen Hoeller
99be15f58b
Revise encoding steps towards use of JDK Charset and StandardCharsets
...
Issue: SPR-14492
2016-07-19 23:43:06 +02:00
Juergen Hoeller
a4743c07d4
Polishing
2016-07-19 20:09:00 +02:00
Juergen Hoeller
aaac199e8b
Consistently use constructor-based instantiation instead of Class.newInstance / BeanUtils.instantiate
...
Issue: SPR-14486
2016-07-19 19:21:06 +02:00
Juergen Hoeller
91ac0bfefa
Reinstated support for spring-beans.dtd (streamlined like xsd)
...
Issue: SPR-13499
2016-07-19 17:46:17 +02:00
Juergen Hoeller
c43e7497c1
Fixed typo: "occured"->"occurred"
2016-07-08 15:12:16 +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
a1f5fb53db
Java 8 getParameterCount() instead of getParameterTypes().length
...
Issue: SPR-13188
2016-07-07 01:04:24 +02:00
Juergen Hoeller
39e3f2ebf6
MethodParameter supports Java 8 Executable/Parameter and validates parameter indexes
...
Also, equals insists on the same class now, differentiating from SynthesizingMethodParameter.
Issue: SPR-14055
Issue: SPR-13456
Issue: SPR-14438
2016-07-07 00:37:52 +02:00
Juergen Hoeller
da9c24c41e
Polishing
2016-07-06 18:11:33 +02:00
Juergen Hoeller
5890758fd0
Avoid canonicalName call for already-seen bean name
...
Issue: SPR-14433
2016-07-06 15:12:18 +02:00
Juergen Hoeller
76dedd7ca2
FactoryBean, BeanPostProcessor and HandlerInterceptor variants declared with default methods
...
Issue: SPR-14432
2016-07-06 15:10:08 +02:00
Stephane Nicoll
e4b0486c5a
Add @FunctionalInterface on candidate interfaces
...
Issue: SPR-14432
2016-07-06 14:32:13 +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
Sam Brannen
2bae0613a3
Ensure code compiles with Eclipse JDT
2016-07-05 19:19:09 +02:00
Sam Brannen
1391248ea6
Introduce log4j 2 for Spring's test suite
...
This commit adds a test runtime dependency on log4j 2 for every project
and migrates all log4j.properties files to log4j2-test.xml files.
Issue: SPR-14431
2016-07-05 19:19:09 +02:00
Stephane Nicoll
00d2606b00
Explicit type can be replaced by <>
...
Issue: SPR-13188
2016-07-05 17:00:34 +02:00
Juergen Hoeller
b5db5d3aac
Broadly remove deprecated core classes and methods
...
Issue: SPR-14430
2016-07-05 15:52:49 +02:00