RFR 9: 8129344 : (process) ProcessHandle instances should define equals and be value-based
Paul Sandoz
paul.sandoz at oracle.com
Mon Jun 22 15:44:19 UTC 2015
Hi Roger,
It looks ok, just some minor stuff.
So basically it is a necessary but not sufficient condition that two equal processes have the same pid? If so Perhaps it might be possible to weave that phrase into the docs? Maybe some wording on getPid is also required?
355 * Returns {@code false} if {@link #getPid() PIDs} of the ProcessHandles
356 * are not equal or if it is known that the {@code other} ProcessHandle
357 * is a different system process.
For clarity you might want to say:
* are not equal, or if the PIDs are equal and it is known that...
I was pondering whether "implementation class" is too specific, rather than just implementation. If the former i might expect related JCK tests to be written.
Paul.
On Jun 19, 2015, at 5:19 PM, Roger Riggs <Roger.Riggs at Oracle.com> wrote:
> Please review this update to ProcessHandle to specify the equals method
> and that (JDK provided) instances have value-base semantics.
>
> This update to the spec is needed to support pending work to uniquely
> identify processes (8078099) using the process start time if available
> from the operating system.
>
> Wordsmithing may be needed.
>
> Webrev:
> http://cr.openjdk.java.net/~rriggs/webrev-equals-8129344/
>
> Issue:
> https://bugs.openjdk.java.net/browse/JDK-8078099
>
> Thanks, Roger
>
More information about the core-libs-dev
mailing list