On Tue, 17 Sep 2024 11:09:03 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

> Now that you mention it, one part of the changes in this PR, moves the checks 
> and error reporting for the -version:, -jre-restrict-search and 
> -jre-no-restrict-search options to the ParseArguments function. I think we 
> can just get rid of that code and let those options be considered as just 
> another unknown option to the launcher.

I've now updated the PR to consider these 3 options just like any other unknown 
option. The previous existing `MultipleJRERemoved` is no longer needed and 
that's been removed too.

> I can open a CSR linked to this current PR to formalize that change. 

Thinking more, I don't think a CSR is needed here. In the current mainline, 
even without these proposed changes, if I launch `java` with either of these 3 
options then the launch fails with an error:


java -jre-no-restrict-search Foo             
Error: Specifying an alternate JDK/JRE is no longer supported.
  The related flags -jre-restrict-search | -jre-no-restrict-search are also no 
longer valid.
Error: Specifying an alternate JDK/JRE is no longer supported.
  The related flags -jre-restrict-search | -jre-no-restrict-search are also no 
longer valid.
Unrecognized option: -jre-no-restrict-search
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


With the latest proposed change in this PR, the java launch with continue to 
fail with a (generic) error:


Unrecognized option: -jre-no-restrict-search
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


So I don't think this deserves a CSR.

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

PR Comment: https://git.openjdk.org/jdk/pull/20997#issuecomment-2355425729

Reply via email to