提交 6d841436 编写于 作者: O o2null

Merge branch 'fix/codeutil' into 'wrdp'

使用closeable关闭

See merge request o2oa/o2oa!2294
......@@ -214,9 +214,9 @@ public class CodeUtil {
*/
public static File decoderBase64File(String targetPath, String base64Code) throws Exception {
byte[] buffer = Base64.decodeBase64(base64Code);
FileOutputStream out = new FileOutputStream(targetPath);
out.write(buffer);
out.close();
try (FileOutputStream out = new FileOutputStream(targetPath)) {
out.write(buffer);
}
File file = new File(targetPath);
return file;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册