Empty Maps are preferably initialized without capacity (not initializing them at all or lazily initializing with default capacity when needed).
Issue: SPR-17105
Introduces getBeanProvider(Class) and getBeanProvider(ResolvableType), also narrowing getBean(String, Class) and isTypeMatch(String, Class) to a non-null Class argument and enriching NoUniqueBeanDefinitionException with a full ResolvableType. In addition, ObjectProvider supports iterable/stream access for collection-style resolution of multiple matching beans now, and collection injection falls back to an empty collection in a single-constructor case with non-null arguments.
Issue: SPR-17075
Issue: SPR-11419
Issue: SPR-15338
This commit includes an optimization of BeansUtils#instantiateClass
that favors Java reflection for default constructors before leveraging
Kotlin one for finding primary constructors and avoids Kotlin related
conditions when running in Java.
Issue: SPR-17069
This revision limits serializability of derived interfaces, superclasses and type parameters, optimizing for introspection performance instead.
Issue: SPR-17070
Allows for skipping the now-deprecated postProcessPropertyValues callback with its expensive PropertyDescriptor retrieval requirement. RequiredAnnotationBeanPostProcessor (which is dependent on postProcessPropertyValues) and the @Required annotation itself are also deprecated now: in favor of constructor injection (or afterPropertiesSet).
Issue: SPR-16918
Update all classes so that inner classes are always last. Also
ensure that utility classes are always final and have a private
constructor and make exceptions final whenever possible.
Issue: SPR-16968
After the Groovy 2.5 upgrade, the Spring Framework build on JDK9 hit
GROOVY-8631. Adding the relevant `jax-api` dependency to the module
didn't fix this issue. The Groovy release notes mention the use of the
`--add-modules` JVM flag, but this is not an option for this build which
should run on JDK8 -> JDK11.
This commit changes the dependency from `groovy-all` to more focused
dependencies on Groovy in the `spring-beans` and `spring-context`
modules. This change seems to avoid the automatic loading of Groovy
enhancements to JAXB (shipped with `groovy-xml`).
See:
* http://groovy-lang.org/releasenotes/groovy-2.5.html#Groovy2.5releasenotes-Knownissues
* https://issues.apache.org/jira/browse/GROOVY-8631
Issue: SPR-15407