Commit Graph

934 Commits

Author SHA1 Message Date
Juergen Hoeller
103f57a0a6 Polishing 2020-11-05 18:50:34 +01:00
Juergen Hoeller
a2a1a70c32 Suppress NotWritablePropertyException in case of ignoreUnknown=true
Closes gh-25986
2020-11-05 18:35:26 +01:00
Juergen Hoeller
6456ba9e60 Translate NullBean result to null for lookup method with bean name
Closes gh-25806

(cherry picked from commit 21cb9e8bff)
2020-09-25 11:55:36 +02:00
Juergen Hoeller
a3bb9b2fe4 Polishing
(cherry picked from commit f010368a66)
2020-09-15 10:12:51 +02:00
Juergen Hoeller
755721fd21 Avoid full singleton lock for getSingleton(beanName, false)
Closes gh-25667

(cherry picked from commit d8c420ab75)
2020-09-04 00:38:10 +02:00
Juergen Hoeller
c9573a4fb6 Polishing 2020-09-01 10:47:37 +02:00
Juergen Hoeller
db3570d0cf Polishing 2020-08-28 22:54:06 +02:00
Juergen Hoeller
0117a5f4c9 Polishing
(cherry picked from commit bb9e79daa7)
2020-08-28 22:20:44 +02:00
Juergen Hoeller
3a9896b849 Polishing 2020-08-27 16:28:59 +02:00
Juergen Hoeller
2891dc6409 Polishing 2020-08-27 15:33:08 +02:00
Juergen Hoeller
bfd20da9de Polishing (backported from 5.2.x) 2020-08-07 14:51:08 +02:00
Juergen Hoeller
ce4001dd40 Refine use of substring operations
Closes gh-25445
2020-08-07 14:50:44 +02:00
Sam Brannen
f868486be5 Fix bug in StaticListableBeanFactory.isSingleton()
Prior to this commit, StaticListableBeanFactory.isSingleton() returned
false for singleton beans unless they were created by a FactoryBean.

StaticListableBeanFactory.isSingleton() now properly returns true for
all beans not created by a FactoryBean.

Closes gh-25522
2020-08-04 15:51:27 +02:00
Juergen Hoeller
515bae9195 Defensively access existing beanDefinitionMap entries
See gh-22263

(cherry picked from commit f1345aadf5)
2020-07-20 07:28:12 +02:00
Juergen Hoeller
1c5fb9a3e8 Defensively catch NoSuchBeanDefinitionException on beanDefinitionNames traversal
Closes gh-22263

(cherry picked from commit 30bc5e09e7)
2020-07-19 20:04:32 +02:00
Juergen Hoeller
a6f7386c9d Clarify enforceInitMethod/enforceDestroyMethod default values
Closes gh-25402

(cherry picked from commit 5846d9c2ea)
2020-07-17 18:06:12 +02:00
Juergen Hoeller
3d14970c03 Polishing 2020-06-12 00:13:19 +02:00
Juergen Hoeller
083dd0e19d Polishing 2020-05-29 16:31:11 +02:00
Sam Brannen
008d011d37 Make use of custom types configurable in YamlProcessor
Prior to this commit, there was no easy way to restrict what types could
be loaded from a YAML document in subclasses of YamlProcessor such as
YamlPropertiesFactoryBean and YamlMapFactoryBean.

This commit introduces a setSupportedTypes(Class<?>...) method in
YamlProcessor in order to address this. If no supported types are
configured, all types encountered in YAML documents will be supported.
If an unsupported type is encountered, an IllegalStateException will be
thrown when the corresponding YAML node is processed.

Closes gh-25152
2020-05-29 14:03:51 +02:00
Juergen Hoeller
bb96bd4f48 Polishing 2020-05-26 23:55:56 +02:00
Juergen Hoeller
4ad7deda4c Polishing 2020-05-18 15:15:46 +02:00
Juergen Hoeller
e3175a2dc9 Polishing 2020-04-25 17:13:44 +02:00
Juergen Hoeller
91316dc11b Caching of autowire candidate metadata for injection point matching
Closes gh-24904
2020-04-25 17:01:22 +02:00
Juergen Hoeller
ac8d1df3ab Enforce limit for storing suppressed exceptions
Closes gh-24902
2020-04-25 17:01:09 +02:00
Juergen Hoeller
45a270b71f Clear by-type cache in case of no pre-existing bean definition as well
Closes gh-24852
2020-04-03 21:43:18 +02:00
Juergen Hoeller
ee832206dc Polishing 2020-03-13 23:41:42 +01:00
Juergen Hoeller
1c0a4f8d78 Polishing 2020-02-24 19:34:15 +01:00
Juergen Hoeller
51b8ba334a Polishing 2020-01-28 21:40:16 +01:00
Juergen Hoeller
015f7d8ce1 Polishing 2019-12-11 17:13:02 +01:00
Juergen Hoeller
4f86282b14 Polishing 2019-12-01 01:55:26 +01:00
Juergen Hoeller
b3237f3eb6 Polishing 2019-12-01 00:41:53 +01:00
Juergen Hoeller
fd68fb115d Backport of recent ExtendedBeanInfo refinements from master
Closes gh-24095
2019-12-01 00:40:57 +01:00
Juergen Hoeller
f4676bb41c Restore short-circuiting in equals implementation
Closes gh-24048
2019-11-21 18:25:37 +01:00
Juergen Hoeller
e4c57a9b61 Minor internal refinements (backported from master) 2019-11-13 16:53:23 +01:00
Juergen Hoeller
bdb1a81a39 Use Method.getParameterCount() when full type array is never needed 2019-11-07 22:35:21 +01:00
Juergen Hoeller
03bd02a627 Expose primary flag on BeanDefinitionBuilder
Closes gh-23794
2019-10-30 10:30:43 +01:00
Juergen Hoeller
bb6f9bb6d4 Polishing 2019-09-25 12:14:48 +02:00
Juergen Hoeller
da44a247cb Efficient concurrency in MethodOverrides through CopyOnWriteArraySet
Also restores immediate MethodOverrides instance in AbstractBeanDefinition, avoiding potential lazy-init race condition.

Closes gh-23448
2019-09-25 12:09:16 +02:00
Juergen Hoeller
20fc7e178a Consistent equality check for parent name and indexed arguments
Closes gh-23593
2019-09-25 12:07:29 +02:00
Sam Brannen
b2aad1c3b1 Ensure bean definitions can be removed concurrently
Prior to this commit, concurrent invocations of
DefaultListableBeanFactory.removeBeanDefinition() could result in a
NullPointerException.

This commit fixes this by adding an appropriate not-null check in
resetBeanDefinition().

Closes gh-23542
2019-09-17 13:09:08 +02:00
Phillip Webb
d945ae9191 Add blank line between java and javax imports
See gh-23539

Co-authored-by: Sam Brannen <sbrannen@pivotal.io>
2019-09-16 13:41:59 +02:00
GungnirLaevatain
9db4118180 Fix DefaultListableBeanFactory#copyConfigurationFrom
Prior to this commit, the copyConfigurationFrom(ConfigurableBeanFactory)
method in DefaultListableBeanFactory cloned its own AutowireCandidateResolver
type instead of the resolver type from the supplied ConfigurableBeanFactory.

This commit fixes that by cloning the resolver type from the supplied
ConfigurableBeanFactory.

Closes gh-23569
2019-09-12 13:58:24 +02:00
Sam Brannen
d036b5a283 Do not treat void and Void as simple types in BeanUtils
Prior to this commit, the isSimpleProperty() and isSimpleValueType()
methods in BeanUtils treated void and Void as simple types; however,
doing so does not make sense in this context, since void implies the
lack of a property or value.

This commit addresses this by explicitly excluding void and Void in the
logic in isSimpleValueType().

This commit also simplifies the implementation of
ViewResolutionResultHandler.supports(HandlerResult) to take advantage
of this change.

Closes gh-23573
2019-09-04 15:48:40 +02:00
Juergen Hoeller
762ea3ea90 Document all remaining public methods on BeanDefinitionParserDelegate
Closes gh-23349
2019-08-01 15:26:11 +02:00
Juergen Hoeller
c4622dbebc Polishing 2019-07-30 16:59:01 +02:00
Juergen Hoeller
4a09b323b6 Apply getInterfaceMethodIfPossible without SecurityManager as well
Closes gh-23323
2019-07-20 16:11:17 +02:00
zheng.ren01@mljr.com
f92b60c08f Only invoke getInterfaceMethodIfPossible() when security manager is used
Prior to this commit, AbstractAutowireCapableBeanFactory's
invokeCustomInitMethod() method invoked
ClassUtils.getInterfaceMethodIfPossible() even if the security manager
was not being used.

This commit ensures that getInterfaceMethodIfPossible() is only invoked
if the security manager is used.

Closes gh-23323
2019-07-20 13:30:57 +02:00
Sam Brannen
74ddf1bee5 Improve documentation for @Autowired constructors
Prior to this commit, there was some ambiguity surrounding semantics
for @Autowired constructors and `required = true`, especially for
multiple @Autowired constructors.

This commit improves the documentation in the Javadoc for @Autowired as
well as in the reference manual.

Closes gh-23263
2019-07-17 18:55:58 +02:00
Juergen Hoeller
56cc0d02e9 Bean destruction exceptions consistently logged at warn level
Closes gh-23200
2019-07-05 17:07:22 +02:00
Juergen Hoeller
fc46abf0b7 Polishing 2019-06-12 18:04:06 +02:00