From d680b14ee033da5b7edf2406c35a93583a8f8eed Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Thu, 1 Jun 2023 12:27:30 +0200 Subject: Multi-param Java methods should not qualify for a setter (#3002) --- .../base/src/main/kotlin/translators/psi/PsiAccessorConventionUtil.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/base/src/main/kotlin/translators/psi') diff --git a/plugins/base/src/main/kotlin/translators/psi/PsiAccessorConventionUtil.kt b/plugins/base/src/main/kotlin/translators/psi/PsiAccessorConventionUtil.kt index 2ab70843..3c1cb2cf 100644 --- a/plugins/base/src/main/kotlin/translators/psi/PsiAccessorConventionUtil.kt +++ b/plugins/base/src/main/kotlin/translators/psi/PsiAccessorConventionUtil.kt @@ -82,7 +82,7 @@ internal fun PsiMethod.isGetterFor(field: PsiField): Boolean { } internal fun PsiMethod.isSetterFor(field: PsiField): Boolean { - return parameterList.getParameter(0)?.type == field.type + return parameterList.getParameter(0)?.type == field.type && parameterList.getParametersCount() == 1 } internal fun Visibility.isPublicAPI() = when(this) { -- cgit