[lombok] dry,use existing code

GitOrigin-RevId: 80784a5ab315bb6b73ef5edc87ef2a3b6a43f2f6
This commit is contained in:
Michail Plushnikov
2023-01-27 09:42:50 +01:00
committed by intellij-monorepo-bot
parent 89cc02b5bc
commit 31eec004df

View File

@@ -20,7 +20,7 @@ public class DelegateMethodProcessor extends AbstractMethodProcessor {
@Override
protected boolean validate(@NotNull PsiAnnotation psiAnnotation, @NotNull PsiMethod psiMethod, @NotNull ProblemSink problemSink) {
boolean result = true;
if (psiMethod.getParameterList().getParametersCount() > 0) {
if (psiMethod.hasParameters()) {
problemSink.addErrorMessage("inspection.message.delegate.legal.only.on.no.argument.methods");
result = false;
}