From 9064435dc6d297e643279be4adf4874ae656d030 Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Tue, 9 Jul 2019 10:26:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E6=96=87=E4=BB=B6=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/template/info/TemplateInfoCollector.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfoCollector.java b/designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfoCollector.java index 330b9304a8..9a13ed9d79 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfoCollector.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfoCollector.java @@ -36,6 +36,7 @@ public class TemplateInfoCollector implements XMLReadable, XMLWriter { private static final String XML_TEMPLATE_INFO_LIST = "TemplateInfoList"; private static final String XML_FILE_NAME = "tpl.info"; private static TemplateInfoCollector instance; + private static final int MAX_SIZE = 512 * 1024 * 1024; private Map templateInfoMap; private DesignerOpenHistory designerOpenHistory; @@ -167,7 +168,7 @@ public class TemplateInfoCollector implements XMLReadable, XMLWriter { } private boolean shouldCollectInfo() { - return DesignerEnvManager.getEnvManager().isJoinProductImprove() && FRContext.isChineseEnv(); + return FileUtils.sizeOf(getInfoFile()) <= MAX_SIZE && DesignerEnvManager.getEnvManager().isJoinProductImprove() && FRContext.isChineseEnv(); } /**