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

Explicit target ClassLoader for interface-based proxies in MvcUriComponentsBuilder #29913

Closed
jhoeller opened this issue Jan 31, 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

In the course of addressing #29256, we identified a further case of ProxyFactory usage without an explicit target ClassLoader in MvcUriComponentsBuilder, as well as code inspired by the latter in our ResolvableMethod test utilities. Not only do those proxies have to be created in the same ClassLoader as the given user interface type, they also should be created through direct java.lang.reflect.Proxy usage instead of going through the AOP ProxyFactory (aligning with the direct use of CGLIB for non-interface proxies in MvcUriComponentsBuilder, minimizing the invocation overhead and other AOP side effects).

@jhoeller jhoeller added type: bug A general bug in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 31, 2023
@jhoeller jhoeller added this to the 6.0.5 milestone Jan 31, 2023
@jhoeller jhoeller self-assigned this Jan 31, 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 labels Jan 31, 2023
jhoeller added a commit that referenced this issue Jan 31, 2023
Includes direct JDK Proxy usage instead of ProxyFactory where possible.

Closes gh-29913

(cherry picked from commit 4d62498)
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