private static void addRoots(@NotNull List<? super File> result, File @Nullable ... files) {
    if (files == null) return;
    for (File file : files) {
      if (file == null || !file.isDirectory()) continue;
      result.add(file);
    }
  }
private static void addRoots(@NotNull List<? super File> result, File @Nullable ... files)