void (@NotNull PsiLambdaExpression expression) { final PsiElement body = expression.getBody(); final PsiExpression psiExpression = isCodeBlockRedundant(body); if (psiExpression != null) { final PsiElement errorElement; final PsiElement parent = psiExpression.getParent(); if (parent instanceof PsiReturnStatement) { errorElement = parent.getFirstChild(); } else { errorElement = body.getFirstChild(); } holder.registerProblem(errorElement, JavaAnalysisBundle.message("statement.lambda.can.be.replaced.with.expression.lambda"), new ReplaceWithExprFix()); } }