Skip to content

Commit

Permalink
[hotfix] IOUtils.closeQuietly() closes absolutely quietly.
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanEwen committed Dec 2, 2016
1 parent 2fcef5e commit a2cb5df
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions flink-core/src/main/java/org/apache/flink/util/IOUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,15 @@ public static void closeSocket(final Socket sock) {
}
}

/**
* <p><b>Important:</b> This method is expected to never throw an exception.
*/
public static void closeQuietly(Closeable closeable) {
try {
if (closeable != null) {
closeable.close();
}
} catch (IOException ignored) {

}
} catch (Throwable ignored) {}
}

// ------------------------------------------------------------------------
Expand Down

0 comments on commit a2cb5df

Please sign in to comment.