Polish contribution

See gh-24393
This commit is contained in:
Sam Brannen 2020-02-04 13:41:31 +01:00
parent d624dc084f
commit 72685b1d81
1 changed files with 6 additions and 7 deletions

View File

@ -224,16 +224,15 @@ public abstract class FileCopyUtils {
}
/**
* Close the {@link Closeable} as a null-safety.
*
* @param closeable to close, may be null.
* Attempt to close the supplied {@link Closeable}, silently swallowing any
* exceptions.
* @param closeable the {@code Closeable} to close
*/
private static void close(@Nullable Closeable closeable) {
if (closeable == null) return;
private static void close(Closeable closeable) {
try {
closeable.close();
} catch (IOException e) {
// do nothing
} catch (IOException ex) {
// ignore
}
}