fix: 状态机初始化状态逻辑失效.

This commit is contained in:
2025-04-11 09:16:46 +08:00
parent cdfe94de08
commit bbde9acf55
4 changed files with 20 additions and 2 deletions

View File

@@ -167,6 +167,9 @@ public abstract class AbstractStateManager<S> implements StateManager<S> {
* @return 序号 {@link List#indexOf(Object)}
*/
protected int indexOf(S state) {
if (state == null) {
return -1;
}
return stateList.indexOf(state);
}