RFR: 8344560: Add system property for patched runtime
Severin Gehwolf
sgehwolf at openjdk.org
Wed Nov 20 18:33:33 UTC 2024
On Wed, 20 Nov 2024 17:45:18 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> I had hoped you would get more feedback on the proposal.
Sorry about that. There weren't any major objections, so I moved forward as there was radio-silence for a while:
https://mail.openjdk.org/pipermail/core-libs-dev/2024-November/134623.html
We can discuss more details here, perhaps? I can withdraw the proposal as well.
> If we do expose the property then I'm wondering about the JDK-specific properties documented in System.getProperties, and also thinking about java -XshowSettings output.
Makes sense. Some comments:
- `System.getProperties()` doesn't list all JDK specific properties currently. `jdk.debug` is one. It lists some others, like `jdk.module.path`. So I wasn't sure if it needed to be mentioned in `@implNote`.
- `-XshowSettings` output changes in the same way as the property is being set. I.e. on a `--patch-module`-including invocation it would show it. Similar to `jdk.module.path` (when not set it's not there, when set it shows up).
> test/jdk/java/lang/System/patchedModule/ModulePatcherTest.java line 39:
>
>> 37: * @run main/othervm --patch-module=java.base=${test.classes} ModulePatcherTest true
>> 38: */
>> 39: public class ModulePatcherTest {
>
> The existing tests for --patch-module are in test/jdk/tools/launcher/modules/patch, we might want to see if we should just update one of the existing tests or move the new test with a name that makes it clear it's testing the property.
Thanks. Couldn't find the place where existing tests were (I tried to look). I'll take a look and will adjust.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22277#issuecomment-2489262194
PR Review Comment: https://git.openjdk.org/jdk/pull/22277#discussion_r1850782371
More information about the core-libs-dev
mailing list