On Fri, 3 Nov 2023 15:00:41 GMT, Jim Laskey <jlas...@openjdk.org> wrote:
>> src/java.base/share/native/libjli/java.c line 559: >> >>> 557: >>> 558: /* Build platform specific argument array */ >>> 559: if ((mainType & MAIN_WITHOUT_ARGS) == 0) { >> >> nice, thanks, a minor addition to the condition: `&& argc > 0`? > > Need an empty array when argc == 0. oh I see >> src/java.base/share/native/libjli/java.c line 561: >> >>> 559: if ((mainType & MAIN_WITHOUT_ARGS) == 0) { >>> 560: mainArgs = CreateApplicationArgs(env, argv, argc); >>> 561: CHECK_EXCEPTION_NULL_LEAVE(mainArgs); >> >> side: this is just a comment not proposing any change, I know it is a good >> practice to check for nulls here, but having a null here is really possible? >> how can we have a null here? but I guess this also check for any other >> exception right? > > Yes it's a combo thing. This was the code that was there BTW. yes I know it is previous code, I was just wondering how we could have a null exception here but it is true that other exceptions can occur ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16461#discussion_r1381846743 PR Review Comment: https://git.openjdk.org/jdk/pull/16461#discussion_r1381848172