Integrated: 7903789: Replace reflective code to access java.lang.Process methods

Jaikiran Pai jpai at openjdk.org
Tue Aug 26 09:44:51 UTC 2025


On Sun, 24 Aug 2025 10:09:29 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review of this change which replaces the reflective access to java.lang.Process' methods with direct API calls? This addresses https://bugs.openjdk.org/browse/CODETOOLS-7903789?
> 
> We used to access the `pid()` method and the `destroyForcibly()` method reflectively. `pid()` has been available since Java 9 and `destroyForcibly()` since Java 8. A minimum of Java 17 is required to launch the jtreg tool itself. So the reflective use of these APIs is no longer necessary.
> 
> No new self tests have been introduced and existing tests continue to pass with this change.

This pull request has now been integrated.

Changeset: 852a2c25
Author:    Jaikiran Pai <jpai at openjdk.org>
URL:       https://git.openjdk.org/jtreg/commit/852a2c259d88fbf60a8860071790206a1af7c2a7
Stats:     180 lines in 4 files changed: 0 ins; 166 del; 14 mod

7903789: Replace reflective code to access java.lang.Process methods

Reviewed-by: cstein

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

PR: https://git.openjdk.org/jtreg/pull/277


More information about the jtreg-dev mailing list