On Fri, 22 Nov 2024 17:04:38 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:
>> 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 Adding the property is a patch around the lack of the real information still seems like unfortunate choice. Getting early patch detection isn't reason enough to use a hack to get the information needed. (Btw, Valhalla will be patching in a set of value based classes when --enable-preview is used, so there's knock work for that later) If the fork was not next week, I'd ask for a better solution, later if not now. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22277#issuecomment-2501232766