lambda: can complete normally: skip empty finally blocks at lambda body end (IDEA-136628; IDEA-135791)

This commit is contained in:
Anna Kozlova
2015-02-17 18:09:35 +01:00
parent c52857dee5
commit 895b40432c
3 changed files with 60 additions and 3 deletions

View File

@@ -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 {}
}