RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v10]

Mandy Chung mchung at openjdk.org
Fri Nov 3 01:10:17 UTC 2023


On Thu, 2 Nov 2023 20:48:45 GMT, Jim Laskey <jlaskey at 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 unnamed classes from examples.not-yet.txt

src/java.base/share/native/libjli/java.c line 539:

> 537:                                          "validateMainMethod",
> 538:                                          "(Ljava/lang/Class;)Ljava/lang/reflect/Method;");
> 539:     CHECK_EXCEPTION_NULL_LEAVE(validateMainMethod);

The comment in line 498-499 needs update as `LoadMainClass` no longer validates the main method.

   * Get the application's main class. It also checks if the main
   * method exists.

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

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


More information about the compiler-dev mailing list