-
Notifications
You must be signed in to change notification settings - Fork 38.4k
AnnotatedElementUtils does not find annotations on methods in dynamic proxies [SPR-12703] #17300
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
Comments
Sam Brannen commented What type of proxy is being used here: CGLIB, JDK dynamic proxy, or AspectJ LTW? |
Sam Brannen commented This issue is perhaps a duplicate of #15734 or #17335 and at the very least related to those two issues. |
Stéphane Nicoll commented JDK proxy. You can find the ignored tests here Just run them and you'll see by yourself. |
Stéphane Nicoll commented Is this one still on the agenda? There is a TODO in the event listener infra (new in 4.2) that really does require this fix. Thanks! |
Sam Brannen commented Yes, this is still on the agenda for 4.2 RC1! |
Sam Brannen commented This is related to #17534. |
Sam Brannen commented
The ignored tests you linked to have nothing to do with proxies. Rather, the reason they were failing is that Now, having cleared that up... do you perhaps have any failing tests related to the proxy issue you describe in this issue's description? ;-) |
Stéphane Nicoll commented well if you have resolved #17534 and the tests are passing now, I guess we can just say that I took the wrong assumptions and that this one is a duplicate. Or am I missing something? |
Sam Brannen commented No, I don't think you're missing something. I just think that you covered two features/bugs in one JIRA issue. ;) I solved the first one in #17534, and the other one is related to lacking support for interfaces. In this issue you talk specifically about proxies; however, neither Sound good? Cheers, Sam |
Sam Brannen commented Resolving as a "Duplicate" of #17335. In addition, support for finding annotations at the type level on interfaces is addressed by #17537. |
Stéphane Nicoll opened SPR-12703 and commented
The following two calls do not yield consistent results when the
method
is a method of a dynamic proxy.The above returns
null
; whereas, the following call on the same method returns theFooBar
annotation instance.The code merged for #16696 has some TODOs in
ApplicationListenerMethodAdapter
and tests that expose this behavior (removing the call toAnnotationUtils
will fail with aNullPointerException
).Affects: 4.1 GA
Issue Links:
The text was updated successfully, but these errors were encountered: