-
Notifications
You must be signed in to change notification settings - Fork 78
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
feat: Add close method to Client #34
feat: Add close method to Client #34
Conversation
- Implement closeable interface
Thank you @tsuyoshizawa! Would you mind signing our CLA so that we may merge your work? It's just a quick web form. With Best Regards, Elmer |
@thinkingserious I signed the CLA. |
LGTM |
We have not been able to merge your Pull Request, but because you are awesome - we wanted to make sure you could still get a SendGrid Hacktoberfest shirt. Please go fill out our swag form before Nov 5th and we will send the shirt! (We know that you might have tried this before and it didn’t work, sorry about that!) You have till Nov 5th to fill out this form in order to get the Hacktoberfest shirt!Thank you for contributing during Hacktoberfest! We hope to see you in the repos soon! Just so you know, we always give away a SendGrid shirt for your first ever non-Hacktoberfest PR that gets merged. |
Hello @tsuyoshizawa, |
Client
class closes http client byfinalize
method.However, the method is not promised to be called.
The class should have
close
method to call closing http client expressly.In additional, we shouldn't call
finalize
method expressly if we want to close the client.Closeable
interface supportstry-with-resources Statement
.https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html