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

David Holmes dholmes at openjdk.org
Mon Sep 23 05:12:36 UTC 2024


On Mon, 23 Sep 2024 04:47:52 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> 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?

No, no, that is fine as-is. I was mis-remembering how the code was structured.

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

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


More information about the core-libs-dev mailing list