Set<VirtualFile> (@NotNull IndexableSetContributor contributor, @NotNull String methodInfo, @NotNull Set<VirtualFile> roots) { for (VirtualFile root : roots) { if (root == null || !root.isValid()) { LOG.error(PluginException.createByClass("Please fix " + contributor.getClass().getName() + "#" + methodInfo + ".\n" + (root == null ? "The returned set is not expected to contain nulls, but it is " + roots : "Invalid file returned: " + root), null, contributor.getClass())); return new LinkedHashSet<>(ContainerUtil.filter(roots, virtualFile -> virtualFile != null && virtualFile.isValid())); } } return roots; }