8215243: JShell tests failing intermitently with \"Problem cleaning up the following threads:\"
Summary: Do not reset closed state in the StopDetectingInputStream.write
Reviewed-by: rfield
--- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/StopDetectingInputStream.java Wed Dec 12 23:08:01 2018 -0800
+++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/StopDetectingInputStream.java Thu Dec 13 08:26:07 2018 +0100
@@ -113,7 +113,7 @@
}
public synchronized void write(int b) {
- if (state != State.BUFFER) {
+ if (state == State.READ) {
state = State.WAIT;
}
int newEnd = (end + 1) % buffer.length;