RFR: 8340114: Remove outdated SelectVersion() function from the launcher and update the code comments explaining the code flow [v8]

Jaikiran Pai jpai at openjdk.org
Mon Sep 23 04:53:15 UTC 2024


On Mon, 23 Sep 2024 04:41:00 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - move the code comment to a function comment
>>  - clarify who sets the _JAVA_VERSION_SET environment variable
>
> src/java.base/share/native/libjli/java.c line 1405:
> 
>> 1403:  * when launching java. It may be null, which implies the "-splash:" option wasn't used.
>> 1404:  * The jar_path is the value that was provided to the "-jar" option when launching java.
>> 1405:  * It too may be null, which implies the "-jar" option wasn't used.
> 
> But presumably we only call this function if (at least?) one of them is not null?

Hello David, the implementation of this function takes the responsibility of acting as a no-op if both the parameters are null. The call site doesn't do that check. Do you prefer the call site to do that check and we update this function's documentation that at least one of them should be non null?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20997#discussion_r1770767593


More information about the core-libs-dev mailing list