boolean (@NotNull PsiClassType left, @NotNull PsiPrimitiveType right) { if (!left.getLanguageLevel().isAtLeast(LanguageLevel.JDK_1_5)) return false; final PsiClass psiClass = left.resolve(); if (psiClass == null) return false; final String qname = psiClass.getQualifiedName(); if (qname == null || !(psiClass instanceof PsiTypeParameter || getAllBoxedTypeSupers(psiClass).contains(qname))) { return false; } final PsiClassType rightBoxed = right.getBoxedType(psiClass.getManager(), left.getResolveScope()); return rightBoxed != null && isAssignable(left, rightBoxed); }