From b928e31d0ae1bcdd98b84de199dd5d471c44fcc8 Mon Sep 17 00:00:00 2001 From: zendwang Date: Thu, 1 Apr 2021 16:21:20 +0800 Subject: [PATCH] =?UTF-8?q?refactor=20=E6=9B=BF=E6=8D=A2=E4=B8=BAhutool?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yomahub/liteflow/core/FlowExecutor.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java b/liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java index fe2a83c8a..d09bf88ae 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/core/FlowExecutor.java @@ -111,8 +111,6 @@ public class FlowExecutor { public LiteflowResponse execute(String chainId, Object param, Class slotClazz, Integer slotIndex, boolean isInnerChain) throws Exception { - Slot slot = null; - if (FlowBus.needInit()) { init(); } @@ -133,8 +131,8 @@ public class FlowExecutor { throw new NoAvailableSlotException("there is no available slot"); } - slot = DataBus.getSlot(slotIndex); - if (slot == null) { + Slot slot = DataBus.getSlot(slotIndex); + if (ObjectUtil.isNull(slot)) { throw new NoAvailableSlotException("the slot is not exist"); }