Summary: @public Using the Closeable as resource approach allows to deal with the case of user defined varations of closeQuietly Test Plan: Infer CI.master
parent
11712caea9
commit
f0026006e7
@ -0,0 +1,18 @@
|
||||
// Copyright (c) 2015-Present Facebook. All rights reserved.
|
||||
|
||||
package codetoanalyze.java.infer;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
public class Utils {
|
||||
|
||||
public static void closeQuietly(Closeable closeable) {
|
||||
try {
|
||||
if (closeable != null) {
|
||||
closeable.close();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue