lambda isValueCompatible: ensure that normal completion is impossible for infinite loops (IDEA-137848)

This commit is contained in:
Anna Kozlova
2015-03-20 19:02:26 +01:00
parent 858119b775
commit 1f50640671
3 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
import java.io.Reader;
import java.io.StringReader;
import java.util.concurrent.Callable;
class Test {
public static final void main(String[] args) throws Exception {
Reader r = new StringReader("Elvis lives!");
Callable<Integer > c1 = () -> {
while (true) {
r.read();
}
};
}
}