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

AbstractAdvisingBeanPostProcessor.isEligible(…) does not consider proxy interfaces [SPR-11725] #16347

Closed
spring-projects-issues opened this issue Apr 23, 2014 · 1 comment
Assignees
Labels
in: core status: backported type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Apr 23, 2014

Oliver Drotbohm opened SPR-11725 and commented

If AbstractAdvisingBeanPostProcessor.isEligible(…) encounters a proxy instance it only checks the proxy target class and its methods for eligibility for proxying.

If the target class doesn't implement all methods the proxy exposes (because some generic interceptor on the proxy executes the methods exposed on a proxy interface), the processor might consider a bean ineligible although it actually is (due to methods only exposed on the interface and not the target classs).

I think ….isEligible(…) should also check for Advised and check the exposed interfaces as well.


Affects: 3.2.8, 4.0.3

Issue Links:

  • DATACMNS-498 Remove assumption guard in RepositoryFactorySupportUnitTests ("is depended on by")
  • DATACMNS-489 Add support for Future as return type for repository methods ("is depended on by")

Backported to: 3.2.9

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Apr 29, 2014

Juergen Hoeller commented

It turns out that this is a side effect of AbstractAdvisingBeanPostProcessor's ability to add its Advisor to an existing proxy (i.e. to an Advised object encountered as bean instance): This doesn't work when the Advisor is meant to apply to introductions. We're only doing that for actual target class matches behind an existing proxy now, while testing against the exposed bean instance's class (which does catch introductions) in the regular case.

Juergen

@spring-projects-issues spring-projects-issues added status: backported type: enhancement in: core labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.0.4 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core status: backported type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants