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

Filter out java.lang.Object from checked types and fallback to getMethods() if getDeclaredMethods() causes SecurityException. #3860

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vrozov
Copy link

@vrozov vrozov commented Apr 10, 2020

fixes #3858 and #3859

…hods() if getDeclaredMethods() causes SecurityException.
@ljacqu
Copy link

ljacqu commented Apr 13, 2020

Just as a viewer passing by—

Conceptually: if you fall back to getMethods it's a little excessive to call it for every supertype since you get all parent methods immediately. Might be worth checking first whether you can call getDeclaredMethods and if not to use clazz.getMethods as your sole source of methods.

Stylistically: I find the two streams within each other to be really awkward. The previous version with regular loops was much more clear IMHO. Streams work out nicely when you have a small filter-and-transform thing going on but nesting them makes it difficult to remember where one is located.
I also find it awkward that the Set identifiers is just used for a uniqueness check (filter on L205) vs. how the map was used to determine the results in the end. Also just for reference the filter call on L192 that always returns true could be turned into a peek.

@vrozov
Copy link
Author

vrozov commented Jan 7, 2021

Any plan to pull this into a release?

@vrozov
Copy link
Author

vrozov commented Apr 2, 2021

@netdpb the PR is open for almost a year, are there any plan to merge it?

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

Successfully merging this pull request may close these issues.

SubscriberRegistry should exclude java.lang.Object from checked types.
6 participants