From bd7561c315e8fd80e32cb154998bd28745c98682 Mon Sep 17 00:00:00 2001 From: Manukumar V S Date: Tue, 29 Apr 2025 16:43:15 +0000 Subject: [PATCH] 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc Reviewed-by: aivanov, honkar --- .../awt/regtesthelpers/PassFailJFrame.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/jdk/java/awt/regtesthelpers/PassFailJFrame.java b/test/jdk/java/awt/regtesthelpers/PassFailJFrame.java index f7d9cd8840d..0c3748bf832 100644 --- a/test/jdk/java/awt/regtesthelpers/PassFailJFrame.java +++ b/test/jdk/java/awt/regtesthelpers/PassFailJFrame.java @@ -1294,14 +1294,16 @@ public final class PassFailJFrame { /** * Forcibly pass the test. - *

The sample usage: - *


-     *      PrinterJob pj = PrinterJob.getPrinterJob();
-     *      if (pj == null || pj.getPrintService() == null) {
-     *          System.out.println(""Printer not configured or available.");
-     *          PassFailJFrame.forcePass();
-     *      }
-     * 
+ *

+ * Use this method in semi-automatic tests when + * the test determines that all the conditions for passing the test are met. + *

+ * Do not use this method in cases where a resource is unavailable or a + * feature isn't supported, throw {@code jtreg.SkippedException} instead. + * + *

A sample usage can be found in + * {@code + * SaveFileNameOverrideTest.java} */ public static void forcePass() { latch.countDown();