mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
interface 'overrides' object: methods can declare different exceptions (IDEA-67753)
This commit is contained in:
+4
@@ -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),
|
||||
|
||||
+4
@@ -86,3 +86,7 @@ interface Coll {
|
||||
}
|
||||
class AbstrColl implements Coll {}
|
||||
|
||||
interface InterfaceOverridesObject {
|
||||
Object clone() throws java.io.IOException;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user