RFR: 8344560: Add system property for patched runtime [v3]

Severin Gehwolf sgehwolf at openjdk.org
Fri Nov 22 17:04:38 UTC 2024


> Please review this simple patch which adds a new external system property `jdk.patched` when the runtime has been patched with the `--patch-module` switch. This is useful for two reasons: 1) it allows one to determine at run-time whether or not `--patch-module` has been used (by querying the said property) 2) allows tools, such as `jlink` doing the same without needing to expose internal properties the JVM sets on initialization.
> 
> Testing:
> 
> - [x] GHA (includes new test)
> - [x] New jtreg test 
> 
> Thoughts?

Severin Gehwolf has updated the pull request incrementally with one additional commit since the last revision:

  Mention jdk.patched in System class

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/22277/files
  - new: https://git.openjdk.org/jdk/pull/22277/files/c635fdc0..a11e2663

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=22277&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22277&range=01-02

  Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/22277.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22277/head:pull/22277

PR: https://git.openjdk.org/jdk/pull/22277


More information about the core-libs-dev mailing list