mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
better stub gc-ability during inheritor search in FindSuperElementsHelper.getSiblingInheritedViaSubClass
This commit is contained in:
@@ -76,15 +76,15 @@ public class FindSuperElementsHelper {
|
||||
if (!hasSubClass) {
|
||||
return null;
|
||||
}
|
||||
final Collection<PsiClass> checkedInterfaces = new THashSet<PsiClass>();
|
||||
final Collection<PsiAnchor> checkedInterfaces = new THashSet<PsiAnchor>();
|
||||
final PsiMethod[] result = new PsiMethod[1];
|
||||
ClassInheritorsSearch.search(containingClass, true).forEach(new Processor<PsiClass>() {
|
||||
ClassInheritorsSearch.search(containingClass, containingClass.getUseScope(), true, true, false).forEach(new Processor<PsiClass>() {
|
||||
@Override
|
||||
public boolean process(PsiClass inheritor) {
|
||||
for (PsiClassType interfaceType : inheritor.getImplementsListTypes()) {
|
||||
PsiClassType.ClassResolveResult resolved = interfaceType.resolveGenerics();
|
||||
PsiClass anInterface = resolved.getElement();
|
||||
if (anInterface == null || !checkedInterfaces.add(anInterface)) continue;
|
||||
if (anInterface == null || !checkedInterfaces.add(PsiAnchor.create(anInterface))) continue;
|
||||
for (PsiMethod superMethod : anInterface.findMethodsByName(method.getName(), true)) {
|
||||
PsiClass superInterface = superMethod.getContainingClass();
|
||||
if (superInterface == null) {
|
||||
|
||||
Reference in New Issue
Block a user