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

Revisit CGLIB AOP proxy warnings for final methods [SPR-15436] #19997

Closed
spring-projects-issues opened this issue Apr 11, 2017 · 1 comment
Closed
Assignees
Labels
in: core type: task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Apr 11, 2017

Juergen Hoeller opened SPR-15436 and commented

The change triggered by #16241 led to a downgrade of the log category for non-interceptible final methods from WARN to INFO, aligned with the then-new log messages for non-interceptible package-visible methods. However, public final methods which happen to implement methods in a service interface remain a serious problem for CGLIB proxy generation: We should either log those specific messages on WARN again or reject such target classes upfront.


Issue Links:

  • #19917 Clarification: Spring AOP pointcuts match protected methods when CGLIB is used
  • #16241 CglibAopProxy needs to detect package-visible methods when defined in a different ClassLoader

Referenced from: commits 665e6cf, 43e806c, 9b2f9e6, 0d0b879

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Apr 17, 2017

Juergen Hoeller commented

CglibAopProxy logs an explicit warning for an interface-implementing method marked as final now, covering the particular case where interception would work with an interface-based proxy but does not work with a target-class proxy. This happens at WARN level now, whereas the regular messages about final methods (potentially never invoked through the proxy) keep happening at INFO level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: task
Projects
None yet
Development

No branches or pull requests

2 participants