void (@NotNull PsiMethodReferenceExpression methodRef) { PsiMethod method = ObjectUtils.tryCast(methodRef.resolve(), PsiMethod.class); PsiClass targetClass = getInaccessibleMethodReferenceClass(methodRef, method); if (targetClass == null) return; String className = PsiFormatUtil.formatClass(targetClass, PsiFormatUtilBase.SHOW_NAME | PsiFormatUtilBase.SHOW_FQ_NAME); myHolder.registerProblem(methodRef, JavaAnalysisBundle.message("inspection.quirk.method.reference.return.type.message", className)); }