fix: 通过new HashMap替换clone

This commit is contained in:
LesanOuO 2025-01-24 10:30:28 +08:00
parent bcfa08f8ef
commit 8f4543a270
1 changed files with 1 additions and 2 deletions

View File

@ -621,8 +621,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
BpmModelMetaInfoVO.TitleSetting titleSetting = processDefinitionInfo.getTitleSetting();
if (titleSetting != null && Boolean.TRUE.equals(titleSetting.getEnable())) {
AdminUserRespDTO user = adminUserApi.getUser(userId);
// TODO @lesannew HashMap 会更好哈clone 感觉反射不一定合适
Map<String, Object> cloneVariables = ObjectUtil.clone(variables);
Map<String, Object> cloneVariables = new HashMap<>(variables);
cloneVariables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_START_USER_ID, user.getNickname());
cloneVariables.put(BpmnVariableConstants.PROCESS_START_TIME, DateUtil.now());
cloneVariables.put(BpmnVariableConstants.PROCESS_DEFINITION_NAME, definition.getName().trim());