InferenceVariable (PsiType returnType, PsiType targetType) { final InferenceVariable inferenceVariable = getInferenceVariable(returnType); if (inferenceVariable != null) { if (targetType instanceof PsiPrimitiveType && hasPrimitiveWrapperBound(inferenceVariable)) { return inferenceVariable; } if (targetType instanceof PsiClassType) { if (hasUncheckedBounds(inferenceVariable, (PsiClassType)targetType, this) || hasWildcardParameterization(inferenceVariable, (PsiClassType)targetType)) { return inferenceVariable; } } } return null; }