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

Vicente Romero vromero at openjdk.org
Fri Nov 3 14:34:27 UTC 2023


On Fri, 3 Nov 2023 12:40:48 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision:
> 
>  - Merge remote-tracking branch 'upstream/master' into 8315458
>  - Don't get args unless necessary
>  - Remove unnamed classes from examples.not-yet.txt
>  - Requested corrections
>  - Changes recommended by Jan
>  - Revised implicit class test
>  - Don't store main method info globally. Use addition calls to fetch info.
>  - Update JEP number in PreviewFeature
>  - Remove MANDATED flag from implicit classes
>  - Remove .orig files
>  - ... and 2 more: https://git.openjdk.org/jdk/compare/8f2f4091...0bd5b477

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

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?

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

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


More information about the compiler-dev mailing list