BuckPrologCompiler: Use auto-closeable FileInputStream
Change-Id: I77bb3d6ca7de77c01fb512bc25b78b069be28199
This commit is contained in:
parent
1e2458a0ef
commit
a7a2cc2842
@ -75,8 +75,7 @@ public class BuckPrologCompiler {
|
||||
}
|
||||
|
||||
JarEntry e = new JarEntry(prefix + name);
|
||||
FileInputStream in = new FileInputStream(f);
|
||||
try {
|
||||
try (FileInputStream in = new FileInputStream(f)) {
|
||||
e.setTime(f.lastModified());
|
||||
out.putNextEntry(e);
|
||||
byte[] buf = new byte[16 << 10];
|
||||
@ -85,7 +84,6 @@ public class BuckPrologCompiler {
|
||||
out.write(buf, 0, n);
|
||||
}
|
||||
} finally {
|
||||
in.close();
|
||||
out.closeEntry();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user