RFR: 8324126: Error message for mistyping -XX:+Unlock...Options is not helpful
David Holmes
dholmes at openjdk.org
Mon Jan 29 03:02:35 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.
Changes requested by dholmes (Reviewer).
src/hotspot/share/runtime/arguments.cpp line 2:
> 1: /*
> 2: * Copyright (c) 1997, 2023, 2024, Oracle and/or its affiliates. All rights reserved.
This copyright change is incorrect. Oracle copyrights only use 2 years: first and last, so 2023 simply becomes 2024.
test/hotspot/jtreg/runtime/CommandLine/TestVMOptions.java line 2:
> 1: /*
> 2: * Copyright (c) 2014, 2023, 2024, Oracle and/or its affiliates. All rights reserved.
Ditto re copyright.
-------------
PR Review: https://git.openjdk.org/jdk/pull/17575#pullrequestreview-1847752305
PR Review Comment: https://git.openjdk.org/jdk/pull/17575#discussion_r1469026650
PR Review Comment: https://git.openjdk.org/jdk/pull/17575#discussion_r1469028817
More information about the hotspot-runtime-dev
mailing list