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

Aleksey Shipilev shade at openjdk.java.net
Wed Oct 7 06:40:10 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

I think this is fine, but you might consider a little improvement below.

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

Marked as reviewed by shade (Reviewer).

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



More information about the build-dev mailing list