You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/03/05 21:13:35 UTC
[GitHub] [accumulo] ctubbsii commented on a change in pull request #1959: Make MiniAccumuloCluster AutoCloseable
ctubbsii commented on a change in pull request #1959:
URL: https://github.com/apache/accumulo/pull/1959#discussion_r588707389
##########
File path: minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
##########
@@ -109,6 +109,14 @@ public void stop() throws IOException, InterruptedException {
impl.stop();
}
+ /**
+ * @since 2.0.1
+ */
+ @Override
+ public void close() throws IOException, InterruptedException {
+ this.stop();
+ }
+
Review comment:
It would probably be better to not throw InterruptedException, but to catch it, and reset the current thread's interrupt status. I found this good explanation of how to handle these: https://dzone.com/articles/how-to-handle-the-interruptedexception
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org