import com.intellij.refactoring.typeMigration.TypeMigrationLabeler;
public class BoxingTypeConversionRule extends TypeConversionRule {
public TypeConversionDescriptorBase findConversion(final PsiType from, final PsiType to, final PsiMember member, final PsiExpression context,
final TypeMigrationLabeler labeler) {
if (to instanceof PsiClassType && from instanceof PsiPrimitiveType) {
<BUG>if (!PsiUtil.getLanguageLevel(context).hasEnumKeywordAndAutoboxing()) {
final String boxedTypeName = ((PsiPrimitiveType)from).getBoxedTypeName();</BUG>
if (Comparing.strEqual(boxedTypeName, to.getCanonicalText())) {
return new TypeConversionDescriptor("$qualifier$", boxedTypeName + ".valueOf($qualifier$)");
}

import com.intellij.refactoring.typeMigration.TypeMigrationLabeler;
public class BoxingTypeConversionRule extends TypeConversionRule {
public TypeConversionDescriptorBase findConversion(final PsiType from, final PsiType to, final PsiMember member, final PsiExpression context,
final TypeMigrationLabeler labeler) {
if (to instanceof PsiClassType && from instanceof PsiPrimitiveType) {
if (!PsiUtil.isLanguageLevel5OrHigher(context)) {
final String boxedTypeName = ((PsiPrimitiveType)from).getBoxedTypeName();
if (Comparing.strEqual(boxedTypeName, to.getCanonicalText())) {
return new TypeConversionDescriptor("$qualifier$", boxedTypeName + ".valueOf($qualifier$)");
