From 793caec8900b40ee63f4c9c597273d2c3b050090 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 21 Oct 2021 15:51:30 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-60253=20=E5=AE=89=E8=A3=85=E5=A4=A7?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E5=AF=BC=E5=87=BA=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E6=A8=A1=E6=9D=BF=E4=BB=8E=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=88=B0=E8=BF=9C=E7=A8=8B=EF=BC=8C=E5=86=8D?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=88=B0=E6=9C=AC=E5=9C=B0=EF=BC=8C=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E4=BF=9D=E5=AD=98=E6=A8=A1=E6=9D=BF=E4=BC=9A=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=20=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5=EF=BC=8C?= =?UTF-8?q?=E6=9C=89npe=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 4 +++- .../main/java/com/fr/design/mainframe/JTemplateFactory.java | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index f2e3470a8..1ccc07303 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -381,7 +381,9 @@ public abstract class JTemplate> */ @Deprecated public void refreshResource() { - refreshResource(this.editingFILE); + if (JTemplateFactory.isAvailable()) { + refreshResource(this.editingFILE); + } } public void refreshResource(FILE file) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java index 5e75cc64b..9aa8204d6 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java @@ -93,4 +93,7 @@ public final class JTemplateFactory { ALL_APP.remove(app); } } -} \ No newline at end of file + + public static boolean isAvailable() { + return !ALL_APP.isEmpty(); + }} \ No newline at end of file