private static void finishChildren(@NotNull Set<? super ExecutionNode> structureChanged,
                                     @NotNull ExecutionNode node,
                                     @NotNull EventResult result) {
    List<ExecutionNode> childList = node.getChildList();
    if (childList.isEmpty()) return;
    // Make a copy of the list since child.setResult may remove items from the collection.
    for (ExecutionNode child : new ArrayList<>(childList)) {
      if (!child.isRunning()) {
        continue;
      }
      finishChildren(structureChanged, child, result);
      addIfNotNull(structureChanged, child.setResult(result));
    }
  }
private static void finishChildren(@NotNull Set<? super ExecutionNode> structureChanged,
                                     @NotNull ExecutionNode node,
                                     @NotNull EventResult result)