mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
5aa15923cf
Prior to this commit, subclasses of AbstractBeanFactoryBasedTargetSource referenced the targetBeanName via getTargetBeanName() which throws an IllegalStateException if the targetBeanName has not yet been set. This commit changes the visibility of the targetBeanName field from private to protected in order to facilitate direct access through this.targetBeanName where no assertion is needed. By doing so, we avoid exceptions in logging and toString() implementations in subclasses. Closes gh-35172 Signed-off-by: chenggwang <90715678+chenggwang@users.noreply.github.com> Co-authored-by: Sam Brannen <104798+sbrannen@users.noreply.github.com>