public static void closeBoth ( Closeable first , Closeable second ) throws IOException { //noinspection EmptyTryBlock try ( Closeable ignore1 = second ; Closeable ignore2 = first ) { // piggy-back try-with-resources semantics } }
Call method instead of code like