Browse Source

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

release/11.0
shengzu.xue 2 weeks ago
parent
commit
b186297457
  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() {
File ff = new File(RECORD_FILE);
Properties properties = new Properties();
try {
properties.load(new FileInputStream(ff));
try (FileInputStream fis = new FileInputStream(ff)) {
properties.load(fis);
} catch (IOException ignore) {
return true;
}
@ -163,7 +163,6 @@ public class RestartHelper {
}
/**
* 重启设计器并删除某些特定的文件
*

Loading…
Cancel
Save