From 2608f171b655672114d746c3057186ceac8879d7 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 25 Mar 2022 16:16:22 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-65854=20=E8=B5=84=E6=BA=90=E9=87=8A?= =?UTF-8?q?=E6=94=BE=E6=B2=A1=E6=9C=89=E5=9C=A8finally=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=AE=B5=E4=B8=AD=E8=BF=9B=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/main/java/com/fr/design/RestartHelper.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/RestartHelper.java b/designer-base/src/main/java/com/fr/design/RestartHelper.java index 64fdda7baa..9c14fd4157 100644 --- a/designer-base/src/main/java/com/fr/design/RestartHelper.java +++ b/designer-base/src/main/java/com/fr/design/RestartHelper.java @@ -57,10 +57,8 @@ public class RestartHelper { properties.setProperty((i + size) + "", files[i]); } } - try { - FileOutputStream file2DeleteOutputStream = new FileOutputStream(file); + try (FileOutputStream file2DeleteOutputStream = new FileOutputStream(file)) { properties.store(file2DeleteOutputStream, "save"); - file2DeleteOutputStream.close(); } catch (IOException e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); }