Commit Graph

204 Commits

Author SHA1 Message Date
Juergen Hoeller
de3ea5dad6 Deprecated BeanDefinitionDocumentReader's setEnvironment method in favor of access via XmlReaderContext
Issue: SPR-12248
2014-10-07 18:00:21 +02:00
Juergen Hoeller
a1538a451a Further locking optimizations for the retrieval of non-singleton beans
Issue: SPR-12250
(cherry picked from commit ac4103d)
2014-10-07 00:12:12 +02:00
Juergen Hoeller
5cf452463e Log warning for single optional constructor when no default constructor to fall back to
Issue: SPR-12161
(cherry picked from commit 80cec01)
2014-09-17 22:39:13 +02:00
Juergen Hoeller
e819999c08 Polishing 2014-09-17 19:10:33 +02:00
Juergen Hoeller
d18bdf6448 Polishing
(cherry picked from commit d2ef6dc)
2014-09-03 14:25:16 +02:00
Juergen Hoeller
5da8a16284 AbstractAutowireCapableBeanFactory avoids early FactoryBean instantiation on currently created configuration bean
Issue: SPR-12141
(cherry picked from commit 4432c41)
2014-09-03 14:23:56 +02:00
Juergen Hoeller
e89f18bf6d DefaultListableBeanFactory defensively handles BeanDefinition access in getBean(Class)
Issue: SPR-10542
(cherry picked from commit 9d3d6d5)
2014-08-22 23:44:47 +02:00
Juergen Hoeller
0492c9955c Polishing
(cherry picked from commit a31ebb6)
2014-08-15 00:30:14 +02:00
Juergen Hoeller
0c89279d61 Polishing 2014-08-13 15:54:21 +02:00
Juergen Hoeller
c0a4631fd1 Polishing 2014-07-29 10:10:48 +02:00
Juergen Hoeller
ab9d947c08 DefaultListableBeanFactory's registerBeanDefinition only calls resetBeanDefinition in case of pre-existing bean definition or pre-existing singleton instance
Issue: SPR-8318
(cherry picked from commit a4968b9)
2014-07-29 00:13:04 +02:00
Juergen Hoeller
83a7deb594 ConstructorResolver's exception message on null factory-bean hints at potential BeanPostProcessor involvement
Issue: SPR-11951
(cherry picked from commit 6c41cc3)
2014-07-04 22:35:12 +02:00
Juergen Hoeller
010d8b8c89 Defensively check for pre-resolved FactoryBean.getObject() results in circular reference scenarios
Issue: SPR-11937
(cherry picked from commit 07edf11)
2014-07-02 00:32:01 +02:00
Juergen Hoeller
8307447235 CachedIntrospectionResults uses SoftReference instead of WeakReference for non-cache-safe entries
Issue: SPR-11867
(cherry picked from commit f27b949)
2014-07-02 00:31:06 +02:00
Juergen Hoeller
67ebef6b32 BeanFactoryAnnotationUtils consistently applies bean name fallback when no BeanDefinition present
Issue: SPR-11915
(cherry picked from commit b9935e9)
2014-07-01 18:26:26 +02:00
Juergen Hoeller
c033f889bf Polishing (backported from master)
(cherry picked from commit 48f753f)
2014-07-01 14:28:05 +02:00
Juergen Hoeller
f4062bc758 AbstractAutowireCapableBeanFactory's createBean/autowireBean/configureBean use CacheUtils.isCacheSafe to re-enable PropertyDescriptor caching
Issue: SPR-11875
(cherry picked from commit c32d559)
2014-07-01 14:22:03 +02:00
Juergen Hoeller
a139670286 Fixed invalid code tag in javadoc 2014-05-01 00:49:22 +02:00
Juergen Hoeller
a5606a6c46 Polishing 2014-04-29 23:39:17 +02:00
Juergen Hoeller
b13c5b2378 GenericBeanDefinition's toString() takes parent definition into account
Issue: SPR-9671
(cherry picked from commit 0ef29b2)
2014-04-29 21:42:19 +02:00
Juergen Hoeller
9e2060707a General defensiveness about the bootstrap ClassLoader (i.e. null ClassLoader)
Issue: SPR-11721
2014-04-27 22:29:08 +02:00
Juergen Hoeller
5aa93674a3 Consistent documentation for both 'close' and 'shutdown' as inferred destroy methods
Issue: SPR-11680
(cherry picked from commit 14f9dbf)
2014-04-18 12:09:27 +02:00
Juergen Hoeller
5c3f6a1571 Revised naming for prototype inner beans to avoid excessive unique name calculation
Restored original singleton-only adaptInnerBeanName behavior, avoiding endless unique name calculation for every single prototype instance. Non-named inner BeanDefinition objects now suffixed with an identity hex code analogous to non-named XML bean definitions, largely avoiding naming collisions to begin with. After SPR-11246, post-processors can deal with unstable classes per bean name, so occasional collisions aren't a hard problem anymore.

Issue: SPR-11545
(cherry picked from commit 5308b3e)
2014-03-25 00:34:41 +01:00
Juergen Hoeller
f1ba789494 DefaultListableBeanFactory only puts 'cache-safe' Class keys into its by-type cache
Issue: SPR-11520
(cherry picked from commit 93c8b7a)
2014-03-07 14:58:51 +01:00
Juergen Hoeller
d642cd21bb SpringBeanELResolver's setValue should not throw PropertyNotWritableException if provided value is identical to current bean instance
Issue: SPR-11502
(cherry picked from commit 7972b31)
2014-03-07 14:58:16 +01:00
Juergen Hoeller
7e2a214f32 instantiateUsingFactoryMethod avoids NPE and reports argument types in case of explicitArgs and resolved generic arguments as well
Issue: SPR-11517
(cherry picked from commit ad31777)
2014-03-07 14:56:45 +01:00
Juergen Hoeller
b40403cdc9 Polishing
Issue: SPR-11422
(cherry picked from commit 520ef9e)
2014-02-13 00:42:22 +01:00
Juergen Hoeller
0972582880 resolveFactoryMethodIfPossible considers nonPublicAccessAllowed and SecurityManager
Issue: SPR-11422
(cherry picked from commit 603cdea)
2014-02-13 00:42:16 +01:00
Sam Brannen
9f77ef4102 Exclude overloaded from equals & hashCode in MethodOverride
Prior to this commit, the inclusion of the 'overloaded' flag in the
implementations of equals() and hashCode() in MethodOverride could lead
to adverse effects in the outcome of equals() in AbstractBeanDefinition.

For example, given two bean definitions A and B that represent the
exact same bean definition metadata for a bean that relies on method
injection, if A has been validated and B has not, then A.equals(B) will
potentially return false, which is not acceptable behavior.

This commit addresses this issue by removing the 'overloaded' flag from
the implementations of equals() and hashCode() for MethodOverride.

Issue: SPR-11420
(cherry picked from commit 9534245)
2014-02-12 17:20:43 +01:00
Juergen Hoeller
f558396e91 Introduced SpringNamingPolicy for CGLIB
Issue: SPR-11398
(cherry picked from commit 8c4e372)
2014-02-06 23:25:52 +01:00
Juergen Hoeller
60b24cffdb Related polishing
Issue: SPR-11386
(cherry picked from commit 6634c19)
2014-02-04 16:53:50 +01:00
Juergen Hoeller
35753eb54d Backported test for fallback for non-resolvable property type
(cherry picked from commit 8570f60)
2014-01-28 17:25:12 +01:00
Juergen Hoeller
d26a570192 Polishing 2014-01-28 01:46:19 +01:00
Juergen Hoeller
ac3c670f70 Fixed type resolution in case of inconsistencies between read and write method
Issue: SPR-11361
2014-01-28 01:20:27 +01:00
Juergen Hoeller
e07ad5a19b Polishing 2014-01-25 00:15:00 +01:00
Juergen Hoeller
87179b075b Optimized Introspector.flushFromCaches calls to skip Object.class
Issue: SPR-11356
2014-01-24 19:18:39 +01:00
Juergen Hoeller
866c7847e3 Introduced SpringProperties class and optional "spring.properties" file
This in particular allows for specifying "spring.getenv.ignore" and "spring.beaninfo.ignore" in a local way within the application, in case that JVM-level system properties are locked.

Issue: SPR-9014
Issue: SPR-11297
(cherry picked from commit 8543b91)
2014-01-24 16:58:16 +01:00
Juergen Hoeller
fdd31c0e66 Preserve visitBeanDefinition stacktrace in BeanDefinitionStoreException
Issue: SPR-11346
2014-01-22 22:40:10 +01:00
Juergen Hoeller
d9ab6aaf6c Revised RootBeanDefinition's externallyManaged* Sets to rely on postProcessingLock
This allows us to avoid early initialization of footprint-heavy ConcurrentHashMaps, and reuses the existing postProcessingLock which will typically be active already when registerExternallyManaged* calls come in from the bean factory's post-processing phase.

Issue: SPR-11343
(cherry picked from commit a599b57)
2014-01-22 14:48:26 +01:00
Juergen Hoeller
52c11eab41 Polishing
(cherry picked from commit e670f4e)
2014-01-15 17:54:37 +01:00
Juergen Hoeller
b6362c5016 Introduced "spring.getenv.ignore" system property for preventing System.getenv calls
Issue: SPR-11297
(cherry picked from commit 961f42b)
2014-01-15 17:52:36 +01:00
Juergen Hoeller
f88cbda6ef Introduced "spring.beaninfo.ignore" system property for optimized Introspector usage
Issue: SPR-9014
2014-01-03 14:14:10 +01:00
Juergen Hoeller
08aa22ff1f InjectionMetadata caching per bean name needs to refresh when bean class changes
Issue: SPR-11246
2013-12-20 00:15:09 +01:00
Juergen Hoeller
a115a7dad5 Revised BeanInfoFactory javadoc
Issue: SPR-9014
2013-12-20 00:09:49 +01:00
Juergen Hoeller
0a4d28d5d5 Fixed primitive type assignability in BeanUtils.copyProperties
Issue: SPR-11231
(cherry picked from commit 8a3b4c6)
2013-12-16 22:57:50 +01:00
Juergen Hoeller
bf31f7178d Polishing
(cherry picked from commit a3a4344)
2013-12-11 23:58:16 +01:00
Juergen Hoeller
bfcfbe41a1 Made BeanUtils.copyProperties defensive about property type mismatches
Issue: SPR-11209
(cherry picked from commit bc5affa)
2013-12-11 23:12:33 +01:00
Juergen Hoeller
779d5716e5 Moved RequiredAnnotationBeanPostProcessorTests to correct package beans.factory.annotation 2013-12-11 18:45:23 +01:00
Juergen Hoeller
7f895222e1 Revised exclusion of java.lang.Class properties
Issue: SPR-11098
(cherry picked from commit 62ea627)
2013-12-11 17:44:16 +01:00
Juergen Hoeller
6e275b7663 Polishing 2013-12-10 22:48:42 +01:00