do not warn about inconsistent throws for interface with 2 independent parent interfaces (IDEA-76337)

This commit is contained in:
anna
2011-11-03 21:02:50 +01:00
parent 33ef53ffe8
commit 1b38bd0d7a
2 changed files with 15 additions and 0 deletions
@@ -251,6 +251,7 @@ public class HighlightMethodUtil {
if (aClass.isInterface()) {
final PsiClass superContainingClass = superMethod.getContainingClass();
if (superContainingClass != null && !superContainingClass.isInterface()) continue;
if (superContainingClass != null && !aClass.isInheritor(superContainingClass, true)) continue;
}
PsiClassType exception = checkedExceptions.get(index);
String message = JavaErrorMessages.message("overridden.method.does.not.throw",
@@ -90,3 +90,17 @@ interface InterfaceOverridesObject {
Object clone() throws java.io.IOException;
}
////////////multiple interface inheritance///////
class sqlExcept extends Exception {}
class sqlInheritorException extends sqlExcept {}
class timeoutEx extends Exception{}
interface AMultiple {
void m() throws java.io.IOException, sqlInheritorException;
}
interface BMultiple {
void m() throws java.io.EOFException, sqlExcept, timeoutEx;
}
interface DMultiple extends AMultiple, BMultiple {}