public static void closeQuietly ( @ Nullable final AutoCloseable closeable ) { try { if ( closeable != null ) { closeable . close ( ) ; } } catch ( Exception e ) { LOG . warn ( "Error closing instance {}." , closeable , e ) ; } }
Calls close on the provided instance . If an exception occurs it is logged instead of propagating it .