uschindler commented on pull request #643: URL: https://github.com/apache/lucene/pull/643#issuecomment-1030618068
> I added `@SuppressWarnings("removal")` to tests that invoke deprecated methods for now - to keep the tests as-is on branch_9x. I will remove the obsolete methods and change tests in a separate patch (after backporting this). OK. > Also, the suggested `ResourceSupplier<T>` interface works very well, thanks. Let's rename it. I wasn't aware that we have Function and Consumer already in IOUtils. With the correct name its a great addition! > As for the wrapping checked exception trick (type erasure plays the main role there, maybe?), it's cool but seems too much for me. Haha, IOSupplier is much better. The wrappers is mostly a cool trick, but should be used sparingly (when you want to use APIs like Java's stream API, that allows no checked Exceptions. The downside is also that you remove the checked exception and you can't catch it anymore. It was just funny that you stumbled on the same stuff like I did. BTW: It is once per year when I invent a new Sneaky implementation. That's the third one, this time for functional interfaces. I have to hold my nickname "Generics Policeman"! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org