change signature: show conflicts if delegated method has same erasure as initial one (IDEA-157672)

This commit is contained in:
Anna Kozlova
2016-06-30 21:02:38 +03:00
parent 1af51530f4
commit 41998a977e
4 changed files with 14 additions and 3 deletions
@@ -1002,7 +1002,7 @@ public class JavaChangeSignatureUsageProcessor implements ChangeSignatureUsagePr
LOG.error(e);
}
}
checkContract(conflictDescriptions, myChangeInfo.getMethod());
for (UsageInfo usageInfo : usagesSet) {
@@ -1104,7 +1104,7 @@ public class JavaChangeSignatureUsageProcessor implements ChangeSignatureUsagePr
prototype.getParameterList().add(param);
}
ConflictsUtil.checkMethodConflicts(method.getContainingClass(), method, prototype, conflicts);
ConflictsUtil.checkMethodConflicts(method.getContainingClass(), myChangeInfo.isGenerateDelegate() ? null : method, prototype, conflicts);
}
catch (IncorrectOperationException e) {
LOG.error(e);
@@ -53,7 +53,7 @@ public class ConflictsUtil {
}
public static void checkMethodConflicts(@Nullable PsiClass aClass,
PsiMethod refactoredMethod,
@Nullable PsiMethod refactoredMethod,
final PsiMethod prototype,
final MultiMap<PsiElement,String> conflicts) {
if (prototype == null) return;