Skip to content
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

Implement Closable interface #131

Closed
Khazrak opened this issue Feb 3, 2016 · 5 comments
Closed

Implement Closable interface #131

Khazrak opened this issue Feb 3, 2016 · 5 comments
Assignees
Milestone

Comments

@Khazrak
Copy link
Contributor

Khazrak commented Feb 3, 2016

Channel and Connection can implement the Closable interface, the close()-method is already implemented. This will open up the possibility to compile with Java 7 and use the try-with-resource function to avoid try-catch in finally-block of close

@michaelklishin
Copy link
Member

I think you are confusing Closable with AutoCloseable, which is used by try-with-resource. In any case, we cannot require JDK 7 yet. We will be able to once Spring drops JDK 6 compatibility.

@michaelklishin
Copy link
Member

We don't have a tag for will be fixed eventually but the time hasn't come yet and we try to keep issues only to things that are actionable in the next release or two. Here we can't really know when we'd be able to do this => closing.

@Khazrak
Copy link
Contributor Author

Khazrak commented Feb 4, 2016

Closable is JDK 6 and in JDK 7 Closeable extends AutoCloseable, so it would come automatically with the switch. This would also mean that one could download the source and just compile it with JDK 7 and get AutoCloseable

@michaelklishin michaelklishin reopened this Feb 4, 2016
@michaelklishin michaelklishin added this to the 3.7.0 milestone Feb 4, 2016
@michaelklishin
Copy link
Member

Fair enough. @Khazrak feel free to submit a PR against master.

@michaelklishin
Copy link
Member

Fixed in #133 and will be out with 3.7.0, thank you, @Khazrak!

stream-iori pushed a commit to stream-iori/rabbitmq-java-client that referenced this issue Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants