From db7be5772b30f2fa6cb41e597bbffd78a96e9115 Mon Sep 17 00:00:00 2001 From: Brath Date: Wed, 26 Apr 2023 07:05:02 +0000 Subject: [PATCH] =?UTF-8?q?update=20ruoyi-system/src/main/java/com/ruoyi/w?= =?UTF-8?q?orkflow/service/impl/WfProcessServiceImpl.java.=20=E6=8C=89?= =?UTF-8?q?=E7=85=A7=E4=BD=9C=E8=80=85=E7=9A=84=E4=BB=A3=E7=A0=81=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E9=87=8D=E6=96=B0=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Brath --- .../ruoyi/workflow/service/impl/WfProcessServiceImpl.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/workflow/service/impl/WfProcessServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/workflow/service/impl/WfProcessServiceImpl.java index e87e237c..56d97e29 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/workflow/service/impl/WfProcessServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/workflow/service/impl/WfProcessServiceImpl.java @@ -764,12 +764,10 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce .eq(WfDeployForm::getDeployId, historicProcIns.getDeploymentId()) .eq(WfDeployForm::getFormKey, formKey) .eq(localScope, WfDeployForm::getNodeKey, flowElement.getId())); - //@author Brath - //避免空集合导致的NULL空指针 - if (formInfoList.size() == 0) - continue; + + //@update by Brath:避免空集合导致的NULL空指针 + WfDeployFormVo formInfo = formInfoList.stream().findFirst().orElse(null); - WfDeployFormVo formInfo = formInfoList.iterator().next(); if (ObjectUtil.isNotNull(formInfo)) { // 旧数据 formInfo.getFormName() 为 null String formName = Optional.ofNullable(formInfo.getFormName()).orElse(StringUtils.EMPTY);