Integrated: 8324126: Error message for mistyping -XX:+Unlock...Options is not helpful
Sonia Zaldana Calles
szaldana at openjdk.org
Tue Feb 6 07:06:57 UTC 2024
On Thu, 25 Jan 2024 19:01:18 GMT, Sonia Zaldana Calles <szaldana at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: 542b0b66
Author: Sonia Zaldana Calles <szaldana at openjdk.org>
Committer: Thomas Stuefe <stuefe at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/542b0b66560d32817378e0019f696a3cb1523148
Stats: 29 lines in 2 files changed: 16 ins; 11 del; 2 mod
8324126: Error message for mistyping -XX:+Unlock...Options is not helpful
Reviewed-by: dholmes, stuefe
-------------
PR: https://git.openjdk.org/jdk/pull/17575
More information about the hotspot-runtime-dev
mailing list