PsiExpression (@NotNull PsiLambdaExpression lambda) { MethodReferenceCandidate methodRefCandidate = extractMethodReferenceCandidateExpression(lambda.getBody()); if (methodRefCandidate == null || !methodRefCandidate.mySafeQualifier || !methodRefCandidate.myConformsCodeStyle) return lambda; PsiExpression candidate = getLambdaToMethodReferenceConversionCandidate(lambda, methodRefCandidate.myExpression); return tryConvertToMethodReference(lambda, candidate); }