RFR: 8324126: Error message for mistyping -XX:+Unlock...Options is not helpful [v4]
Sonia Zaldana Calles
szaldana at openjdk.org
Wed Jan 31 15:06:13 UTC 2024
> If we run the VM option to unlock experimental vm options without the preceding ‘+’, the error message is not very helpful:
>
> ```Error: VM option 'UnlockExperimentalVMOptions' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions.```
>
> With the proposed change, we should see a more descriptive error message, namely the lack of a +/- sign.
>
> ```Missing +/- setting for VM option 'UnlockExperimentalVMOptions'```
>
> Testing: runtime/commandLine regression tests pass. Also added a regression test to verify expected behaviour.
>
> Edit (Jan 30):
> The expected output is both the unlock message and the well-formed error:
>
> ```Error: VM option 'UnlockExperimentalVMOptions' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions.
> Error: The unlock option must precede 'UnlockExperimentalVMOptions'.
> Missing +/- setting for VM option 'UnlockExperimentalVMOptions'
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
Sonia Zaldana Calles has updated the pull request incrementally with one additional commit since the last revision:
fixing indentation
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17575/files
- new: https://git.openjdk.org/jdk/pull/17575/files/557f5cc6..832818f3
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17575&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17575&range=02-03
Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/17575.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17575/head:pull/17575
PR: https://git.openjdk.org/jdk/pull/17575
More information about the hotspot-runtime-dev
mailing list