mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 11:47:50 +07:00
[global inspections] one more initialization check
GitOrigin-RevId: ead649d4166a993c479c05d54026494f806951ca
This commit is contained in:
committed by
intellij-monorepo-bot
parent
17501f57a8
commit
d1bacc33fc
@@ -57,6 +57,7 @@ public class RefJavaUtilImpl extends RefJavaUtil {
|
||||
PsiClass javaClass = node.resolve();
|
||||
if (javaClass != null) {
|
||||
final RefElement refClass = refFrom.getRefManager().getReference(javaClass.getOriginalElement());
|
||||
if (refClass != null) refClass.waitForInitialized();
|
||||
refFrom.addReference(refClass, javaClass.getOriginalElement(), decl, false, true, null);
|
||||
}
|
||||
return false;
|
||||
@@ -525,6 +526,7 @@ public class RefJavaUtilImpl extends RefJavaUtil {
|
||||
@Override
|
||||
public boolean isInheritor(@NotNull RefClass subClass, RefClass superClass) {
|
||||
if (subClass == superClass) return true;
|
||||
LOG.assertTrue(subClass.isInitialized());
|
||||
|
||||
for (RefClass baseClass : subClass.getBaseClasses()) {
|
||||
if (isInheritor(baseClass, superClass)) return true;
|
||||
@@ -598,6 +600,7 @@ public class RefJavaUtilImpl extends RefJavaUtil {
|
||||
RefEntity parent = refElement.getOwner();
|
||||
|
||||
while (!(parent instanceof RefClass) && parent instanceof RefElement) {
|
||||
LOG.assertTrue(((RefElement)parent).isInitialized());
|
||||
parent = parent.getOwner();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user