From 890535905cbc8025de028a4b9d3b8088bd107db2 Mon Sep 17 00:00:00 2001 From: zy <953725892@qq.com> Date: Tue, 26 Sep 2023 20:19:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#I7SVZF=20=E4=BC=98=E5=8C=96=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=AE=9E=E7=8E=B0=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yomahub/liteflow/parser/helper/ParserHelper.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/parser/helper/ParserHelper.java b/liteflow-core/src/main/java/com/yomahub/liteflow/parser/helper/ParserHelper.java index 16e626d1e..b43ac7b79 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/parser/helper/ParserHelper.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/parser/helper/ParserHelper.java @@ -153,7 +153,7 @@ public class ParserHelper { } FlowBus.addChain(chainName); - if(e.attributeValue(ABSTRACT) != null && e.attributeValue(ABSTRACT).equals("true")){ + if(!("true".equals(e.attributeValue(ABSTRACT)))) { abstratChainMap.put(chainName,e); } }); @@ -303,8 +303,8 @@ public class ParserHelper { private static void parseImplChain(Map abstratChainMap, Set implChainSet, Element chain) { if(chain.attributeValue(EXTENDS)!=null){ String baseChainId = chain.attributeValue(EXTENDS); - if(abstratChainMap.containsKey(baseChainId)) { - Element baseChain = abstratChainMap.get(baseChainId); + Element baseChain = abstratChainMap.get(baseChainId); + if(baseChain!=null) { internalParseImplChain(baseChain,chain,abstratChainMap,implChainSet); }else{ throw new ChainNotFoundException(String.format("[abstract chain not found] chainName=%s", baseChainId)); @@ -321,8 +321,8 @@ public class ParserHelper { private static void parseImplChain(Map abstratChainMap, Set implChainSet, JsonNode chainNode) { if(chainNode.hasNonNull(EXTENDS)){ String baseChainId = chainNode.get(EXTENDS).textValue(); - if(abstratChainMap.containsKey(baseChainId)) { - JsonNode baseChain = abstratChainMap.get(baseChainId); + JsonNode baseChain= abstratChainMap.get(baseChainId); + if(baseChain!=null) { internalParseImplChain(baseChain,chainNode,abstratChainMap,implChainSet); }else{ throw new ChainNotFoundException(String.format("[abstract chain not found] chainName=%s", baseChainId));