From 0e6693903cf4d51d052221aec2380018d05467b9 Mon Sep 17 00:00:00 2001 From: pengda Date: Fri, 24 Jun 2022 15:01:39 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-71839=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=97=B6=E5=90=AF=E5=8A=A8=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=EF=BC=8C=E4=BB=8D=E8=BF=9E=E6=9B=BE=E6=96=AD=E5=BC=80?= =?UTF-8?q?=E7=9A=84=E6=9C=8D=E5=8A=A1=E5=99=A8=EF=BC=8C=E4=BC=9A=E6=9C=89?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E6=9B=B4=E6=96=B0=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/versioncheck/VersionCheckUtils.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index fcb763461..fb0ea0c76 100644 --- a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java +++ b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java @@ -96,13 +96,21 @@ public class VersionCheckUtils { } public static void showVersionCheckDialog(String envName) { - new SwingWorker() { + new SwingWorker() { @Override - protected Void doInBackground() throws Exception { - if (!VersionCheckUtils.versionCheck(envName)) { - showNotificationDialog(envName); + protected Boolean doInBackground() { + return !VersionCheckUtils.versionCheck(envName); + } + + @Override + protected void done() { + try { + if (get()) { + showNotificationDialog(envName); + } + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); } - return null; } }.execute(); }