Skip to content

Commit

Permalink
Older HQ connection classes inherit the close method
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrossley3 committed Aug 10, 2015
1 parent ddac4fc commit 3710d6a
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -34,9 +34,10 @@ public void closeCloseables() throws Exception {
((AutoCloseable) each).close();
} else {
try {
Method close = each.getClass().getDeclaredMethod("close");
Method close = each.getClass().getMethod("close");
close.invoke(each);
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {

throw new RuntimeException("Can't close object of class " + each.getClass().getName(), e);
}
}
Expand Down

0 comments on commit 3710d6a

Please sign in to comment.