You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When initializing applications with null-beans of type Lifecycle, DefaultLifecycleProcessor.getLifecycleBeans throws a BeanNotOfRequiredType exception rather then ignoring null-beans like in previous spring versions.
DefaultLifecycleProcessor should be fixed to not call the ctx.getBean(name, type) method but rather getBean(name) and check for type explicitely.
Reason/Background: In earlier versions of Spring the ctx.getBean(name, type) method returned null for null-beans. Since Spring 5, Spring returns the NullBean instance but that cannot be converted to required type.
Uh oh!
There was an error while loading. Please reload this page.
Stefan Mueller opened SPR-16343 and commented
When initializing applications with null-beans of type
Lifecycle
,DefaultLifecycleProcessor.getLifecycleBeans
throws aBeanNotOfRequiredType
exception rather then ignoring null-beans like in previous spring versions.DefaultLifecycleProcessor
should be fixed to not call thectx.getBean(name, type)
method but rather getBean(name) and check for type explicitely.Reason/Background: In earlier versions of Spring the
ctx.getBean(name, type)
method returned null for null-beans. Since Spring 5, Spring returns theNullBean
instance but that cannot be converted to required type.See as well #20582, #20711 and #20889.
Affects: 5.0.2
Issue Links:
Referenced from: commits 977550f
The text was updated successfully, but these errors were encountered: