void (@NotNull PsiElement context) { List<@NotNull Problem> problems = SyntaxTraverser.psiTraverser(context) .filter(PsiLambdaExpression.class) .filterMap(TrivialFunctionalExpressionUsageInspection::doCheckLambda) .toList(); for (Problem problem : problems) { if (!problem.place().isValid()) continue; problem.fix().apply(problem.place()); } }