From f6013ef227fcd8dc68c79f9f89bcd7e499f27613 Mon Sep 17 00:00:00 2001 From: Arno Zeller Date: Tue, 9 Jun 2026 16:51:21 +0200 Subject: [PATCH] Move countDown() out of the loop. --- .../javax/swing/SwingWorker/TestDoneBeforeDoInBackground.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/jdk/javax/swing/SwingWorker/TestDoneBeforeDoInBackground.java b/test/jdk/javax/swing/SwingWorker/TestDoneBeforeDoInBackground.java index 83aff5a139f..21711cc1968 100644 --- a/test/jdk/javax/swing/SwingWorker/TestDoneBeforeDoInBackground.java +++ b/test/jdk/javax/swing/SwingWorker/TestDoneBeforeDoInBackground.java @@ -53,8 +53,8 @@ public class TestDoneBeforeDoInBackground { @Override protected String doInBackground() throws Exception { try { + workerStarted.countDown(); while (true) { - workerStarted.countDown(); System.out.println("Working..."); Thread.sleep(WAIT_TIME); }