-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transients not properly autowired on subsequent get #420
Comments
From what I have found, the issue is caused by the setters being called on I fixed the issue by putting this code in
I'm not convinced that this is the correct fix though - smells very hacky - so haven't submitted a PR. I didn't have this issue with previous releases either, so I think the problem is caused elsewhere and my fix merely masks the issue. |
Thanks @georgebridgeman -- that's actually very helpful. The reason this bug has appeared is the caching code added to try to avoid walking dependencies multiple times for transients by not forcing regeneration of the accumulator data, but this seems to be a path through where the newly generated transient needs to be overridden in the cache (although there's still a possibility of multiple transients generated in a single recursive resolution phase where only one of them would have setters called properly... that may be enough of an edge case not to worry about). |
See aliaspooryorik@3a038bc
@aliaspooryorik says "I think what happens is that when you call getBean on subsequent requests for a transient, it's wiring up the object using the info from variables.accumulatorCache, but doesn't return that instance (or something like that)"
The text was updated successfully, but these errors were encountered: