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

Default method interception and bindings inheritance rules #84

Open
manovotn opened this issue Nov 30, 2020 · 0 comments
Open

Default method interception and bindings inheritance rules #84

manovotn opened this issue Nov 30, 2020 · 0 comments

Comments

@manovotn
Copy link
Contributor

Hello,

recently we came across and interesting question which revolves around interception of default methods.

Currently, the specification doesn't really mention default methods. Therefore you can only imply what it should behave like.
One not so obvious aspect is inheritance rules for interceptor bindings in conjunction with default methods.
According to what the spec says right now, you do not inherit bindings from interfaces. However, that means that the only way to intercept a default method is to use a class-level binding on the implementing class.

I have seen this disputed by users (of Weld and Quarkus, both of which support default method interception) several times and I have to give them some credit for it. It is indeed not really intuitive. It also takes away some customization power because you cannot use method-level binding with default methods; you have to intercept all methods of the implementing class.

I realize changing this presents backward compatibility issues and I am not saying we should go that way. However, I'd like to hear some more opinions on how people perceive this, if the spec should perhaps mention this and what they think could/should be done in this regard.

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

No branches or pull requests

1 participant