On Mon, 1 May 2023 13:06:24 GMT, Jim Laskey <jlas...@openjdk.org> wrote:

>> Add flexible main methods and anonymous main classes to the Java language.
>
> Jim Laskey has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Anonymous main classes renamed to unnamed classes
>  - Add test

src/jdk.compiler/share/classes/com/sun/tools/javac/launcher/Main.java line 457:

> 455:             if (isStatic) {
> 456:                 if (noArgs) {
> 457:                     mainMethod.invoke(appClass);

Given that `Method.invoke(...)` on a static method ignores the `obj` param 
that's passed to it, perhaps pass `null`?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13689#discussion_r1185924903

Reply via email to