From 4f460c7e8222e114d0f95424bf3db91679029943 Mon Sep 17 00:00:00 2001 From: Marcin Mikosik Date: Mon, 25 Aug 2025 08:41:54 +0000 Subject: [PATCH] [java] Fix misleading parameter name in ArgumentFixerActionFactory.doCheckNewCall() Merge-request: IJ-MR-173247 Merged-by: Marcin Mikosik GitOrigin-RevId: edacdd428f0add5c5521f3add7275f8b43ce0acf --- .../daemon/impl/quickfix/ArgumentFixerActionFactory.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/ArgumentFixerActionFactory.java b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/ArgumentFixerActionFactory.java index efe66e71b976..1ac3984366c2 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/ArgumentFixerActionFactory.java +++ b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/ArgumentFixerActionFactory.java @@ -115,11 +115,11 @@ public abstract class ArgumentFixerActionFactory { } } - private static void doCheckNewCall(PsiType expectedTypeByParent, PsiCall callWithSingleCast, Runnable registerIntentions) { - JavaResolveResult resolveResult = callWithSingleCast.resolveMethodGenerics(); + private static void doCheckNewCall(PsiType expectedTypeByParent, PsiCall call, Runnable registerIntentions) { + JavaResolveResult resolveResult = call.resolveMethodGenerics(); if (resolveResult.getElement() != null && resolveResult.isValidResult()) { - if (expectedTypeByParent != null && callWithSingleCast instanceof PsiCallExpression) { - PsiType type = ((PsiCallExpression)callWithSingleCast).getType(); + if (expectedTypeByParent != null && call instanceof PsiCallExpression callExpression) { + PsiType type = callExpression.getType(); if (type != null && !TypeConversionUtil.isAssignable(expectedTypeByParent, type)) return; } registerIntentions.run();