Closed
Description
It would be nice to implement AutoCloseable
interface in Channel
class and override its' close
method.
AutoCloseable
implementation was previously done in #131 in Connection
class but Channel
was left with a comment "I wanted to add it to Channel-class also but it had a checked exception TimedOutException that broke the contract of Closeable so I avoided it." (#133) but there is no specification for close
method to not throw java.util.concurrent.TimeoutException
. close
method should not throw java.lang.InterruptedException
.