void (PsiMethodCallExpression call, @Nls String explanation, @NotNull LocalQuickFix @NotNull ... additionalFixes) { String methodName = Objects.requireNonNull(call.getMethodExpression().getReferenceName()); String message = explanation != null ? JavaBundle.message("inspection.redundant.stream.optional.call.message.with.explanation", methodName, explanation) : JavaBundle.message("inspection.redundant.stream.optional.call.message", methodName); holder.registerProblem(call, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, getRange(call), ArrayUtil.prepend(new RemoveCallFix(methodName), additionalFixes)); }