This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-scxml.git
commit 47958a1c27dea72c8debd6abcc330c9feb0999f5 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu Sep 12 10:44:31 2024 -0400 Merge else if block --- .../commons/scxml2/test/StandaloneUtils.java | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/apache/commons/scxml2/test/StandaloneUtils.java b/src/main/java/org/apache/commons/scxml2/test/StandaloneUtils.java index de7f8cc5..c43944d9 100644 --- a/src/main/java/org/apache/commons/scxml2/test/StandaloneUtils.java +++ b/src/main/java/org/apache/commons/scxml2/test/StandaloneUtils.java @@ -110,21 +110,20 @@ public final class StandaloneUtils { rootCtx.setLocal(name, value); System.out.println("Set variable " + name + " to " + value); - } else if (event.trim().isEmpty() - || event.equalsIgnoreCase("null")) { - final TriggerEvent[] evts = {new EventBuilder(null,TriggerEvent.SIGNAL_EVENT).build()}; - exec.triggerEvents(evts); - if (exec.getStatus().isFinal()) { - System.out.println("A final configuration reached."); - } } else { - final StringTokenizer st = new StringTokenizer(event); - final int tkns = st.countTokens(); - final TriggerEvent[] evts = new TriggerEvent[tkns]; - for (int i = 0; i < tkns; i++) { - evts[i] = new EventBuilder(st.nextToken(), TriggerEvent.SIGNAL_EVENT).build(); + if (event.trim().isEmpty() + || event.equalsIgnoreCase("null")) { + final TriggerEvent[] evts = {new EventBuilder(null,TriggerEvent.SIGNAL_EVENT).build()}; + exec.triggerEvents(evts); + } else { + final StringTokenizer st = new StringTokenizer(event); + final int tkns = st.countTokens(); + final TriggerEvent[] evts = new TriggerEvent[tkns]; + for (int i = 0; i < tkns; i++) { + evts[i] = new EventBuilder(st.nextToken(), TriggerEvent.SIGNAL_EVENT).build(); + } + exec.triggerEvents(evts); } - exec.triggerEvents(evts); if (exec.getStatus().isFinal()) { System.out.println("A final configuration reached."); }