method signature validity assertions for EA-26920

This commit is contained in:
peter
2011-04-13 19:22:26 +02:00
parent 0acf0df76e
commit 568c7e813a
@@ -207,11 +207,14 @@ public class PsiSuperMethodImplUtil {
if (!PsiUtil.isAccessible(hierarchicalMethodSignature.getMethod(), aClass, aClass)) return;
HierarchicalMethodSignatureImpl existing = map.get(signature);
if (existing == null) {
map.put(signature, copy(hierarchicalMethodSignature));
HierarchicalMethodSignatureImpl copy = copy(hierarchicalMethodSignature);
LOG.assertTrue(copy.getMethod().isValid());
map.put(signature, copy);
}
else if (isReturnTypeIsMoreSpecificThan(hierarchicalMethodSignature, existing) && isSuperMethod(aClass, hierarchicalMethodSignature, existing)) {
HierarchicalMethodSignatureImpl newSuper = copy(hierarchicalMethodSignature);
mergeSupers(newSuper, existing);
LOG.assertTrue(newSuper.getMethod().isValid());
map.put(signature, newSuper);
}
else if (isSuperMethod(aClass, existing, hierarchicalMethodSignature)) {