From 35bd56fcdfc8f36116c0d4967b2bfcb448f20476 Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Thu, 13 Dec 2018 08:26:07 +0100 Subject: [PATCH] 8215243: JShell tests failing intermitently with \"Problem cleaning up the following threads:\" Do not reset closed state in the StopDetectingInputStream.write Reviewed-by: rfield --- .../jdk/internal/jshell/tool/StopDetectingInputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/StopDetectingInputStream.java b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/StopDetectingInputStream.java index 578f5cf6893..4a3fc773c2d 100644 --- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/StopDetectingInputStream.java +++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/StopDetectingInputStream.java @@ -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;