mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 16:39:37 +07:00
lambda: can complete normally: skip empty finally blocks at lambda body end (IDEA-136628; IDEA-135791)
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
class Test {
|
||||
|
||||
{
|
||||
Callable<String> r0 = () -> {
|
||||
log();
|
||||
return "";
|
||||
};
|
||||
|
||||
Callable<String> r = () -> {
|
||||
try {
|
||||
return "";
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
log();
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
Callable<String> r1 = () -> {
|
||||
log();
|
||||
try {
|
||||
return "";
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
Callable<String> r2 = () -> {
|
||||
try (InputStream stream = new FileInputStream("")) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
private static void log() throws Exception {}
|
||||
}
|
||||
Reference in New Issue
Block a user