mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
lambda: unhandled exceptions inside method body should be treated as those inside anonymous classes (IDEA-121741)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// "Add Exception to Method Signature" "true"
|
||||
class C {
|
||||
interface I {
|
||||
void a() throws InterruptedException;
|
||||
}
|
||||
|
||||
{
|
||||
I i = () -> {
|
||||
Thread.sleep(2000);
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Add Exception to Method Signature" "false"
|
||||
class C {
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
new Thread(( ) -> {
|
||||
Thread.sl<caret>eep(2000);
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Add Exception to Method Signature" "true"
|
||||
class C {
|
||||
interface I {
|
||||
void a();
|
||||
}
|
||||
|
||||
{
|
||||
I i = () -> {
|
||||
Thread.sl<caret>eep(2000);
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user