diff --git a/java/java-psi-impl/src/com/intellij/codeInsight/ExceptionUtil.java b/java/java-psi-impl/src/com/intellij/codeInsight/ExceptionUtil.java index 0b6398ec9a8f..92fe13866aac 100644 --- a/java/java-psi-impl/src/com/intellij/codeInsight/ExceptionUtil.java +++ b/java/java-psi-impl/src/com/intellij/codeInsight/ExceptionUtil.java @@ -266,7 +266,9 @@ public class ExceptionUtil { unhandledExceptions = getUnhandledExceptions(expression, topElement, includeSelfCalls); } else if (element instanceof PsiMethodReferenceExpression) { - unhandledExceptions = getUnhandledExceptions((PsiMethodReferenceExpression)element, topElement); + PsiExpression qualifierExpression = ((PsiMethodReferenceExpression)element).getQualifierExpression(); + return qualifierExpression != null ? collectUnhandledExceptions(qualifierExpression, topElement, null, false) + : Collections.emptySet(); } else if (element instanceof PsiLambdaExpression) { return Collections.emptySet();