void (PsiCall oldCall, PsiCall newCall, PsiExpression oldBranchExpression, PsiExpression newBranchExpression) { PsiExpression operand = ((PsiTypeCastExpression)newBranchExpression).getOperand(); if (operand != null) { newBranchExpression = (PsiExpression)newBranchExpression.replace(operand); JavaResolveResult oldResult = oldCall.resolveMethodGenerics(); JavaResolveResult newResult = resolveNewResult(oldCall, newCall); if (isSameResolveResult(oldResult, newResult)) { addToResults((PsiTypeCastExpression)oldBranchExpression); } else { newBranchExpression.replace(oldBranchExpression); } } }