-
Bug
-
Resolution: Fixed
-
P3
-
9
-
It seems to me that this issue is on Unix env.
I've confirmed this on my Ubuntu.I think this is not shown on Windows, please see my comment.
-
b141
-
generic
-
linux_ubuntu
-
Not verified
Consider following:
echo "System.out.println()" | jshell
jshell should exit as soon as printing empty line but it locks forever.
Another case,
java Main | jshell
Main is,
public class Main {
public static void main(String[] args) throws Exception {
for (int i = 0; i < 10; i++) {
Thread.sleep(1000);
System.out.println("System.out.println(" + i + ")");
}
}
}
jshell should exit 10 sec. later after printing from 0 to 9.
echo "System.out.println()" | jshell
jshell should exit as soon as printing empty line but it locks forever.
Another case,
java Main | jshell
Main is,
public class Main {
public static void main(String[] args) throws Exception {
for (int i = 0; i < 10; i++) {
Thread.sleep(1000);
System.out.println("System.out.println(" + i + ")");
}
}
}
jshell should exit 10 sec. later after printing from 0 to 9.