-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add selectClass()
/selectMethod()
variants in DiscoverySelectors
that take a ClassLoader
#2107
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
selectClass()
/selectMethod()
variants in DiscoverySelectors
that take a ClassLoader
0f17c78
to
85ef61b
Compare
3e0c756
to
8f5e832
Compare
Hi @kriegfrj, It looks like you're almost done with this PR (rebased on So, it appears that only an entry in the release notes is missing. Do you think you'll have time to finish this PR this week? If not, someone in the team can take merge the PR and add an entry in the release notes. Please just let us know about your availability for completing this issue. Thanks! |
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.
Whenever we introduce an overloaded constructor or method, we do our best to append optional arguments to the formal parameter list instead of prepending them.
This aligns with conventional best practices for API design.
In light of that, please modify all constructors/methods in this PR to accept the ClassLoader
last in the formal parameter list (unless there is a compelling reason not to do so).
Thanks
8f5e832
to
3963470
Compare
I think the reason I put them first (it's been a while!) was that, from a domain perspective, all the other argument lists go from least specific selector segment to most specific (eg, (class, method) or (class, method, parameters) ). In keeping with that style seemed to make the most sense to put the class loader first. I started putting it last, and realised that it causes a source-level compatibility as some of the tests started to fail to compile due to the ambiguous overloads when supplied with a I've also updated the release notes. I also realised that, since I submitted the original PR, we also have the |
2540d35
to
2f312af
Compare
…ake a classloader Fixes junit-team#1987.
2f312af
to
71d8cec
Compare
Thanks for making the requested changes and updating the release notes. 👍
Good catch. I opened #3298 to track that. |
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.
I think this PR looks good now.
I'll make any additional changes after merging.
ClassLoader
inClassSelector
andMethodSelector
#1987