RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v13]
Alan Bateman
alanb at openjdk.org
Mon May 15 18:39:57 UTC 2023
On Mon, 15 May 2023 17:18:01 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/misc/MainMethodFinder.java line 146:
>>
>>> 144:
>>> 145: if (Modifier.isStatic(mods) && mainMethod.getDeclaringClass() != mainClass) {
>>> 146: System.err.println("WARNING: static main in super class will be deprecated.");
>>
>> I thought that JEP 445 was deprecating this, in which case the text should be "is deprecated" rather than "will be".
>
> JEP 445 is not deprecating this. No advanced notice has been given.
Ah, I thought it was being deprecated. The JEP currently has "We deprecate the existing behavior that the launcher searches for a public static void main(String[] args) method in a superclass if one is not found in the launched class, issuing a runtime warning if such a method is found".
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13689#discussion_r1194220442
More information about the core-libs-dev
mailing list