@Override
  public @NotNull PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly) {
    return new JavaElementVisitor() {
      @Override
      public void visitLambdaExpression(@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());
        }
      }
    };
  }
@Override
  public @NotNull PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly)