On 05/11/2015 21:56, Roger Riggs wrote:
Please review the new ProcessBuilder.startPipeline API, implementation, and tests.

:

javadoc of ProcessBuilder:  only startPipeline is new:
   http://cr.openjdk.java.net/~rriggs/pipedoc/

I skimmed over the javadoc and it looks quite good.

The method name seems okay, I initially assumed it would be something like startProcesses but that doesn't convey how they are arranged.

Using varargs seem reasonable for the examples like you have in the javadoc but there may be other usages where this might be annoying. Returning List<Process> seems okay. The last Process is of course the most interesting but having some way to get the exitValue of the intermediate processes will be important for logging and troubleshooting purposes.

For testing purposes then I assume the javadoc needs to make it clear that the returned list is the same size as the input array and that the Process at index i corresponds to ProcessBuilder i.

Did you consider ignoring the redirects of the intermediate processes so that IAE doesn't need to be thrown?

I assume the method needs to specify SecurityException and other exceptions that start can throw.

On the clean-up then do we need to reassert the interrupt status if interrupted?

-Alan.

Reply via email to