RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v10]

Vicente Romero vromero at openjdk.org
Fri May 5 18:18:24 UTC 2023


On Fri, 5 May 2023 17:31:27 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:

>> Add flexible main methods and anonymous main classes to the Java language.
>
> Jim Laskey has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Typo

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

> 464:         } catch (ClassNotFoundException e) {
> 465:             throw new Fault(Errors.CantFindClass(mainClassName));
> 466:         } catch (NoSuchMethodException e) {

`getDeclaredConstructor` can also throw a NSME but this error message would still say that the main method couldn't be found unless at this point we are sure that the class must have a no-args constructor

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

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



More information about the build-dev mailing list