RFR 9: 8077350 Process API Updates Implementation Review (Due 4/23)
Paul Sandoz
paul.sandoz at oracle.com
Mon Apr 20 13:01:58 UTC 2015
Hi Roger,
I am not sure you have the @implSpec/@implNote quite correct on the new methods of Process.
For example, for Process.toHandle i would expect something like:
...
@implSpec
This implementation throws an instance of UnsupportedOperationException and
performs no other action. Sub-types should override this method, ensuring that
calling methods (getPid etc.) of this class, that are not overridden, operate on the
returned ProcessHandle.
The @implSpec should refer to the implementation in Process itself, and the @implNote cannot be used for any normative statements.
The document for Process.gePid (and similarly those methods depending on toHandle) could then be:
...
@implSpec
This implementation returns a process id as follows:
toHandle().getPid();
In this respect is there a need to say anything about the behaviour of a Process created by ProcessBuilder?
It might be useful to have some general guidance for sub-types on the class doc of Process e.g. saying they only need to override toHandle but may override some or all dependent methods as appropriate.
Paul.
On Apr 17, 2015, at 9:12 PM, Roger Riggs <Roger.Riggs at Oracle.com> wrote:
> The webrev for ProcessAPI updates has been updated to reflect recent comments.
> Please review and comment by April 23rd.
>
> The updates include:
> - Renaming Process/ProcessHandle supportsDestroyForcibly to supportsNormalTermination
> and updating related descriptions
> - ProcessHandle.destroy/destroyForcible descriptions have more consistent descriptions
> - ProcessHandle.destroy now returns ProcessHandle to enable fluent use.
> - Corrected description of default implementation ProcessHandle.onExit
>
> The API doc: http://cr.openjdk.java.net/~rriggs/ph-apidraft/
>
> The webrev: http://cr.openjdk.java.net/~rriggs/webrev-ph
>
> Issue: JDK-8077350 <https://bugs.openjdk.java.net/browse/JDK-8077350> Process API Updates Implementation
>
> The code is in the jdk9 sandbox on branch JDK-8046092-branch.
>
> Two issues raised have been filed to be fixed after the current commit:
> - JDK-8078099 <https://bugs.openjdk.java.net/browse/JDK-8078099> (process) ProcessHandle should uniquely identify processes
> - JDK-8078108 <https://bugs.openjdk.java.net/browse/JDK-8078108> (process) ProcessHandle.isAlive should be robust
More information about the core-libs-dev
mailing list