update - 处理 Map 深拷贝的异常问题
This commit is contained in:
parent
4f3c815631
commit
463f0a13c2
@ -26,6 +26,7 @@ import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@ -213,13 +214,15 @@ public class RocketMqMessagePushEventListener implements BpmnMessagePushEventLis
|
||||
if (CollectionUtils.isEmpty(originVariables)) {
|
||||
return variables;
|
||||
}
|
||||
originVariables.forEach((k, v) -> {
|
||||
Iterator<Map.Entry<String, Object>> iterator = originVariables.entrySet().iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Map.Entry<String, Object> entry = iterator.next();
|
||||
REMOVE_KEYS.forEach(key -> {
|
||||
if (k.contains(key)) {
|
||||
originVariables.remove(k);
|
||||
if (entry.getKey().contains(key)) {
|
||||
iterator.remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
variables.putAll(originVariables);
|
||||
return variables;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user