void (PsiSwitchBlock switchBlock) { final PsiExpression expression = switchBlock.getExpression(); if (expression == null) { return; } final PsiType type = expression.getType(); final PsiPrimitiveType unboxedType = PsiPrimitiveType.getUnboxedType(type); if (unboxedType != null) { expectedType = unboxedType; } else { expectedType = type; } }