EnumStateMachineFactory doesn't always check initial state

- Adding initial state check
- Fixes #59
This commit is contained in:
Janne Valkealahti
2015-05-06 18:26:43 +01:00
parent 8e42ca0688
commit a3cceee651

View File

@@ -295,7 +295,9 @@ public class EnumStateMachineFactory<S extends Enum<S>, E extends Enum<E>> exten
state = stateMap.get(stateData.getState());
if (state != null) {
states.add(state);
initialState = state;
if (stateData.isInitial()) {
initialState = state;
}
continue;
}
if (stateMachine != null) {