-
Notifications
You must be signed in to change notification settings - Fork 34
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
Wildcard method signatures #188
Conversation
Hi Mike, thanks for this PR! Looks like a good thing. I have the feeling that there was already an issue about this! What I really like is that it will trigger a method not found issue if you add a false signature like I'd like to make some antunit test for this before merging it in -- to be sure That should be easy. I am a bit busy today with log4j, but will check out for sure. Uwe |
Of course an update for the documentation is required. |
Hi @madrob, I also added a few tests. Next I will update documentation, but code-wise it's ready. |
It's now ready. Just give me your go, @madrob. Does this fit your needs? |
That looks pretty cool from initial code review. I think it should be good to merge, but I won’t get a chance to test this until next week. |
OK, will merge. Are you planning to use this in Solr/Lucene or for own projects? I am not yet sure if those 2 changes I merged today should be a new release, or if I should wait for Java 18. |
My current plan was to use it for Solr. |
Give me a ping if you need it urgently, then I will do a release. As usual before release there need to be some checks:
|
I’m on vacation until January, so no rush at all. would you be interested in adding some commons io signatures to the default list? Specifically, I’m looking at IOUtils.copy since they can be replaced by jdk native methods |
I would only add real unsafe commons-io methods. The copy methods are fine, just unneeded with newer JDKs. We may ship in future with other "recommended replacements" signatures. Like forbid |
Allow specifying all methods regardless of argument types, for example:
List.of(**) would match all of the factory methods. This is useful when you want to match those methods without listing them individually and also not forbidding the entire class.
I did not see unit tests for this class, so I wasn't sure where to add testing.