mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
exception inference: don't check non-applicable methods (IDEA-178762)
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@FunctionalInterface
|
||||
interface ThrowableRunnable<E extends Exception> {
|
||||
|
||||
void get() throws E;
|
||||
|
||||
static <E extends Exception> void m(ThrowableRunnable<E> supplier, Object... params) throws E {}
|
||||
|
||||
|
||||
default void getContent() {
|
||||
try {
|
||||
m(() -> { throw new IOException(); });
|
||||
} catch (IOException e) { }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user