Merge branch 'release/2.1.9'
This commit is contained in:
commit
efa3f8616b
2
pom.xml
2
pom.xml
@ -7,7 +7,7 @@
|
||||
|
||||
<groupId>me.bvn13.fsm</groupId>
|
||||
<artifactId>fsm</artifactId>
|
||||
<version>2.1.8</version>
|
||||
<version>2.1.9</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -149,9 +149,9 @@ public class Fsm<T extends Fsm, E> {
|
||||
return;
|
||||
}
|
||||
currentState.process(event);
|
||||
currentState.afterEvent();
|
||||
if (currentState.isFinish()) {
|
||||
done = true;
|
||||
currentState.afterEvent();
|
||||
return;
|
||||
}
|
||||
switchToNextState(event);
|
||||
@ -278,6 +278,7 @@ public class Fsm<T extends Fsm, E> {
|
||||
}
|
||||
|
||||
private void nextState(State<E> state, E event) {
|
||||
currentState.afterEvent();
|
||||
previousState = currentState;
|
||||
currentState = state;
|
||||
currentState.beforeEvent();
|
||||
|
Loading…
Reference in New Issue
Block a user