Adjust KotlinJavaPsiFacade::knownClassNamesInPackage for empty scope
The method must return an empty set in that case, instead of null that would mean we can't compute it. The problem was found when running FirLoadCompiledKotlinGenerated
This commit is contained in:
committed by
Space Team
parent
9c988fd8d8
commit
490970e65e
+5
-5
@@ -52,10 +52,7 @@ import org.jetbrains.kotlin.name.ClassId;
|
||||
import org.jetbrains.kotlin.name.FqName;
|
||||
import org.jetbrains.kotlin.progress.ProgressIndicatorAndCompilationCanceledStatus;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
@@ -214,9 +211,12 @@ public class KotlinJavaPsiFacade implements Disposable {
|
||||
return javaClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null in case the set of names is impossible to compute correctly
|
||||
*/
|
||||
@Nullable
|
||||
public Set<String> knownClassNamesInPackage(@NotNull FqName packageFqName, @NotNull GlobalSearchScope scope) {
|
||||
if (scope == GlobalSearchScope.EMPTY_SCOPE) return null;
|
||||
if (scope == GlobalSearchScope.EMPTY_SCOPE) return Collections.emptySet();
|
||||
|
||||
KotlinPsiElementFinderWrapper[] finders = finders();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user