mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-execution] ExceptionInfoCache: check if cached PSI is still valid
Fixes EA-261426 - PIEAE: SubstrateRef$StubRef.reportError GitOrigin-RevId: cd7a6553850abbf103bee8c0b2c56610cbcbd12c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
94624348d9
commit
232eab2954
@@ -67,7 +67,7 @@ public class ExceptionInfoCache {
|
||||
|
||||
@NotNull ClassResolveInfo resolveClass(String className) {
|
||||
ClassResolveInfo cached = myCache.get(className);
|
||||
if (cached != null) {
|
||||
if (cached != null && cached.isValid()) {
|
||||
return cached;
|
||||
}
|
||||
|
||||
@@ -114,6 +114,11 @@ public class ExceptionInfoCache {
|
||||
}
|
||||
return myExceptionClasses;
|
||||
}
|
||||
|
||||
boolean isValid() {
|
||||
return ContainerUtil.and(myClasses.values(), PsiElement::isValid) &&
|
||||
(myExceptionClasses == null || ContainerUtil.and(myExceptionClasses, PsiElement::isValid));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
static ExceptionInfoCache.ClassResolveInfo create(Project project, PsiElement[] elements) {
|
||||
|
||||
Reference in New Issue
Block a user