Skip to content
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

ThreadLocalTargetSource does not include actual target bean name in NamedThreadLocal #30581

Closed
jhoeller opened this issue Jun 2, 2023 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@jhoeller
Copy link
Contributor

jhoeller commented Jun 2, 2023

In the course of some nullability refinements along with #30576, it turns out that ThreadLocalTargetSource always initializes its NamedThreadLocal with a String that contains a null bean name. That bean name should be appended lazily in a toString() implementation instead.

@jhoeller jhoeller added type: bug A general bug in: core Issues in core modules (aop, beans, core, context, expression) labels Jun 2, 2023
@jhoeller jhoeller added this to the 6.0.10 milestone Jun 2, 2023
@jhoeller jhoeller self-assigned this Jun 2, 2023
@jhoeller jhoeller added the for: backport-to-5.3.x Marks an issue as a candidate for backport to 5.3.x label Jun 2, 2023
@github-actions github-actions bot added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.3.x Marks an issue as a candidate for backport to 5.3.x labels Jun 2, 2023
jhoeller added a commit that referenced this issue Jun 2, 2023
Includes hashCode optimization in AbstractBeanFactoryBasedTargetSource.
Includes ThreadLocal naming fix in ThreadLocalTargetSource.

Closes gh-30576
Closes gh-30581

(cherry picked from commit c685525)
mdeinum pushed a commit to mdeinum/spring-framework that referenced this issue Jun 29, 2023
Includes hashCode optimization in AbstractBeanFactoryBasedTargetSource.
Includes ThreadLocal naming fix in ThreadLocalTargetSource.

Closes spring-projectsgh-30576
Closes spring-projectsgh-30581
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant