Null checks to avoid NPEs (#1917) (#1918)

This commit is contained in:
Henrique Guedes 2018-10-31 05:25:49 -04:00 committed by Josephine Lim
parent 154f1622b2
commit 293cccd897
3 changed files with 12 additions and 3 deletions

View file

@ -45,8 +45,12 @@ public class FileUtils {
e.printStackTrace();
} finally {
try {
out.close();
in.close();
if(out != null) {
out.close();
}
if(in != null) {
in.close();
}
} catch (IOException e) {
e.printStackTrace();
}