javac ast indices: dirty scope calculation: fix case of empty dirty scope

This commit is contained in:
Dmitry Batkovich
2017-01-26 18:35:22 +03:00
parent 570264007d
commit 869e2b9b80
@@ -165,7 +165,9 @@ public class DirtyScopeHolder extends UserDataHolderBase {
}
private GlobalSearchScope calculateDirtyScope() {
GlobalSearchScope dirtyModuleScope = GlobalSearchScope.union(getAllDirtyModules()
final Set<Module> dirtyModules = getAllDirtyModules();
if (dirtyModules.isEmpty()) return myExcludedFilesScope;
GlobalSearchScope dirtyModuleScope = GlobalSearchScope.union(dirtyModules
.stream()
.map(Module::getModuleWithDependentsScope)
.toArray(GlobalSearchScope[]::new));