mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
lambda isValueCompatible: ensure that normal completion is impossible for infinite loops (IDEA-137848)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user