mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix "modifying immutable collections" warnings
GitOrigin-RevId: 5a98fca8ccd622a64d1c8de632c6c3b0af8a78c2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
36f9e0a5d8
commit
a6b53c8961
@@ -183,9 +183,8 @@ public final class JavaPsiModuleUtil {
|
||||
}
|
||||
JavaSourceRootType rootType = inTests ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE;
|
||||
ModuleRootManager rootManager = ModuleRootManager.getInstance(module);
|
||||
List<VirtualFile> sourceRoots = rootManager.getSourceRoots(rootType);
|
||||
Set<VirtualFile> excludeRoots = ContainerUtil.newHashSet(ModuleRootManager.getInstance(module).getExcludeRoots());
|
||||
if (!excludeRoots.isEmpty()) sourceRoots.removeIf(root -> excludeRoots.contains(root));
|
||||
List<VirtualFile> sourceRoots = ContainerUtil.filter(rootManager.getSourceRoots(rootType), root -> !excludeRoots.contains(root));
|
||||
|
||||
List<VirtualFile> files = ContainerUtil.mapNotNull(sourceRoots, root -> root.findChild(PsiJavaModule.MODULE_INFO_FILE));
|
||||
if (files.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user