On Tue, 12 Nov 2024 13:51:17 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:

>> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java line 625:
>> 
>>> 623:             // Do not permit linking from run-time image when the 
>>> current image
>>> 624:             // is being patched
>>> 625:             if 
>>> (jdk.internal.misc.VM.getSavedProperties().get("jdk.module.patch.0") != 
>>> null) {
>> 
>> I don't think we should introduce this dependency. Instead, I think we 
>> should look at adding a property such as jdk.patched, with a boolean value, 
>> to indicate if the current runtime is patched or not. This could be useful 
>> for java -XshowSettings output too.
>
>> Instead, I think we should look at adding a property such as jdk.patched
> 
> You mean a new standard property - observable with 
> `System.getProperty("jdk.patched")` as well - which would also show up with 
> `java -XshowSettings:properties`? Is that the direction you are envisioning?

Yes, I'm wondering if a JDK-specific (rather than standard) property could be 
more widely useful as it would allow observability tools to know that the JDK 
has been patched. It would be good to get wider input on this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22037#discussion_r1838203008

Reply via email to