-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Kenny MacLeod opened SPR-7264 and commented
Since Spring 3.0, AutowireUtils.resolveAutowiringValue() has required that all ObjectFactory-implementing classes also implement Serializable. This means that when passing an ObjectFactory to ConfigurableListableBeanFactory.registerResolvableDependency(), this must be Serializable.
This was not the case in 2.5.6, however, and so code written to use this facility will not work in 3.0.x unless Serializable is introduced. This is invasive to the client code, and in many cases is highly inappropriate.
I'm not sure why this check is being made. AutowireUtils is constructing a ObjectFactoryDelegatingInvocationHandler which also implements Serializable, but there doesn't seem to be a reason for this.
Can this check be removed?
Affects: 3.0 GA, 3.0.1, 3.0.2
Referenced from: commits cc23820