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 419:

> 417:     private static boolean isStatic(Method method) {
> 418:         return method != null && 
> Modifier.isStatic(method.getModifiers());
> 419:     }

It looks like these new methods aren't being used.

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

> 438:             int mods = mainMethod.getModifiers();
> 439:             boolean isStatic = Modifier.isStatic(mods);
> 440:             boolean isPublic = Modifier.isStatic(mods);

This looks like a typo. This should have been `Modifier.isPublic(mods);`

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

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

Reply via email to