Integrated: 8254102: use ProcessHandle::pid instead of ManagementFactory::getRuntimeMXBean to get pid in tests

Igor Ignatyev iignatyev at openjdk.java.net
Wed Oct 7 18:55:08 UTC 2020


On Tue, 6 Oct 2020 23:08:40 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:

> Hi all,
> 
> could you please review this small cleanup which replaces
> `ManagementFactory.getRuntimeMXBean().getName().split("@")[0]` w/ `ProcessHandle.current().pid()` to get current
> process pid?  Thanks,
> -- Igor

This pull request has now been integrated.

Changeset: 5a9bd41e
Author:    Igor Ignatyev <iignatyev at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/5a9bd41e
Stats:     57 lines in 8 files changed: 0 ins; 41 del; 16 mod

8254102: use ProcessHandle::pid instead of ManagementFactory::getRuntimeMXBean to get pid in tests

Reviewed-by: rriggs, shade

-------------

PR: https://git.openjdk.java.net/jdk/pull/534



More information about the build-dev mailing list