@NotNull
  @Override
  public List<AbstractTreeNode<?>> getChildren(Object object) {
    if (object instanceof AbstractTreeNode<?> parent && model.isValidThread()) {
      Collection<?> children = parent.getChildren();
      if (!children.isEmpty()) {
        List<AbstractTreeNode<?>> result = new SmartList<>();
        children.forEach(child -> {
          if (child instanceof AbstractTreeNode<?> node) {
            node.setParent(parent);
            node.update();
            result.add(node);
          }
        });
        Comparator<? super NodeDescriptor<?>> comparator = this.comparator;
        if (comparator != null) {
          result.sort(comparator);
        }
        return result;
      }
    }
    return Collections.emptyList();
  }
@NotNull
  @Override
  public List<AbstractTreeNode<?>> getChildren(Object object)