From 4ea4d7c68444200ab38cbd76762c2f27848e264e Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Wed, 24 Jul 2024 16:48:34 +0000 Subject: [PATCH] 8336679: Add @implSpec for the default implementations in Process.waitFor() Reviewed-by: bpb, jlu, liach --- .../share/classes/java/lang/Process.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/java.base/share/classes/java/lang/Process.java b/src/java.base/share/classes/java/lang/Process.java index a01a1f93fd2..af6753a236b 100644 --- a/src/java.base/share/classes/java/lang/Process.java +++ b/src/java.base/share/classes/java/lang/Process.java @@ -442,10 +442,13 @@ public abstract class Process { * terminated and the timeout value is less than, or equal to, zero, then * this method returns immediately with the value {@code false}. * - *

The default implementation of this method polls the {@code exitValue} - * to check if the process has terminated. Concrete implementations of this - * class are strongly encouraged to override this method with a more - * efficient implementation. + * @implSpec + * The default implementation of this method polls the {@code exitValue} + * to check if the process has terminated. + * + * @implNote + * Concrete implementations of this class are strongly encouraged to + * override this method with a more efficient implementation. * * @param timeout the maximum time to wait * @param unit the time unit of the {@code timeout} argument @@ -486,10 +489,13 @@ public abstract class Process { * terminated and the duration is not positive, then * this method returns immediately with the value {@code false}. * - *

The default implementation of this method polls the {@code exitValue} - * to check if the process has terminated. Concrete implementations of this - * class are strongly encouraged to override this method with a more - * efficient implementation. + * @implSpec + * The default implementation of this method polls the {@code exitValue} + * to check if the process has terminated. + * + * @implNote + * Concrete implementations of this class are strongly encouraged to + * override this method with a more efficient implementation. * * @param duration the maximum duration to wait; if not positive, * this method returns immediately.