unhandled exceptions when resolved to the first of multiple interfaces inherited (IDEA-109216)

This commit is contained in:
Anna Kozlova
2013-06-21 14:00:09 +04:00
parent d4df659396
commit a2c55a54eb
3 changed files with 70 additions and 9 deletions

View File

@@ -0,0 +1,22 @@
import java.io.*;
interface ThrowsCloneNotSupportedException {
void f() throws CloneNotSupportedException;
}
interface ThrowsIOException {
void f() throws IOException;
}
abstract class ThrowsNothing implements ThrowsCloneNotSupportedException, ThrowsIOException {
private void foo() {
f();
}
}
class Main {
public static void main(String[] args) {
ThrowsNothing throwsNothing = null;
throwsNothing.f();
}
}