DfaAssist#computeHints: catch AbsentInformationException

GitOrigin-RevId: 557db9a449c6f5968b5f410e9e8c53d7e650378d
This commit is contained in:
Tagir Valeev
2019-11-08 10:34:40 +00:00
committed by intellij-monorepo-bot
parent 0a23d9f8e7
commit 62bdf2012a
@@ -118,13 +118,19 @@ public class DfaAssist implements DebuggerContextListener {
}
@NotNull
static Map<PsiExpression, DfaHint> computeHints(StackFrame frame, PsiElement element) throws AbsentInformationException {
static Map<PsiExpression, DfaHint> computeHints(StackFrame frame, PsiElement element) {
Method method = frame.location().method();
if (!element.isValid()) return Collections.emptyMap();
PsiMethod psiMethod = PsiTreeUtil.getParentOfType(element, PsiMethod.class);
if (psiMethod == null || !psiMethod.getName().equals(method.name()) ||
psiMethod.getParameterList().getParametersCount() != method.arguments().size()) {
boolean methodMatches = false;
try {
methodMatches = psiMethod == null || !psiMethod.getName().equals(method.name()) ||
psiMethod.getParameterList().getParametersCount() != method.arguments().size();
}
catch (AbsentInformationException ignored) {
}
if (!methodMatches) {
return Collections.emptyMap();
}
PsiStatement statement = getAnchorStatement(element);