private static @NotNull List<? extends VirtualFile> asList(@NotNull Collection<? extends VirtualFile> collection) {
    return collection instanceof List ? (List<? extends VirtualFile>)collection : new ArrayList<>(collection);
  }
private static @NotNull List<? extends VirtualFile> asList(@NotNull Collection<? extends VirtualFile> collection)