Browse Source

Pull request #17297: REPORT-153340 代码中部分资源流未关闭,使用 try-with-resources 自动关闭流

Merge in DESIGN/design from ~SHENGZU.XUE/design:release/11.0 to release/11.0

* commit 'b186297457971acd9c1c79ad5b9015fee7eb1c4d':
  REPORT-153340 代码中部分资源流未关闭,使用 try-with-resources 自动关闭流
release/11.0
Shengzu.Xue-薛胜祖 2 weeks ago
parent
commit
c039946000
  1. 5
      designer-base/src/main/java/com/fr/design/RestartHelper.java

5
designer-base/src/main/java/com/fr/design/RestartHelper.java

@ -110,8 +110,8 @@ public class RestartHelper {
private static boolean deleteWhenDebug() { private static boolean deleteWhenDebug() {
File ff = new File(RECORD_FILE); File ff = new File(RECORD_FILE);
Properties properties = new Properties(); Properties properties = new Properties();
try { try (FileInputStream fis = new FileInputStream(ff)) {
properties.load(new FileInputStream(ff)); properties.load(fis);
} catch (IOException ignore) { } catch (IOException ignore) {
return true; return true;
} }
@ -163,7 +163,6 @@ public class RestartHelper {
} }
/** /**
* 重启设计器并删除某些特定的文件 * 重启设计器并删除某些特定的文件
* *

Loading…
Cancel
Save