8215243: JShell tests failing intermitently with \"Problem cleaning up the following threads:\"

Do not reset closed state in the StopDetectingInputStream.write

Reviewed-by: rfield
This commit is contained in:
Jan Lahoda 2018-12-13 08:26:07 +01:00
parent 79d7ae7633
commit 35bd56fcdf

View File

@ -113,7 +113,7 @@ public final class StopDetectingInputStream extends InputStream {
}
public synchronized void write(int b) {
if (state != State.BUFFER) {
if (state == State.READ) {
state = State.WAIT;
}
int newEnd = (end + 1) % buffer.length;