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

Tighten (IntroductionAware)MethodMatcher contract [SPR-17068] #21606

Closed
spring-projects-issues opened this issue Jul 19, 2018 · 0 comments
Closed
Assignees
Labels
in: core type: task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jul 19, 2018

Juergen Hoeller opened SPR-17068 and commented

MethodMatcher historically accepts a null target class despite usually being invoked with a non-null class (the method's declaring class if no explicit target class given) by DefaultAdvisorChainFactory. Tightening this towards a non-null guarantee, also using the same fallback in ReflectiveMethodInvocation's dispatch to a dynamic MethodMatcher, simplifies some matcher implementations and provides a clearer experience overall.

IntroductionAwareMethodMatcher requires some explicit IntroductionAdvisor checks across the advisor chain which are worth avoiding if no such method matcher is applicable to begin with. For this to work, MethodMatchers.union/intersect needs to differentiate between regular and introduction-aware method matchers, providing dedicated aggregate types for each. DefaultAdvisorChainFactory may then lazily determine introductions only when encountering an actual IntroductionAwareMethodMatcher.


Affects: 5.0.8

Referenced from: commits 252f52a

@spring-projects-issues spring-projects-issues added in: core type: task labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.1 RC1 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 type: task
Projects
None yet
Development

No branches or pull requests

2 participants