diff --git a/java/java-impl/src/com/intellij/refactoring/typeMigration/rules/RootTypeConversionRule.java b/java/java-impl/src/com/intellij/refactoring/typeMigration/rules/RootTypeConversionRule.java index c32b873207fa..052d27ab66c0 100644 --- a/java/java-impl/src/com/intellij/refactoring/typeMigration/rules/RootTypeConversionRule.java +++ b/java/java-impl/src/com/intellij/refactoring/typeMigration/rules/RootTypeConversionRule.java @@ -84,8 +84,9 @@ public class RootTypeConversionRule extends TypeConversionRule { type = superClassSubstitutor.substitute(type); } - if (!originalType.equals(type)) { - labeler.migrateExpressionType(actualParams[i], methodTypeParamsSubstitutor.substitute(type), context, false, true); + final PsiType migrationType = methodTypeParamsSubstitutor.substitute(type); + if (!originalType.equals(migrationType) && !TypeConversionUtil.areTypesAssignmentCompatible(migrationType, actualParams[i])) { + labeler.migrateExpressionType(actualParams[i], migrationType, context, false, true); } } }