From 5a76e18da7b4c49a1dfae3f4440c33bb6aa15577 Mon Sep 17 00:00:00 2001 From: pavl_g Date: Tue, 15 Aug 2023 12:56:00 +0300 Subject: [PATCH] TransitionalManager#transit(long, TransitionPath, TransitionalListener): code fix --- .gitignore | 2 ++ .../java/com/avrsandbox/fsa/core/TransitionalManager.java | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 76bd6fc..a1cdcec 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ build bin +.idea + .vscode apache-maven-3.9.3 diff --git a/automata4j/src/main/java/com/avrsandbox/fsa/core/TransitionalManager.java b/automata4j/src/main/java/com/avrsandbox/fsa/core/TransitionalManager.java index 676e690..2b33e18 100644 --- a/automata4j/src/main/java/com/avrsandbox/fsa/core/TransitionalManager.java +++ b/automata4j/src/main/java/com/avrsandbox/fsa/core/TransitionalManager.java @@ -122,9 +122,8 @@ public void transit(TransitionPath transitionPath, TransitionListener transitionPath, TransitionListener transitionListener) throws InterruptedException { - transit(time, transitionPath.getPresentState().getInput(), transitionListener); - assignNextState(transitionPath.getNextState()); - transitionPath.removePresentState(); + Thread.sleep(time); + transit(transitionPath, transitionListener); } /**