Please review this change to Process.waitFor(timeout, TimeUnit)
to check for TimeUnit == null before checking for exited = true and timeout <= 0. The current implementation does not throw NPE if the timeout is <= 0 or the Process has already exited. The check for the validity of the arguments should come before the other conditions.
This cleanup of the implementation was requested by the JCK team.

Webrev:
     ://cr.openjdk.java.net/~rriggs/webrev-npe-8067796/
Issue:
8067796: (process) Process.waitFor(timeout, unit) doesn't throw NPE if timeout is less than, or equal to zero when unit == null

Thanks, Roger

[1] https://bugs.openjdk.java.net/browse/JDK-8067796


Reply via email to