Skip to content

Make Channel and Connection implement AutoCloseable for use in try-with-... #25

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

Closed
wants to merge 1 commit into from

Conversation

mshinn
Copy link

@mshinn mshinn commented Dec 24, 2014

...resources

As mentioned in the description, this change will allow Connection and Channel instances to be compatible with the try-with-resources feature: http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html

For try-with-resources to work, both interfaces need to extend AutoCloseable. Since each interface already declares a close() method with the proper signature, the change is trivial.

@michaelklishin
Copy link
Contributor

Thank you for contributing this. We cannot merge this pull request for a couple of reasons:

  • This repository is a mirror.
  • We are not yet ready to drop JDK 6 compatibility.

@dumbbell dumbbell added this to the n/a milestone Mar 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants