Browse Source

REPORT-65854 资源释放没有在finally 代码段中进行

bugfix/11.0
hades 3 years ago
parent
commit
2608f171b6
  1. 4
      designer-base/src/main/java/com/fr/design/RestartHelper.java

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

@ -57,10 +57,8 @@ public class RestartHelper {
properties.setProperty((i + size) + "", files[i]); properties.setProperty((i + size) + "", files[i]);
} }
} }
try { try (FileOutputStream file2DeleteOutputStream = new FileOutputStream(file)) {
FileOutputStream file2DeleteOutputStream = new FileOutputStream(file);
properties.store(file2DeleteOutputStream, "save"); properties.store(file2DeleteOutputStream, "save");
file2DeleteOutputStream.close();
} catch (IOException e) { } catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }

Loading…
Cancel
Save