8132883: The spec of allChildren/children of j.l.Process/ProcessHandle need to be relaxed

8131763: j.l.Process.allChildren spec clarification

Reviewed-by: chegar
This commit is contained in:
Roger Riggs 2015-09-23 15:02:46 -04:00
parent 4e7617c040
commit f6878d40ef
2 changed files with 18 additions and 12 deletions

View File

@ -500,7 +500,8 @@ public abstract class Process {
/**
* Returns a snapshot of the direct children of the process.
* A process that is {@link #isAlive not alive} has zero children.
* The parent of a direct child process is the process.
* Typically, a process that is {@link #isAlive not alive} has no children.
* <p>
* <em>Note that processes are created and terminate asynchronously.
* There is no guarantee that a process is {@link #isAlive alive}.
@ -510,8 +511,8 @@ public abstract class Process {
* This implementation returns the direct children as:
* {@link #toHandle toHandle().children()}.
*
* @return a Stream of ProcessHandles for processes that are direct children
* of the process
* @return a sequential Stream of ProcessHandles for processes that are
* direct children of the process
* @throws UnsupportedOperationException if the Process implementation
* does not support this operation
* @throws SecurityException if a security manager has been installed and
@ -524,7 +525,9 @@ public abstract class Process {
/**
* Returns a snapshot of the direct and indirect children of the process.
* A process that is {@link #isAlive not alive} has zero children.
* An indirect child is one whose parent is either a direct child or
* another indirect child.
* Typically, a process that is {@link #isAlive not alive} has no children.
* <p>
* <em>Note that processes are created and terminate asynchronously.
* There is no guarantee that a process is {@link #isAlive alive}.
@ -534,8 +537,8 @@ public abstract class Process {
* This implementation returns all children as:
* {@link #toHandle toHandle().allChildren()}.
*
* @return a Stream of ProcessHandles for processes that are direct and
* indirect children of the process
* @return a sequential Stream of ProcessHandles for processes that are
* direct and indirect children of the process
* @throws UnsupportedOperationException if the Process implementation
* does not support this operation
* @throws SecurityException if a security manager has been installed and

View File

@ -149,14 +149,15 @@ public interface ProcessHandle extends Comparable<ProcessHandle> {
/**
* Returns a snapshot of the current direct children of the process.
* A process that is {@link #isAlive not alive} has zero children.
* The {@link #parent} of a direct child process is the process.
* Typically, a process that is {@link #isAlive not alive} has no children.
* <p>
* <em>Note that processes are created and terminate asynchronously.
* There is no guarantee that a process is {@link #isAlive alive}.
* </em>
*
* @return a Stream of ProcessHandles for processes that are direct children
* of the process
* @return a sequential Stream of ProcessHandles for processes that are
* direct children of the process
* @throws SecurityException if a security manager has been installed and
* it denies RuntimePermission("manageProcess")
*/
@ -164,14 +165,16 @@ public interface ProcessHandle extends Comparable<ProcessHandle> {
/**
* Returns a snapshot of the current direct and indirect children of the process.
* A process that is {@link #isAlive not alive} has zero children.
* An indirect child is one whose parent is either a direct child or
* another indirect child.
* Typically, a process that is {@link #isAlive not alive} has no children.
* <p>
* <em>Note that processes are created and terminate asynchronously.
* There is no guarantee that a process is {@link #isAlive alive}.
* </em>
*
* @return a Stream of ProcessHandles for processes that are direct and
* indirect children of the process
* @return a sequential Stream of ProcessHandles for processes that are
* direct and indirect children of the process
* @throws SecurityException if a security manager has been installed and
* it denies RuntimePermission("manageProcess")
*/