提交 c48a7c85 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Do not call writer.flush() in IOUtils.closeSilently(Writer)

This call is not required before close() and it will prevent closing of writer
if write fails for some reason.
上级 51da6f49
...@@ -271,7 +271,6 @@ public class IOUtils { ...@@ -271,7 +271,6 @@ public class IOUtils {
public static void closeSilently(Writer writer) { public static void closeSilently(Writer writer) {
if (writer != null) { if (writer != null) {
try { try {
writer.flush();
writer.close(); writer.close();
} catch (Exception e) { } catch (Exception e) {
// ignore // ignore
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论