void (PsiMethod ctor) { ConstructorSimplifier simplifier = createCtorSimplifier(ctor); if (simplifier instanceof RemoveRedundantCtorSimplifier) { PsiIdentifier nameIdentifier = ctor.getNameIdentifier(); if (nameIdentifier == null) return; holder.registerProblem(nameIdentifier, JavaBundle.message("inspection.redundant.record.constructor.canonical.message"), ProblemHighlightType.GENERIC_ERROR_OR_WARNING, simplifier); } else if (simplifier instanceof MakeCtorCompactSimplifier) { holder.registerProblem(ctor.getParameterList(), JavaBundle.message("inspection.redundant.record.constructor.can.be.compact.message"), ProblemHighlightType.GENERIC_ERROR_OR_WARNING, simplifier); } }