From 382549ac3bc824b35da504690e4b3f5c98701c39 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 26 Dec 2018 11:27:42 +0800 Subject: [PATCH] =?UTF-8?q?load=20=E5=9C=BA=E6=99=AF=E4=B8=8B=20=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=86=85=E5=AD=98=E4=BC=98=E5=8C=96=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/file/HistoryTemplateListCache.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java b/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java index 91af4c830..a84442c58 100644 --- a/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java +++ b/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java @@ -368,8 +368,12 @@ public class HistoryTemplateListCache implements CallbackEvent { continue; } ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes); - // todo readStream 这个行为应该上升到 BaseBook 上 - ((IOFile) historyList.get(i).getTarget()).readStream(inputStream); + BaseBook target = historyList.get(i).getTarget(); + if (target != null) { + // todo readStream 这个行为应该上升到 BaseBook 上 + ((IOFile) target).readStream(inputStream); + } + // 如果 target == null 那么这个模板是被模板内存优化功能处理过的,不用处理 } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); }