Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8207403

Clarify the documentation of ProcessBuilder.startPipeline

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 12
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      The specification text is clarified with no change to the behavior.
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      The specification of ProcessBuilder.startPipeline is revised to correctly reference the appropriate ProcessBuilders and processes.

      Problem

      The original text was copied from ProcessBuilder.start and does not correctly reference the builders.

      Solution

      Revise the text of ProcessBuilder.startPipeline.

      Specification

      @@ -1157,12 +1157,12 @@
            * are forcibly destroyed.
            * <p>
            * The {@code startPipeline} method performs the same checks on
      -     * each ProcessBuilder as does the {@link #start} method. The new process
      -     * will invoke the command and arguments given by {@link #command()},
      -     * in a working directory as given by {@link #directory()},
      -     * with a process environment as given by {@link #environment()}.
      +     * each ProcessBuilder as does the {@link #start} method. Each new process
      +     * invokes the command and arguments given by the respective process builder's
      +     * {@link #command()}, in a working directory as given by its {@link #directory()},
      +     * with a process environment as given by its {@link #environment()}.
            * <p>
      -     * This method checks that the command is a valid operating
      +     * Each process builder's command is checked to be a valid operating
            * system command.  Which commands are valid is system-dependent,
            * but at the very least the command must be a non-empty list of
            * non-null strings.
      @@ -1174,7 +1174,7 @@
            * <p>
            * If there is a security manager, its
            * {@link SecurityManager#checkExec checkExec}
      -     * method is called with the first component of this object's
      +     * method is called with the first component of each process builder's
            * {@code command} array as its argument. This may result in
            * a {@link SecurityException} being thrown.
            * <p>
      @@ -1194,8 +1194,8 @@
            * If the operating system does not support the creation of
            * processes, an {@link UnsupportedOperationException} will be thrown.
            * <p>
      -     * Subsequent modifications to this process builder will not
      -     * affect the returned {@link Process}.
      +     * Subsequent modifications to any of the specified builders
      +     * will not affect the returned {@link Process}.
            * @apiNote
            * For example to count the unique imports for all the files in a file hierarchy
            * on a Unix compatible platform:

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rriggs Roger Riggs
                Reporter:
                webbuggrp Webbug Group
                Reviewed By:
                Lance Andersen
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: