Commit 8f4543a270ffc80f5471221653378111efc04792
1 parent
bcfa08f8
fix: 通过new HashMap替换clone
Showing
1 changed file
with
1 additions
and
2 deletions
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java
| ... | ... | @@ -621,8 +621,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 621 | 621 | BpmModelMetaInfoVO.TitleSetting titleSetting = processDefinitionInfo.getTitleSetting(); |
| 622 | 622 | if (titleSetting != null && Boolean.TRUE.equals(titleSetting.getEnable())) { |
| 623 | 623 | AdminUserRespDTO user = adminUserApi.getUser(userId); |
| 624 | - // TODO @lesan:new HashMap 会更好哈。clone 感觉反射,不一定合适。 | |
| 625 | - Map<String, Object> cloneVariables = ObjectUtil.clone(variables); | |
| 624 | + Map<String, Object> cloneVariables = new HashMap<>(variables); | |
| 626 | 625 | cloneVariables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_START_USER_ID, user.getNickname()); |
| 627 | 626 | cloneVariables.put(BpmnVariableConstants.PROCESS_START_TIME, DateUtil.now()); |
| 628 | 627 | cloneVariables.put(BpmnVariableConstants.PROCESS_DEFINITION_NAME, definition.getName().trim()); | ... | ... |