ihuzenko commented on a change in pull request #1559: DRILL-540: Allow querying hive views in Drill URL: https://github.com/apache/drill/pull/1559#discussion_r242121992
########## File path: common/src/main/java/org/apache/drill/common/AutoCloseables.java ########## @@ -92,4 +93,19 @@ public static void close(Iterable<? extends AutoCloseable> ac) throws Exception throw topLevelException; } } + + /** + * Close all without caring about thrown exceptions + * @param closeables - array containing auto closeables + */ + public static void closeSilently(AutoCloseable... closeables) { + Arrays.stream(closeables).filter(Objects::nonNull) + .forEach(target -> { + try { + target.close(); + } catch (Exception ignored) { + // noop Review comment: done ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services