-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Warn about interceptors on private methods #21260
Conversation
-1 |
independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Methods.java
Outdated
Show resolved
Hide resolved
Thanks a lot for this! It's too easy to run into this problem, e.g. when refactoring existing code. |
Indeed it is :) |
Failing Jobs - Building d8d8305
Failures⚙️ Native Tests - Windows - hibernate-validator #- Failing: integration-tests/hibernate-validator
📦 integration-tests/hibernate-validator✖ |
@geoand I colleague just lost quite a bit of time because he had So I'm wondering if we should provide a config property to control whether to just warn or throw an exception? |
Sure, that sounds like a good idea |
Do you or your colleague want to open a PR for that? I can certainly do it. |
You are very welcome to do that! We are a bit in a rush for a release next week. |
Hm... Actually the idea of this sort of conflicts with the @mkouba WDYT? |
Well, private intercepted observer/producer methods are legal and should work just fine so we would have to ignore these.
Private methods don't turn a class into an unproxyable type so it should be ok I think... |
Understood, thanks |
…private methods Follow up of: quarkusio#21260
#22185 takes care of it |
…private methods Follow up of: quarkusio#21260
…private methods Follow up of: quarkusio#21260
…private methods Follow up of: quarkusio#21260
Provide Arc configuration allowing to fail when interceptors used on private methods
Resolves: #21046
P.S. Another solution would be to remove the
private
modifier from the method same as we do forfinal
, but I am not sure if we want that.