lambda isValueCompatible check: ensure throws is not treated as normal completion (IDEA-135581)

This commit is contained in:
Anna Kozlova
2015-01-26 19:33:28 +03:00
parent 6edc7c729c
commit 012e57d2ea
3 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
import java.util.concurrent.Callable;
class Test {
public static void main(String[] args) {
method(() -> {
if (check(args[0])) {
return "";
} else {
throw new Exception("");
}
});
}
public static <T> void method(Callable<T> callable) {}
public static boolean check(String s) throws Exception {
return true;
}
}