提交 10466fef 编写于 作者: C christ66

Simplify finally block.

上级 dab8bafa
......@@ -711,12 +711,10 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
}
public byte[] readFileToByteArray(File file) throws IOException {
InputStream in = null;
InputStream in = org.apache.commons.io.FileUtils.openInputStream(file);
try {
in = org.apache.commons.io.FileUtils.openInputStream(file);
return org.apache.commons.io.IOUtils.toByteArray(in);
} finally {
if (in != null)
in.close();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册