On Thu, 2 Nov 2023 12:33:27 GMT, Jim Laskey <jlas...@openjdk.org> wrote:

>> Address changes from JEP 445 to JEP 463.
>> 
>> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class.
>> 
>> - Don't mark class on read.
>> 
>> - Remove reflection and annotation processing related to unnamed classes.
>> 
>> - Simplify main method search.
>
> Jim Laskey has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Remove MANDATED flag from implicit classes

src/java.base/share/classes/sun/launcher/LauncherHelper.java line 973:

> 971:             abort(null, "java.launcher.cls.error3",
> 972:                   mainMethod.getDeclaringClass().getName());
> 973:         }

The simplification to LauncherHelper.validateMainClass looks okay but one thing 
is a bit annoying is the side effect to set mainType. What would you think 
about changing validateMainClass to return the Method for the main class and 
have checkAndLoadMain set mainType after validateMainClass succeeds, right not 
it gets set even if the validate fails.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16461#discussion_r1380252317

Reply via email to