type migration: avoid migration from primitive to boxed and vice versa (IDEA-114902)

This commit is contained in:
anna
2013-10-21 18:34:59 +02:00
parent 64284c1401
commit 4ec547f4bb
@@ -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);
}
}
}