interface 'overrides' object: methods can declare different exceptions (IDEA-67753)

This commit is contained in:
anna
2011-04-13 20:05:34 +02:00
parent 8f4a7ee0d0
commit 2e0cd2d032
2 changed files with 8 additions and 0 deletions
@@ -247,6 +247,10 @@ public class HighlightMethodUtil {
PsiMethod superMethod = superMethodSignature.getMethod();
int index = getExtraExceptionNum(methodSignature, superMethodSignature, checkedExceptions, superSubstitutor);
if (index != -1) {
if (aClass.isInterface()) {
final PsiClass superContainingClass = superMethod.getContainingClass();
if (superContainingClass != null && !superContainingClass.isInterface()) continue;
}
PsiClassType exception = checkedExceptions.get(index);
String message = JavaErrorMessages.message("overridden.method.does.not.throw",
createClashMethodMessage(method, superMethod, true),
@@ -86,3 +86,7 @@ interface Coll {
}
class AbstrColl implements Coll {}
interface InterfaceOverridesObject {
Object clone() throws java.io.IOException;
}