Add backwards compatibility between StateMachineContext serialization of spring-statemachine 2.0.x and 2.1.x
- Add tests between old serialised context(write) and new context(write) - Fix setting childRefs to empty array instead of null if childRefs are not given.
This commit is contained in:
committed by
Janne Valkealahti
parent
02ecb28751
commit
39ab4a0732
@@ -126,7 +126,7 @@ public class DefaultStateMachineContext<S, E> implements StateMachineContext<S,
|
||||
public DefaultStateMachineContext(List<StateMachineContext<S, E>> childs, S state, E event,
|
||||
Map<String, Object> eventHeaders, ExtendedState extendedState, Map<S, S> historyStates, String id) {
|
||||
this.childs = childs;
|
||||
this.childRefs = null;
|
||||
this.childRefs = new ArrayList<>();
|
||||
this.state = state;
|
||||
this.event = event;
|
||||
this.eventHeaders = eventHeaders;
|
||||
|
||||
Reference in New Issue
Block a user