RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v6]
Jim Laskey
jlaskey at openjdk.org
Thu Nov 2 15:49:15 UTC 2023
On Thu, 2 Nov 2023 14:53:44 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:
>> 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.
>
> Agree. Will fetch flags from second call from JVM.
Amazingly enough I seem to have the JNI straight on the first try.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16461#discussion_r1380359994
More information about the compiler-dev
mailing list