-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Ensure that final methods don't prevent CDI interceptors from being applied #5104
Conversation
independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Methods.java
Outdated
Show resolved
Hide resolved
independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Methods.java
Outdated
Show resolved
Hide resolved
a18b5c7
to
28a35e4
Compare
I need to rebase this on top of #5108 |
This is now rebased on top of #5108. |
I cleared the milestone since it remains to be decided if it should go in for |
c442157
to
bd0a231
Compare
Decision on this one is to wait a bit and see the feedback we have on Martin's changes before deciding if we should take the risk to include it pre 0.29.0. |
b8c9ee7
to
8ca1da3
Compare
Note to self: rebase onto master and get this one in for 1.1 |
8727c29
to
2456efd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me and +1 for tests for both cases right away!
I am not familiar with ClassVisitor
pattern, so take my review there with a pinch of salt, but it does seem to do what I'd expect it to do ;-)
Thanks for the review @manovotn! I'll wait for another review then :) |
@mkouba / @stuartwdouglas are you good with this? |
LGTM but I will let @mkouba have the final say. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good! The only thing I'm missing is a log message that a final modifier was removed. I know that users usually don't care about these messages but it's a good habit that helps with debugging ;-).
It should be debug level though |
I added a debug level logging message |
@geoand ;-) |
LOL, I'll fix it :) |
We need security annotations to result in the creation of an interceptor which is not possible when a method is final. The solution we follow is to remove the final modifier from methods that need intercepting. This is now configurable with the default value true, meaning that Arc will remove the final flag. If the value is set to false Arc throws an exception at build time. Fixes: quarkusio#5051
We need security annotations to result in the creation of an interceptor
which is not possible when a method is final.
The solution we follow is to remove the final modifier from methods
that need intercepting.
This is now configurable with the default value true, meaning that
Arc will remove the final flag. If the value is set to false
Arc throws an exception at build time.
Fixes: #5051
Provides an alternative implementation to #5089 (which has now been closed) based on this comment